query
stringlengths
74
6.1k
positive
sequencelengths
1
1
negative
sequencelengths
9
9
public void dispatchKeyEvent(int code, int action) { int keyCode = 0; int keyAction = 0; if (code == BUTTON_1) { keyCode = KeyEvent.KEYCODE_BUTTON_1; } else if (code == BUTTON_2) { keyCode = KeyEvent.KEYCODE_BUTTON_2; } if (action == ACTION_DOWN) { keyAction = KeyEvent.ACTION_DOWN; } else if (action == ACTION_UP) { keyAction = KeyEvent.ACTION_UP; } KeyEvent keyEvent = new KeyEvent(keyAction, keyCode); setKeyEvent(keyEvent); }
[ "Synthesize and forward a KeyEvent to the library.\n\nThis call is made from the native layer.\n\n@param code id of the button\n@param action integer representing the action taken on the button" ]
[ "The quick way to detect for a tier of devices.\nThis method detects for devices which are likely to be capable\nof viewing CSS content optimized for the iPhone,\nbut may not necessarily support JavaScript.\nExcludes all iPhone Tier devices.\n@return detection of any device in the 'Rich CSS' Tier", "Use this API to unset the properties of gslbservice resources.\nProperties that need to be unset are specified in args array.", "Retrieve an instance of the ResourceField class based on the data read from an\nMPX file.\n\n@param value value from an MS Project file\n@return instance of this class", "Flush output streams.", "This method removes trailing delimiter characters.\n\n@param buffer input sring buffer", "Utility function that fetches quota types.", "This method generates a list of lists. Each list represents the data\nfor an embedded object, and contains set set of RTFEmbeddedObject instances\nthat make up the embedded object. This method will return null\nif there are no embedded objects in the RTF document.\n\n@param text RTF document\n@return list of lists of RTFEmbeddedObject instances", "Plots the MSD curve with the trajectory t and adds the fitted model for confined diffusion above.\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 timelag Elapsed time between two frames.\n@param a Parameter alpha\n@param b Shape parameter 1\n@param c Shape parameter 2\n@param d Diffusion coefficient", "Return a copy of the new fragment and set the variable above." ]
public void putEvents(List<Event> events) { Exception lastException; List<EventType> eventTypes = new ArrayList<EventType>(); for (Event event : events) { EventType eventType = EventMapper.map(event); eventTypes.add(eventType); } int i = 0; lastException = null; while (i < numberOfRetries) { try { monitoringService.putEvents(eventTypes); break; } catch (Exception e) { lastException = e; i++; } if(i < numberOfRetries) { try { Thread.sleep(delayBetweenRetry); } catch (InterruptedException e) { break; } } } if (i == numberOfRetries) { throw new MonitoringException("1104", "Could not send events to monitoring service after " + numberOfRetries + " retries.", lastException, events); } }
[ "Sends all events to the web service. Events will be transformed with mapper before sending.\n\n@param events the events" ]
[ "Returns the data about all of the plugins that are set\n\n@param onlyValid True to get only valid plugins, False for all\n@return array of Plugins set", "Returns the first 24 photos for a given tag cluster.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param tag\n@param clusterId\n@return PhotoList\n@throws FlickrException", "Read an exception day for a calendar.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day ConceptDraw PROJECT exception day", "Update an object in the database to change its id to the newId parameter.", "Initializes an annotation class\n\n@param name The name of the annotation class\n@return The instance of the annotation. Returns a dummy if the class was\nnot found", "Handles reports by consumers\n\n@param name the name of the reporting consumer\n@param report the number of lines the consumer has written since last report\n@return \"exit\" if maxScenarios has been reached, \"ok\" otherwise", "Run the configured crawl. This method blocks until the crawl is done.\n\n@return the CrawlSession once the crawl is done.", "Filters a list of rows from the named table. If a column name and a value\nare supplied, then use this to filter the rows. If no column name is\nsupplied, then return all rows.\n\n@param tableName table name\n@param columnName filter column name\n@param id filter column value\n@return filtered list of rows", "get the underlying wrapped connection\n@return OTMConnection raw connection to the OTM." ]
public EmailAlias addEmailAlias(String email, boolean isConfirmed) { URL url = EMAIL_ALIASES_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID()); BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "POST"); JsonObject requestJSON = new JsonObject() .add("email", email); if (isConfirmed) { requestJSON.add("is_confirmed", isConfirmed); } request.setBody(requestJSON.toString()); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject responseJSON = JsonObject.readFrom(response.getJSON()); return new EmailAlias(responseJSON); }
[ "Adds a new email alias to this user's account and confirms it without user interaction.\nThis functionality is only available for enterprise admins.\n@param email the email address to add as an alias.\n@param isConfirmed whether or not the email alias should be automatically confirmed.\n@return the newly created email alias." ]
[ "Override this method to change the default splash screen size or\nposition.\n\nThis method will be called <em>before</em> {@link #onInit(GVRContext)\nonInit()} and before the normal render pipeline starts up. In particular,\nthis means that any {@linkplain GVRAnimation animations} will not start\nuntil the first {@link #onStep()} and normal rendering starts.\n\n@param splashScreen\nThe splash object created from\n{@link #getSplashTexture(GVRContext)},\n{@link #getSplashMesh(GVRContext)}, and\n{@link #getSplashShader(GVRContext)}.\n\n@since 1.6.4", "Returns the user records for all users in the specified workspace or\norganization.\n\n@param workspace The workspace in which to get users.\n@return Request object", "Use this API to fetch a rewriteglobal_binding resource .", "Sets the necessary height for all bands in the report, to hold their children", "Reads a combined date and time value expressed in tenths of a minute.\n\n@param data byte array of data\n@param offset location of data as offset into the array\n@return time value", "Replaces the proxy url with the correct url from the tileMap.\n\n@return correct url to TMS service", "Add the string representation of the given object to this sequence. The given indentation will be prepended to\neach line except the first one if the object has a multi-line string representation.\n\n@param object\nthe appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.", "IN Criteria with SubQuery\n@param attribute The field name to be used\n@param subQuery The subQuery", "An invalid reference or references. The verification of the digest of a\nreference failed. This can be caused by a change to the referenced data\nsince the signature was generated.\n\n@param aInvalidReferences\nThe indices to the invalid references.\n@return Result object" ]
public static wisite_binding get(nitro_service service, String sitepath) throws Exception{ wisite_binding obj = new wisite_binding(); obj.set_sitepath(sitepath); wisite_binding response = (wisite_binding) obj.get_resource(service); return response; }
[ "Use this API to fetch wisite_binding resource of given name ." ]
[ "Populates a recurring task.\n\n@param record MPX record\n@param task recurring task\n@throws MPXJException", "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.", "Obtain the master partition for a given key\n\n@param key\n@return master partition id", "Draw text in the center of the specified box.\n\n@param text text\n@param font font\n@param box box to put text int\n@param fontColor colour", "List the slack values for each task.\n\n@param file ProjectFile instance", "Sets currency symbol.\n\n@param symbol currency symbol", "Gets all the enterprise events that occurred within a specified date range.\n@param api the API connection to use.\n@param after the lower bound on the timestamp of the events returned.\n@param before the upper bound on the timestamp of the events returned.\n@param types an optional list of event types to filter by.\n@return a log of all the events that met the given criteria.", "Get the relative path.\n\n@return the relative path", "Returns the coupon payment of the period with the given index. The analytic model is needed in case of floating bonds.\n\n@param periodIndex The index of the period of interest.\n@param model The model under which the product is valued.\n@return The value of the coupon payment in the given period." ]
private FieldDescriptor getFldFromJoin(TableAlias aTableAlias, String aColName) { FieldDescriptor fld = null; // Search Join Structure for attribute if (aTableAlias.joins != null) { Iterator itr = aTableAlias.joins.iterator(); while (itr.hasNext()) { Join join = (Join) itr.next(); ClassDescriptor cld = join.right.cld; if (cld != null) { fld = cld.getFieldDescriptorByName(aColName); if (fld != null) { break; } } } } return fld; }
[ "Get FieldDescriptor from joined superclass." ]
[ "Creates a remove operation.\n\n@param address the address for the operation\n@param recursive {@code true} if the remove should be recursive, otherwise {@code false}\n\n@return the operation", "Finds the most recent dump of the given type that is actually available.\n\n@param dumpContentType\nthe type of the dump to look for\n@return most recent main dump or null if no such dump exists", "Combines weighted crf with this crf\n\n@param crf\n@param weight", "This method is called to format a time value.\n\n@param value time value\n@return formatted time value", "Returns the screen width in pixels\n\n@param context is the context to get the resources\n@return the screen width in pixels", "Formats a resource type.\n\n@param resource MPXJ resource\n@return Primavera resource type", "Retrieve a UUID in the form required by Primavera PMXML.\n\n@param guid UUID instance\n@return formatted UUID", "Iterates through the range of prefixes in this range instance using the given prefix length.\n\n@param prefixLength\n@return", "Closes the Netty Channel and releases all resources" ]
public static final CurrencySymbolPosition parseCurrencySymbolPosition(String value) { CurrencySymbolPosition result = MAP_TO_CURRENCY_SYMBOL_POSITION.get(value); result = result == null ? CurrencySymbolPosition.BEFORE_WITH_SPACE : result; return result; }
[ "Parse a currency symbol position from a string representation.\n\n@param value String representation\n@return CurrencySymbolPosition instance" ]
[ "Stops the processing and prints the final time.", "Stop listening for device announcements. Also discard any announcements which had been received, and\nnotify any registered listeners that those devices have been lost.", "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 the sub registry for the domain.\n\n@param range the version range\n@return the sub registry", "Stores an new entry in the cache.", "Add tags to a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param tags\nThe tags\n@throws FlickrException", "Consumes the next character in the request, checking that it matches the\nexpected one. This method should be used when the", "Converts the provided object to a date, if possible.\n\n@param date the date.\n\n@return the date as {@link java.util.Date}", "Set the minimum date limit." ]
public static Result generate(@Nonnull final String code, @Nonnull final ImmutableSettings settings) { Check.notNull(code, "code"); final ImmutableSettings.Builder settingsBuilder = new ImmutableSettings.Builder(Check.notNull(settings, "settings")); final InterfaceAnalysis analysis = InterfaceAnalyzer.analyze(code); final Clazz clazz = scaffoldClazz(analysis, settings); // immutable settings settingsBuilder.fields(clazz.getFields()); settingsBuilder.immutableName(clazz.getName()); settingsBuilder.imports(clazz.getImports()); final Interface definition = new Interface(new Type(clazz.getPackage(), analysis.getInterfaceName(), GenericDeclaration.UNDEFINED)); settingsBuilder.mainInterface(definition); settingsBuilder.interfaces(clazz.getInterfaces()); settingsBuilder.packageDeclaration(clazz.getPackage()); final String implementationCode = SourceCodeFormatter.format(ImmutableObjectRenderer.toString(clazz, settingsBuilder.build())); final String testCode = SourceCodeFormatter.format(ImmutableObjectTestRenderer.toString(clazz, settingsBuilder.build())); return new Result(implementationCode, testCode); }
[ "The specified interface must not contain methods, that changes the state of this object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@param settings\nsettings to generate code\n@return generated source code as string in a result wrapper" ]
[ "Get the present keys of all entries with a given type, checking hereby if assignable.\n\n@param type The attribute type, not null.\n@return all present keys of attributes being assignable to the type, never null.", "Returns the default conversion for the given java type.\n\n@param javaType The qualified java type\n@return The default conversion or <code>null</code> if there is no default conversion for the type", "Searches for commas in the set of tokens. Used for inputs to functions.\n\nIgnore comma's which are inside a [ ] block\n\n@return List of output tokens between the commas", "Issue the database statements to drop the table associated with a dao.\n\n@param dao\nAssociated dao.\n@return The number of statements executed to do so.", "return a prepared Insert Statement fitting for the given ClassDescriptor", "Updates the options panel for a special configuration.\n@param gitConfig the git configuration.", "Starts the compressor.", "Specify the class represented by this `ClassNode` is annotated\nby an annotation class specified by the name\n@param name the name of the annotation class\n@return this `ClassNode` instance", "Handle slop for nodes that are no longer part of the cluster. It may not\nalways be the case. For example, shrinking a zone or deleting a store." ]
public void removeHoursFromDay(ProjectCalendarHours hours) { if (hours.getParentCalendar() != this) { throw new IllegalArgumentException(); } m_hours[hours.getDay().getValue() - 1] = null; }
[ "Removes a set of calendar hours from the day to which they\nare currently attached.\n\n@param hours calendar hours instance" ]
[ "Read the table headers. This allows us to break the file into chunks\nrepresenting the individual tables.\n\n@param is input stream\n@return list of tables in the file", "Start the host controller services.\n\n@throws Exception", "low level http operations", "Checks a returned Javascript value where we expect a boolean but could\nget null.\n\n@param val The value from Javascript to be checked.\n@param def The default return value, which can be null.\n@return The actual value, or if null, returns false.", "Start the initialization.\n\n@param id\n@param manager\n@param bootstrap\n@return the initialized Weld container", "Grab random holiday from the equivalence class that falls between the two dates\n\n@param earliest the earliest date parameter as defined in the model\n@param latest the latest date parameter as defined in the model\n@return a holiday that falls between the dates", "Adds the given value to the set.\n\n@return true if the value was actually new", "Calculate Median value.\n@param values Values.\n@return Median.", "Given a date represented by a Date instance, set the time\ncomponent of the date based on the hours and minutes of the\ntime supplied by the Date instance.\n\n@param date Date instance representing the date\n@param canonicalTime Date instance representing the time of day\n@return new Date instance with the required time set" ]
private boolean validate(CmsFavoriteEntry entry) { try { String siteRoot = entry.getSiteRoot(); if (!m_okSiteRoots.contains(siteRoot)) { m_rootCms.readResource(siteRoot); m_okSiteRoots.add(siteRoot); } CmsUUID project = entry.getProjectId(); if (!m_okProjects.contains(project)) { m_cms.readProject(project); m_okProjects.add(project); } for (CmsUUID id : Arrays.asList(entry.getDetailId(), entry.getStructureId())) { if ((id != null) && !m_okStructureIds.contains(id)) { m_cms.readResource(id, CmsResourceFilter.IGNORE_EXPIRATION.addRequireVisible()); m_okStructureIds.add(id); } } return true; } catch (Exception e) { LOG.info("Favorite entry validation failed: " + e.getLocalizedMessage(), e); return false; } }
[ "Validates a favorite entry.\n\n<p>If the favorite entry references a resource or project that can't be read, this will return false.\n\n@param entry the favorite entry\n@return the" ]
[ "Use this API to update csparameter.", "Detach a scope from its parent, this will trigger the garbage collection of this scope and it's\nsub-scopes\nif they are not referenced outside of Toothpick.\n\n@param name the name of the scope to close.", "Loads the localization for the current locale from a bundle of type xmlvfsbundle.\nIt assumes, the content has already been unmarshalled before.\n@param locale the locale for which the localization should be loaded", "Computes the p=1 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm.", "Find Flickr Places information by Place ID.\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link #getInfo(String, String)} instead.\n@param placeId\n@return A Location\n@throws FlickrException", "Sets the value of the given variable\n\n@param name the name of the variable to set\n@param value the new value for the given variable", "Joins the given ints using the given separator into a single string.\n\n@return the joined string or an empty string if the int array is null", "returns IsolationLevel literal as matching\nto the corresponding id\n@return the IsolationLevel literal", "Indicates that contextual session bean instance has been constructed." ]
public static void main(String[] args) throws Exception { StringUtils.printErrInvocationString("CMMClassifier", args); Properties props = StringUtils.argsToProperties(args); CMMClassifier cmm = new CMMClassifier<CoreLabel>(props); String testFile = cmm.flags.testFile; String textFile = cmm.flags.textFile; String loadPath = cmm.flags.loadClassifier; String serializeTo = cmm.flags.serializeTo; // cmm.crossValidateTrainAndTest(trainFile); if (loadPath != null) { cmm.loadClassifierNoExceptions(loadPath, props); } else if (cmm.flags.loadJarClassifier != null) { cmm.loadJarClassifier(cmm.flags.loadJarClassifier, props); } else if (cmm.flags.trainFile != null) { if (cmm.flags.biasedTrainFile != null) { cmm.trainSemiSup(); } else { cmm.train(); } } else { cmm.loadDefaultClassifier(); } if (serializeTo != null) { cmm.serializeClassifier(serializeTo); } if (testFile != null) { cmm.classifyAndWriteAnswers(testFile, cmm.makeReaderAndWriter()); } else if (cmm.flags.testFiles != null) { cmm.classifyAndWriteAnswers(cmm.flags.baseTestDir, cmm.flags.testFiles, cmm.makeReaderAndWriter()); } if (textFile != null) { DocumentReaderAndWriter readerAndWriter = new PlainTextDocumentReaderAndWriter(); cmm.classifyAndWriteAnswers(textFile, readerAndWriter); } }
[ "Command-line version of the classifier. See the class\ncomments for examples of use, and SeqClassifierFlags\nfor more information on supported flags." ]
[ "Set the depth of the cursor.\nThis is the length of the ray from the origin\nto the cursor.\n@param depth default cursor depth", "Generate a currency format.\n\n@param position currency symbol position\n@return currency format", "Adds all rows from the TSV file specified, using the provided delimiter and null value.\n\n@param file The file to read the data from.\n@param delimiter A column delimiter.\n@param nullValue Value to be treated as null in the source data.\n@return {@code this}", "Function to perform forward pooling", "get the TypeArgSignature corresponding to given type\n\n@param type\n@return", "Rotate root widget to make it facing to the front of the scene", "Returns a list that contains all the entries of the given iterator in the same order.\n\n@param iterator\nthe iterator. May not be <code>null</code>.\n@return a list with the same entries as the given iterator. Never <code>null</code>.", "Returns a BoxStoragePolicyAssignment information.\n@param api the API connection to be used by the resource.\n@param resolvedForType the assigned entity type for the storage policy.\n@param resolvedForID the assigned entity id for the storage policy.\n@return information about this {@link BoxStoragePolicyAssignment}.", "Pops resource requests off the queue until queue is empty or an unexpired\nresource request is found. Invokes .handleTimeout on all expired resource\nrequests popped off the queue.\n\n@return null or a valid ResourceRequest" ]
public final void notifyFooterItemInserted(int position) { int newHeaderItemCount = getHeaderItemCount(); int newContentItemCount = getContentItemCount(); int newFooterItemCount = getFooterItemCount(); // if (position < 0 || position >= newFooterItemCount) { // throw new IndexOutOfBoundsException("The given position " + position // + " is not within the position bounds for footer items [0 - " // + (newFooterItemCount - 1) + "]."); // } notifyItemInserted(position + newHeaderItemCount + newContentItemCount); }
[ "Notifies that a footer item is inserted.\n\n@param position the position of the content item." ]
[ "Gets the positive integer.\n\n@param number the number\n@return the positive integer", "Calculate the color using the supplied angle.\n\n@param angle The selected color's position expressed as angle (in rad).\n\n@return The ARGB value of the color on the color wheel at the specified\nangle.", "If the `invokerClass` specified is singleton, or without field or all fields are\nstateless, then return an instance of the invoker class. Otherwise, return null\n@param invokerClass the invoker class\n@param app the app\n@return an instance of the invokerClass or `null` if invoker class is stateful class", "Handle http worker response.\n\n@param respOnSingleReq\nthe my response\n@throws Exception\nthe exception", "Compare the controlDOM and testDOM and save and return the differences in a list.\n\n@return list with differences", "Takes a model and an SCXMLFrontier and decomposes the Frontier into a Map of Strings to Strings\nThese strings can be sent over a network to get a Frontier past a 'gap'\n\n@param frontier the Frontier\n@param modelText the model\n@return the map of strings representing a decomposition", "Based on a provided locale return a SoyMsgBundle file.\n\nIf a passed in locale object is \"Optional.absent()\",\nthe implementation will return Optional.absent() as well\n@param locale - maybe locale\n@return maybe soy msg bundle", "Select the specific vertex and fragment shader to use.\n\nThe shader template is used to generate the sources for the vertex and\nfragment shader based on the vertex, material and light properties. This\nfunction may compile the shader if it does not already exist.\n\n@param context\nGVRContext\n@param rdata\nrenderable entity with mesh and rendering options\n@param scene\nlist of light sources", "Splits data into blocks, adds error correction and then interleaves the blocks and error correction data." ]
public List<TimephasedWork> getCompleteWork(ProjectCalendar calendar, ResourceAssignment resourceAssignment, byte[] data) { LinkedList<TimephasedWork> list = new LinkedList<TimephasedWork>(); if (calendar != null && data != null && data.length > 2 && MPPUtility.getShort(data, 0) > 0) { Date startDate = resourceAssignment.getStart(); double finishTime = MPPUtility.getInt(data, 24); int blockCount = MPPUtility.getShort(data, 0); double previousCumulativeWork = 0; TimephasedWork previousAssignment = null; int index = 32; int currentBlock = 0; while (currentBlock < blockCount && index + 20 <= data.length) { double time = MPPUtility.getInt(data, index + 0); // If the start of this block is before the start of the assignment, or after the end of the assignment // the values don't make sense, so we'll just set the start of this block to be the start of the assignment. // This deals with an issue where odd timephased data like this was causing an MPP file to be read // extremely slowly. if (time < 0 || time > finishTime) { time = 0; } else { time /= 80; } Duration startWork = Duration.getInstance(time, TimeUnit.MINUTES); double currentCumulativeWork = (long) MPPUtility.getDouble(data, index + 4); double assignmentDuration = currentCumulativeWork - previousCumulativeWork; previousCumulativeWork = currentCumulativeWork; assignmentDuration /= 1000; Duration totalWork = Duration.getInstance(assignmentDuration, TimeUnit.MINUTES); time = (long) MPPUtility.getDouble(data, index + 12); time /= 125; time *= 6; Duration workPerDay = Duration.getInstance(time, TimeUnit.MINUTES); Date start; if (startWork.getDuration() == 0) { start = startDate; } else { start = calendar.getDate(startDate, startWork, true); } TimephasedWork assignment = new TimephasedWork(); assignment.setStart(start); assignment.setAmountPerDay(workPerDay); assignment.setTotalAmount(totalWork); if (previousAssignment != null) { Date finish = calendar.getDate(startDate, startWork, false); previousAssignment.setFinish(finish); if (previousAssignment.getStart().getTime() == previousAssignment.getFinish().getTime()) { list.removeLast(); } } list.add(assignment); previousAssignment = assignment; index += 20; ++currentBlock; } if (previousAssignment != null) { Duration finishWork = Duration.getInstance(finishTime / 80, TimeUnit.MINUTES); Date finish = calendar.getDate(startDate, finishWork, false); previousAssignment.setFinish(finish); if (previousAssignment.getStart().getTime() == previousAssignment.getFinish().getTime()) { list.removeLast(); } } } return list; }
[ "Given a block of data representing completed work, this method will\nretrieve a set of TimephasedWork instances which represent\nthe day by day work carried out for a specific resource assignment.\n\n@param calendar calendar on which date calculations are based\n@param resourceAssignment resource assignment\n@param data completed work data block\n@return list of TimephasedWork instances" ]
[ "Creates a Parameter\n\n@param name the name\n@param value the value, or <code>null</code>\n@return a name-value pair representing the arguments", "This method writes resource data to a Planner file.", "Logs the time taken by this rule, and attaches this to the total for the RuleProvider", "Create a KnowledgeBuilderConfiguration on which properties can be set. Use\nthe given properties file and ClassLoader - either of which can be null.\n@return\nThe KnowledgeBuilderConfiguration.", "Adds an additional site link to the constructed document.\n\n@param title\nthe title of the linked page\n@param siteKey\nidentifier of the site, e.g., \"enwiki\"\n@param badges\none or more badges", "Turn a resultset into EndpointOverride\n\n@param results results containing relevant information\n@return EndpointOverride\n@throws Exception exception", "Called when a ParentViewHolder has triggered an expansion for it's parent\n\n@param flatParentPosition the position of the parent that is calling to be expanded", "Split a module Id to get the module name\n@param moduleId\n@return String", "Add a cause to the backtrace.\n\n@param cause\nthe cause\n@param bTrace\nthe backtrace list" ]
public void deleteLicense(final String licName) { final DbLicense dbLicense = getLicense(licName); repoHandler.deleteLicense(dbLicense.getName()); final FiltersHolder filters = new FiltersHolder(); final LicenseIdFilter licenseIdFilter = new LicenseIdFilter(licName); filters.addFilter(licenseIdFilter); for (final DbArtifact artifact : repoHandler.getArtifacts(filters)) { repoHandler.removeLicenseFromArtifact(artifact, licName, this); } }
[ "Delete a license from the repository\n\n@param licName The name of the license to remove" ]
[ "Migrate to Jenkins \"Credentials\" plugin from the old credential implementation", "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.", "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", "Determine the consistency level of a key\n\n@param versionNodeSetMap A map that maps version to set of PrefixNodes\n@param replicationFactor Total replication factor for the set of clusters\n@return ConsistencyLevel Enum", "Retrieve from the parent pom the path to the modules of the project", "Utility function that fetches system store definitions\n\n@return The map container that maps store names to store definitions", "this remove the linebreak.\n\n@param input\nthe input\n@param patternStr\nthe pattern str\n@return the string", "Checks to see if all the diagonal elements in the matrix are positive.\n\n@param a A matrix. Not modified.\n@return true if all the diagonal elements are positive, false otherwise.", "If users want to implement clone on all their objects, we can use this\nto make copies. This is hazardous as user may mess it up, but it is also\npotentially the fastest way of making a copy.\n\nUsually the OjbCloneable interface should just be delegating to the clone()\noperation that the user has implemented.\n\n@see org.apache.ojb.otm.copy.ObjectCopyStrategy#copy(Object)" ]
protected void copyFile(File outputDirectory, File sourceFile, String targetFileName) throws IOException { InputStream fileStream = new FileInputStream(sourceFile); try { copyStream(outputDirectory, fileStream, targetFileName); } finally { fileStream.close(); } }
[ "Copy a single named file to the output directory.\n@param outputDirectory The destination directory for the copied resource.\n@param sourceFile The path of the file to copy.\n@param targetFileName The name of the file created in {@literal outputDirectory}.\n@throws IOException If the file cannot be copied." ]
[ "Set a friendly name for a client\n\n@param profileId profileId of the client\n@param clientUUID UUID of the client\n@param friendlyName friendly name of the client\n@return return Client object or null\n@throws Exception exception", "Kicks off an animation that will result in the pointer being centered in the\npie slice of the currently selected item.", "Loads treebank data from first argument and prints it.\n\n@param args Array of command-line arguments: specifies a filename", "Resizes an image to the specified width, changing width in the same proportion\n@param originalImage Image in memory\n@param widthOut The width to resize\n@return New Image in memory", "Convert an Object to a Timestamp, without an Exception", "Throws an exception if at least one results directory is missing.", "Ping route Ping the ESI routers\n\n@return ApiResponse&lt;String&gt;\n@throws ApiException\nIf fail to call the API, e.g. server error or cannot\ndeserialize the response body", "Returns the logger name that should be used in the log manager.\n\n@param name the name of the logger from the resource\n\n@return the name of the logger", "Run through the map and remove any references that have been null'd out by the GC." ]
public static boolean distributeAndCheckResponse(DistributionBuilder distributionBuilder, ArtifactoryBuildInfoClient client, TaskListener listener, String buildName, String buildNumber, boolean dryRun) throws IOException { // do a dry run first listener.getLogger().println("Performing dry run distribution (no changes are made during dry run) ..."); if (!distribute(distributionBuilder, client, listener, buildName, buildNumber, true)) { return false; } listener.getLogger().println("Dry run finished successfully"); if (!dryRun) { listener.getLogger().println("Performing distribution ..."); if (!distribute(distributionBuilder, client, listener, buildName, buildNumber, false)) { return false; } listener.getLogger().println("Distribution completed successfully!"); } return true; }
[ "Two stage distribution, dry run and actual promotion to verify correctness.\n\n@param distributionBuilder\n@param client\n@param listener\n@param buildName\n@param buildNumber\n@throws IOException" ]
[ "Discard the changes.", "This only gets half of the EnabledEndpoint from a JDBC ResultSet\nGetting the method for the override id requires an additional SQL query and needs to be called after\nthe SQL connection is released\n\n@param result result to scan for endpoint\n@return EnabledEndpoint\n@throws Exception exception", "Get User application properties\nGet application properties of a user\n@param userId User Id (required)\n@param aid Application ID (optional)\n@return PropertiesEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body", "Get the root path where the build is located, the project may be checked out to\na sub-directory from the root workspace location.\n\n@param globalEnv EnvVars to take the workspace from, if workspace is not found\nthen it is take from project.getSomeWorkspace()\n@return The location of the root of the Gradle build.\n@throws IOException\n@throws InterruptedException", "Notifies that multiple header items are changed.\n\n@param positionStart the position.\n@param itemCount the item count.", "Returns a List of all of the values in the Map whose key matches an entry in the nameMapping array.\n\n@param map\nthe map\n@param nameMapping\nthe keys of the Map values to add to the List\n@return a List of all of the values in the Map whose key matches an entry in the nameMapping array\n@throws NullPointerException\nif map or nameMapping is null", "Set a proxy with authentication for REST-requests.\n\n@param proxyHost\n@param proxyPort\n@param username\n@param password", "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", "Adds the parent package to the java.protocol.handler.pkgs system property." ]
public AT_Row setPaddingLeft(int paddingLeft) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingLeft(paddingLeft); } } return this; }
[ "Sets the left padding for all cells in the row.\n@param paddingLeft new padding, ignored if smaller than 0\n@return this to allow chaining" ]
[ "Get a property as a string or defaultValue.\n\n@param key the property name\n@param defaultValue the default value", "Convert an Object to a Timestamp.", "Add query part for the facet, without filters.\n@param query The query part that is extended for the facet", "Returns the export format indicated in the result-type parameter \"layoutManager\"\n@param _invocation\n@return", "Returns the key for the best matching local-specific property version.\n\n@param propertiesMap the \"raw\" property map\n@param key the name of the property to search for\n@param locale the locale to search for\n\n@return the key for the best matching local-specific property version.", "Cache key calculation.\n@param sql\n@param resultSetType\n@param resultSetConcurrency\n@return cache key", "Adds a file to your assembly but automatically genarates the name of the file.\n\n@param inputStream {@link InputStream} the file to be uploaded.", "Assigns this retention policy to a metadata template, optionally with certain field values.\n@param templateID the ID of the metadata template to apply to.\n@param fieldFilters optional field value filters.\n@return info about the created assignment.", "Generates a column for the given field and adds it to the table.\n\n@param fieldDef The field\n@param tableDef The table\n@return The column def" ]
protected void internalReleaseConnection(ConnectionHandle connectionHandle) throws SQLException { if (!this.cachedPoolStrategy){ connectionHandle.clearStatementCaches(false); } if (connectionHandle.getReplayLog() != null){ connectionHandle.getReplayLog().clear(); connectionHandle.recoveryResult.getReplaceTarget().clear(); } if (connectionHandle.isExpired() || (!this.poolShuttingDown && connectionHandle.isPossiblyBroken() && !isConnectionHandleAlive(connectionHandle))){ if (connectionHandle.isExpired()) { connectionHandle.internalClose(); } ConnectionPartition connectionPartition = connectionHandle.getOriginatingPartition(); postDestroyConnection(connectionHandle); maybeSignalForMoreConnections(connectionPartition); connectionHandle.clearStatementCaches(true); return; // don't place back in queue - connection is broken or expired. } connectionHandle.setConnectionLastUsedInMs(System.currentTimeMillis()); if (!this.poolShuttingDown){ putConnectionBackInPartition(connectionHandle); } else { connectionHandle.internalClose(); } }
[ "Release a connection by placing the connection back in the pool.\n@param connectionHandle Connection being released.\n@throws SQLException" ]
[ "AND operation which takes the previous clause and the next clause and AND's them together.", "Creates an element that represents a rectangle drawn at the specified coordinates in the page.\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 DOM element", "Prints dependencies recovered from the methods of a class. A\ndependency is inferred only if another relation between the two\nclasses is not already in the graph.\n@param classes", "Set work connection.\n\n@param db the db setup bean", "Processes the template if the current object on the specified level has a non-empty name.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"", "Converts a number of bytes to a human-readable string\n@param bytes the bytes\n@return the human-readable string", "The token was previously determined as potentially to-be-splitted thus we\nemit additional indentation or dedenting tokens.", "Counts one entity. Every once in a while, the current time is checked so\nas to print an intermediate report roughly every ten seconds.", "Adds the correct load instruction based on the type descriptor\n\n@param code the bytecode to add the instruction to\n@param type the type of the variable\n@param variable the variable number" ]
public static base_response delete(nitro_service client, String sitename) throws Exception { gslbsite deleteresource = new gslbsite(); deleteresource.sitename = sitename; return deleteresource.delete_resource(client); }
[ "Use this API to delete gslbsite of given name." ]
[ "Creates the default editor state for editing a bundle with descriptor.\n@return the default editor state for editing a bundle with descriptor.", "Retrieves a vertex attribute as a float array.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>float</i>\n@see #setFloatVec(String, FloatBuffer)\n@see #getFloatArray(String)", "Adds the absolute path to command.\n\n@param command the command to add the arguments to.\n@param typeName the type of directory.\n@param propertyName the name of the property.\n@param properties the properties where the path may already be defined.\n@param directoryGrouping the directory group type.\n@param typeDir the domain level directory for the given directory type; to be used for by-type grouping\n@param serverDir the root directory for the server, to be used for 'by-server' grouping\n@return the absolute path that was added.", "Prep for a new connection\n@return if stats are enabled, return the nanoTime when this connection was requested.\n@throws SQLException", "Write a single resource.\n\n@param mpxj Resource instance", "This method extracts task data from an MSPDI file.\n\n@param project Root node of the MSPDI file", "Carry out any post-processing required to tidy up\nthe data read from the database.", "Initialize the field factories for the messages table.", "The quick way to detect for a tier of devices.\nThis method detects for devices which are likely to be capable\nof viewing CSS content optimized for the iPhone,\nbut may not necessarily support JavaScript.\nExcludes all iPhone Tier devices.\n@return detection of any device in the 'Rich CSS' Tier" ]
public static base_response add(nitro_service client, dnstxtrec resource) throws Exception { dnstxtrec addresource = new dnstxtrec(); addresource.domain = resource.domain; addresource.String = resource.String; addresource.ttl = resource.ttl; return addresource.add_resource(client); }
[ "Use this API to add dnstxtrec." ]
[ "a specialized version of solve that avoid additional checks that are not needed.", "Prepare the options by adding additional information to them.\n@see <a href=\"https://docs.mongodb.com/manual/core/index-ttl/\">TTL Indexes</a>", "Read the relationships for an individual GanttProject task.\n\n@param gpTask GanttProject task", "Get a new token.\n\n@return 14 character String", "Use this API to add lbroute.", "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.", "Addes the current member as a nested object.\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\"", "Resets the calendar", "test, how many times the group was present in the list of groups." ]
public void cullHistory(final int profileId, final String clientUUID, final int limit) throws Exception { //Allow only 1 delete thread to run if (threadActive) { return; } threadActive = true; //Create a thread so proxy will continue to work during long delete Thread t1 = new Thread(new Runnable() { @Override public void run() { PreparedStatement statement = null; try (Connection sqlConnection = sqlService.getConnection()) { String sqlQuery = "SELECT COUNT(" + Constants.GENERIC_ID + ") FROM " + Constants.DB_TABLE_HISTORY + " "; // see if profileId is set or not (-1) if (profileId != -1) { sqlQuery += "WHERE " + Constants.GENERIC_PROFILE_ID + "=" + profileId + " "; } if (clientUUID != null && clientUUID.compareTo("") != 0) { sqlQuery += "AND " + Constants.GENERIC_CLIENT_UUID + "='" + clientUUID + "' "; } sqlQuery += ";"; Statement query = sqlConnection.createStatement(); ResultSet results = query.executeQuery(sqlQuery); if (results.next()) { if (results.getInt("COUNT(" + Constants.GENERIC_ID + ")") < (limit + 10000)) { return; } } //Find the last item in the table statement = sqlConnection.prepareStatement("SELECT " + Constants.GENERIC_ID + " FROM " + Constants.DB_TABLE_HISTORY + " WHERE " + Constants.CLIENT_CLIENT_UUID + " = \'" + clientUUID + "\'" + " AND " + Constants.CLIENT_PROFILE_ID + " = " + profileId + " ORDER BY " + Constants.GENERIC_ID + " ASC LIMIT 1"); ResultSet resultSet = statement.executeQuery(); if (resultSet.next()) { int currentSpot = resultSet.getInt(Constants.GENERIC_ID) + 100; int finalDelete = currentSpot + 10000; //Delete 100 items at a time until 10000 are deleted //Do this so table is unlocked frequently to allow other proxy items to access it while (currentSpot < finalDelete) { PreparedStatement deleteStatement = sqlConnection.prepareStatement("DELETE FROM " + Constants.DB_TABLE_HISTORY + " WHERE " + Constants.CLIENT_CLIENT_UUID + " = \'" + clientUUID + "\'" + " AND " + Constants.CLIENT_PROFILE_ID + " = " + profileId + " AND " + Constants.GENERIC_ID + " < " + currentSpot); deleteStatement.executeUpdate(); currentSpot += 100; } } } catch (Exception e) { e.printStackTrace(); } finally { try { threadActive = false; if (statement != null) { statement.close(); } } catch (Exception e) { } } } }); t1.start(); }
[ "Removes old entries in the history table for the given profile and client UUID\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param limit Maximum number of history entries to remove\n@throws Exception exception" ]
[ "Returns the current download state for a download request.\n\n@param downloadId\n@return", "Removes metadata related to rebalancing.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeIds Node ids to clear metadata after rebalancing", "Read exactly buffer.length bytes from the stream into the buffer\n\n@param stream The stream to read from\n@param buffer The buffer to read into", "Was this beat sent by the current tempo master?\n\n@return {@code true} if the device that sent this beat is the master\n@throws IllegalStateException if the {@link VirtualCdj} is not running", "The digits were stored as a hex value, thix switches them to an octal value.\n\n@param currentHexValue\n@param digitCount\n@return", "This method is used to calculate the duration of work between two fixed\ndates according to the work schedule defined in the named calendar. The\ncalendar used is the \"Standard\" calendar. If this calendar does not exist,\nand exception will be thrown.\n\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object\n@throws MPXJException normally when no Standard calendar is available\n@deprecated use calendar.getDuration(startDate, endDate)", "Adds a redirect URL to the specified profile ID\n\n@param model\n@param profileId\n@param srcUrl\n@param destUrl\n@param hostHeader\n@return\n@throws Exception", "Convenience method to allow a cause. Grrrr.", "Code common to both XER and database readers to extract\ncurrency format data.\n\n@param row row containing currency data" ]
public static void acceptsUrlMultiple(OptionParser parser) { parser.acceptsAll(Arrays.asList(OPT_U, OPT_URL), "coordinator bootstrap urls") .withRequiredArg() .describedAs("url-list") .withValuesSeparatedBy(',') .ofType(String.class); }
[ "Adds OPT_U | OPT_URL option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional" ]
[ "Use this API to fetch gslbservice resource of given name .", "Adds a child to this node and sets this node as its parent node.\n\n@param node The node to add.", "Method used to extract data from the block of properties and\ninsert the key value pair into a map.\n\n@param data block of property data\n@param previousItemOffset previous offset\n@param previousItemKey item key\n@param itemOffset current item offset", "Get the ver\n\n@param id\n@return", "Default settings set type loader to ClasspathTypeLoader if not set before.", "performs an INSERT operation against RDBMS.\n@param obj The Object to be inserted as a row of the underlying table.\n@param cld ClassDescriptor providing mapping information.", "Use this API to update callhome.", "returns a unique String for given field.\nthe returned uid is unique accross all tables.", "Use this API to update clusternodegroup." ]
private void addSuperClasses(Integer directSuperClass, ClassRecord subClassRecord) { if (subClassRecord.superClasses.contains(directSuperClass)) { return; } subClassRecord.superClasses.add(directSuperClass); ClassRecord superClassRecord = getClassRecord(directSuperClass); if (superClassRecord == null) { return; } for (Integer superClass : superClassRecord.directSuperClasses) { addSuperClasses(superClass, subClassRecord); } }
[ "Recursively add indirect subclasses to a class record.\n\n@param directSuperClass\nthe superclass to add (together with its own superclasses)\n@param subClassRecord\nthe subclass to add to" ]
[ "Determines whether the given documentation part contains the specified tag with the given parameter having the\ngiven value.\n\n@param doc The documentation part\n@param tagName The tag to be searched for\n@param paramName The parameter that the tag is required to have\n@param paramValue The value of the parameter\n@return boolean Whether the documentation part has the tag and parameter", "Construct an InterestRateSwapProductDescriptor from a node in a FpML file.\n\n@param trade The node containing the swap.\n@return Descriptor of the swap.", "Publish the bundle resources directly.", "Put a new resource description into the index, or remove one if the delta has no new description. A delta for a\nparticular URI may be registered more than once; overwriting any earlier registration.\n\n@param delta\nThe resource change.\n@since 2.9", "Return the available format ids.", "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", "Add an addon to the app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param addonName Addon name. See {@link #listAllAddons} to get a list of addons that can be used.\n@return The request object", "Use this API to fetch all the appfwsignatures resources that are configured on netscaler.", "Adds the content info for the collected resources used in the \"This page\" publish dialog." ]
public static boolean nullSafeEquals(final Object obj1, final Object obj2) { return ((obj1 == null && obj2 == null) || (obj1 != null && obj2 != null && obj1.equals(obj2))); }
[ "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" ]
[ "Deploys application reading resources from specified InputStream\n\n@param inputStream where resources are read\n@throws IOException", "Adds a collection of listeners to the current project.\n\n@param listeners collection of listeners", "Will auto format the given string to provide support for pickadate.js formats.", "Checks if a parameter exists. If it exists, it is left untouched. If it doesn't, it is created. Only works for parameters which key\nis unique. Must be called from within an open transaction.", "Only converts the B matrix and passes that onto solve. Te result is then copied into\nthe input 'X' matrix.\n\n@param B A matrix &real; <sup>m &times; p</sup>. Not modified.\n@param X A matrix &real; <sup>n &times; p</sup>, where the solution is written to. Modified.", "Creates a map of work pattern rows indexed by the primary key.\n\n@param rows work pattern rows\n@return work pattern map", "Sort by time bucket, then backup count, and by compression state.", "Call rollback on the underlying connection.", "Checks if a document exist in the database.\n\n@param id The document _id field.\n@return true If the document is found, false otherwise." ]
public boolean canBypassConvert(TypeDescriptor sourceType, TypeDescriptor targetType) { Assert.notNull(targetType, "The targetType to convert to cannot be null"); if (sourceType == null) { return true; } GenericConverter converter = getConverter(sourceType, targetType); return (converter == NO_OP_CONVERTER); }
[ "Returns true if conversion between the sourceType and targetType can be bypassed.\nMore precisely this method will return true if objects of sourceType can be\nconverted to the targetType by returning the source object unchanged.\n@param sourceType context about the source type to convert from (may be null if source is null)\n@param targetType context about the target type to convert to (required)\n@return true if conversion can be bypassed\n@throws IllegalArgumentException if targetType is null" ]
[ "Returns true if the predicate is true for all pixels in the image.\n\n@param predicate a predicate function that accepts 3 parameters - the x,y coordinate and the pixel at that coordinate\n@return true if f holds for at least one pixel", "Log unexpected column structure.", "Copies a classworlds file to a temporary location either on the local filesystem or on a slave depending on the\nnode type.\n\n@return The path of the classworlds.conf file", "Mapping originator.\n\n@param originator the originator\n@return the originator type", "Show a toast-like message for the specified duration\n\n@param message\n@param duration in seconds", "Print out the template information that the client needs for performing a request.\n\n@param json the writer to write the information to.", "Executes the sequence of operations", "Use this API to fetch all the dnssuffix resources that are configured on netscaler.", "Convert an operation for deployment overlays to be executed on local servers.\nSince this might be called in the case of redeployment of affected deployments, we need to take into account\nthe composite op resulting from such a transformation\n@see AffectedDeploymentOverlay#redeployLinksAndTransformOperationForDomain\n@param operation\n@param host\n@return" ]
public static IndexedContainer getPrincipalContainer( CmsObject cms, List<? extends I_CmsPrincipal> list, String captionID, String descID, String iconID, String ouID, String icon, List<FontIcon> iconList) { IndexedContainer res = new IndexedContainer(); res.addContainerProperty(captionID, String.class, ""); res.addContainerProperty(ouID, String.class, ""); res.addContainerProperty(iconID, FontIcon.class, new CmsCssIcon(icon)); if (descID != null) { res.addContainerProperty(descID, String.class, ""); } for (I_CmsPrincipal group : list) { Item item = res.addItem(group); item.getItemProperty(captionID).setValue(group.getSimpleName()); item.getItemProperty(ouID).setValue(group.getOuFqn()); if (descID != null) { item.getItemProperty(descID).setValue(group.getDescription(A_CmsUI.get().getLocale())); } } for (int i = 0; i < iconList.size(); i++) { res.getItem(res.getIdByIndex(i)).getItemProperty(iconID).setValue(iconList.get(i)); } return res; }
[ "Get container for principal.\n\n@param cms cmsobject\n@param list of principals\n@param captionID caption id\n@param descID description id\n@param iconID icon id\n@param ouID ou id\n@param icon icon\n@param iconList iconlist\n@return indexedcontainer" ]
[ "Populates a resource.\n\n@param resource resource instance\n@param record MPX record\n@throws MPXJException", "Transform the root bone of the pose by the given matrix.\n@param trans matrix to transform the pose by.", "Recursively searches for formatting annotations.\n\n@param visitedTypes used to prevent an endless loop\n@param parameterName", "Processes a stencilset template file\n@throws IOException", "Create a MfClientHttpRequestFactory for adding the specified headers.\n\n@param requestFactory the basic request factory. It should be unmodified and just wrapped with\na proxy class.\n@param matchers The matchers.\n@param headers The headers.\n@return", "Adds a command class to the list of supported command classes by this\nendpoint. Does nothing if command class is already added.\n@param commandClass the command class instance to add.", "Return whether or not the field value passed in is the default value for the type of the field. Null will return\ntrue.", "Makes a DocumentReaderAndWriter based on\nflags.plainTextReaderAndWriter. Useful for reading in\nuntokenized text documents or reading plain text from the command\nline. An example of a way to use this would be to return a\nedu.stanford.nlp.wordseg.Sighan2005DocumentReaderAndWriter for\nthe Chinese Segmenter.", "Bean types of a session bean." ]
public List<T> resolveConflicts(List<T> values) { if(values.size() > 1) return values; else return Collections.singletonList(values.get(0)); }
[ "Arbitrarily resolve the inconsistency by choosing the first object if\nthere is one.\n\n@param values The list of objects\n@return A single value, if one exists, taken from the input list." ]
[ "Sets the request body to the contents of a String.\n\n<p>If the contents of the body are large, then it may be more efficient to use an {@link InputStream} instead of\na String. Using a String requires that the entire body be in memory before sending the request.</p>\n\n@param body a String containing the contents of the body.", "Process StepFinishedEvent. Change last added to stepStorage step\nand add it as child of previous step.\n\n@param event to process", "Notification that the process has become unstable.\n\n@return {@code true} if this is a change in status", "Validates the return value\n\n@param instance The instance to validate", "Use this API to fetch gslbvserver_spilloverpolicy_binding resources of given name .", "Returns the index of the eigenvalue which has the smallest magnitude.\n\n@return index of the smallest magnitude eigen value.", "Resolves a path relative to the base path.\n\n@param base the base path\n@param paths paths relative to the base directory\n\n@return the resolved path", "Propagate onEnter events to listeners\n@param hit collision object", "1-D Gaussian kernel.\n\n@param size Kernel size (should be odd), [3, 101].\n@return Returns 1-D Gaussian kernel of the specified size." ]
private Object readKey( FieldDescriptor field, JsonParser parser, DeserializationContext context ) throws IOException { if (parser.getCurrentToken() != JsonToken.FIELD_NAME) { throw reportWrongToken(JsonToken.FIELD_NAME, context, "Expected FIELD_NAME token"); } String fieldName = parser.getCurrentName(); switch (field.getJavaType()) { case INT: // lifted from StdDeserializer since there's no method to call try { return NumberInput.parseInt(fieldName.trim()); } catch (IllegalArgumentException iae) { Number number = (Number) context.handleWeirdStringValue( _valueClass, fieldName.trim(), "not a valid int value" ); return number == null ? 0 : number.intValue(); } case LONG: // lifted from StdDeserializer since there's no method to call try { return NumberInput.parseLong(fieldName.trim()); } catch (IllegalArgumentException iae) { Number number = (Number) context.handleWeirdStringValue( _valueClass, fieldName.trim(), "not a valid long value" ); return number == null ? 0L : number.longValue(); } case BOOLEAN: // lifted from StdDeserializer since there's no method to call String text = fieldName.trim(); if ("true".equals(text) || "True".equals(text)) { return true; } if ("false".equals(text) || "False".equals(text)) { return false; } Boolean b = (Boolean) context.handleWeirdStringValue( _valueClass, text, "only \"true\" or \"false\" recognized" ); return Boolean.TRUE.equals(b); case STRING: return fieldName; case ENUM: EnumValueDescriptor enumValueDescriptor = field.getEnumType().findValueByName(parser.getText()); if (enumValueDescriptor == null && !ignorableEnum(parser.getText().trim(), context)) { throw context.weirdStringException(parser.getText(), field.getEnumType().getClass(), "value not one of declared Enum instance names"); } return enumValueDescriptor; default: throw new IllegalArgumentException("Unexpected map key type: " + field.getJavaType()); } }
[ "Specialized version of readValue just for reading map keys, because the StdDeserializer methods like\n_parseIntPrimitive blow up when the current JsonToken is FIELD_NAME" ]
[ "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", "Dumps a single material property to stdout.\n\n@param property the property", "Find the index of this animation if it is in this animator.\n\n@param findme {@link GVRAnimation} to find.\n@returns 0 based index of animation or -1 if not found\n@see GVRAnimator#addAnimation(GVRAnimation)", "Rename a key for all languages.\n@param oldKey the key to rename\n@param newKey the new key name\n@return <code>true</code> if renaming was successful, <code>false</code> otherwise.", "Sets up internal data structures and creates a copy of the input matrix.\n\n@param A The input matrix. Not modified.", "Filter the URI based on a regular expression.\nCan be combined with an additional file-extension filter.", "Given an AVRO serializer definition, validates if all the avro schemas\nare valid i.e parseable.\n\n@param avroSerDef", "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.", "Method signature without \"public void\" prefix\n\n@return The method signature in String format" ]
synchronized void stop(Integer timeout) { final InternalState required = this.requiredState; if(required != InternalState.STOPPED) { this.requiredState = InternalState.STOPPED; ROOT_LOGGER.stoppingServer(serverName); // Only send the stop operation if the server is started if (internalState == InternalState.SERVER_STARTED) { internalSetState(new ServerStopTask(timeout), internalState, InternalState.PROCESS_STOPPING); } else { transition(false); } } }
[ "Stop a managed server." ]
[ "returns a dynamic Proxy that implements all interfaces of the\nclass described by this ClassDescriptor.\n\n@return Class the dynamically created proxy class", "Use this API to fetch netbridge_vlan_binding resources of given name .", "Read an individual Phoenix task relationship.\n\n@param relation Phoenix task relationship", "Use this API to clear nsconfig.", "Recursively descend through the hierarchy creating tasks.\n\n@param parent parent task\n@param parentName parent name\n@param rows rows to add as tasks to this parent", "Dumps a single material property to stdout.\n\n@param property the property", "Removes all events from table\n\n@param table the table to remove events", "Get the OAuth request token - this is step one of authorization.\n\n@param callbackUrl\noptional callback URL - required for web auth flow, will be set to \"oob\" if not specified.\n@return the {@link OAuth1RequestToken}, store this for when the user returns from the Flickr website.", "Creates a new ServerDetails object for deployer, this will take URL and name from the oldDeployer ServerDetails" ]
protected Element createTextElement(String data, float width) { Element el = createTextElement(width); Text text = doc.createTextNode(data); el.appendChild(text); return el; }
[ "Creates an element that represents a single positioned box containing the specified text string.\n@param data the text string to be contained in the created box.\n@return the resulting DOM element" ]
[ "Creates a combined list of Entries using the provided mapping file, and sorts them by\nfirst by priority, then the number of tokens in the regex.\n\n@param mapping The path to a file of mappings\n@return a sorted list of Entries", "Collect the total times measured by all known named timers of the given\nname. This is useful to add up times that were collected across separate\nthreads.\n\n@param timerName\n@return timer", "Deploys application reading resources from specified InputStream\n\n@param inputStream where resources are read\n@throws IOException", "Check if this path matches the address path.\nAn address matches this address if its path elements match or are valid\nmulti targets for this path elements. Addresses that are equal are matching.\n\n@param address The path to check against this path. If null, this method\nreturns false.\n@return true if the provided path matches, false otherwise.", "Appends a String to the string representation of this number.\n\n@param value a Number\n@param right a String\n@return a String\n@since 1.0", "Reads GIF image from byte array.\n\n@param data containing GIF file.\n@return read status code (0 = no errors).", "Creates a db handling object.\n\n@return The db handling object\n@throws BuildException If the handling is invalid", "Replace full request content.\n\n@param requestContentTemplate\nthe request content template\n@param replacementString\nthe replacement string\n@return the string", "Use this API to link sslcertkey resources." ]
public static appflowglobal_binding get(nitro_service service) throws Exception{ appflowglobal_binding obj = new appflowglobal_binding(); appflowglobal_binding response = (appflowglobal_binding) obj.get_resource(service); return response; }
[ "Use this API to fetch a appflowglobal_binding resource ." ]
[ "Executes a method on the server asynchronously", "Given a filesystem, path and buffer-size, read the file contents and\npresents it as a string\n\n@param fs Underlying filesystem\n@param path The file to read\n@param bufferSize The buffer size to use for reading\n@return The contents of the file as a string\n@throws IOException", "Updates the indices in the index buffer from a Java int array.\nAll of the entries of the input int array are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if int array is wrong size", "Resolve the given class if it is a primitive class,\nreturning the corresponding primitive wrapper type instead.\n@param clazz the class to check\n@return the original class, or a primitive wrapper for the original primitive type", "Adds the value to the Collection mapped to by the key.", "Sets the upper limits for the \"moving\" body rotation relative to joint point.\n\n@param limitX the X axis upper rotation limit (in radians)\n@param limitY the Y axis upper rotation limit (in radians)\n@param limitZ the Z axis upper rotation limit (in radians)", "Reverse Engineers an XPath Expression of a given Node in the DOM.\n\n@param node the given node.\n@return string xpath expression (e.g., \"/html[1]/body[1]/div[3]\").", "Creates a method signature.\n\n@param method Method instance\n@return method signature", "Image scale method\n@param imageToScale The image to be scaled\n@param dWidth Desired width, the new image object is created to this size\n@param dHeight Desired height, the new image object is created to this size\n@param fWidth What to multiply the width by. value < 1 scales down, and value > one scales up\n@param fHeight What to multiply the height by. value < 1 scales down, and value > one scales up\n@return A scaled image" ]
static ChangeEvent<BsonDocument> changeEventForLocalUpdate( final MongoNamespace namespace, final BsonValue documentId, final UpdateDescription update, final BsonDocument fullDocumentAfterUpdate, final boolean writePending ) { return new ChangeEvent<>( new BsonDocument(), OperationType.UPDATE, fullDocumentAfterUpdate, namespace, new BsonDocument("_id", documentId), update, writePending); }
[ "Generates a change event for a local update of a document in the given namespace referring\nto the given document _id.\n\n@param namespace the namespace where the document was inserted.\n@param documentId the _id of the document that was updated.\n@param update the update specifier.\n@return a change event for a local update of a document in the given namespace referring\nto the given document _id." ]
[ "Get the script for a given ID\n\n@param id ID of script\n@return Script if found, otherwise null", "Producers returned from this method are not validated. Internal use only.", "Adds methods requiring special implementations rather than just\ndelegation.\n\n@param proxyClassType the Javassist class description for the proxy type", "Reads non outline code custom field values and populates container.", "Obtain the ID associated with a profile name\n\n@param profileName profile name\n@return ID of profile", "Use this API to fetch authenticationvserver_authenticationtacacspolicy_binding resources of given name .", "Adds a path to the request response table with the specified values\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param pathId ID of path\n@throws Exception exception", "Finds an entity given its primary key.\n\n@throws RowNotFoundException\nIf no such object was found.\n@throws TooManyRowsException\nIf more that one object was returned for the given ID.", "generate a message for loglevel ERROR\n\n@param pObject the message Object" ]
public Curve getRegressionCurve(){ // @TODO Add threadsafe lazy init. if(regressionCurve !=null) { return regressionCurve; } DoubleMatrix a = solveEquationSystem(); double[] curvePoints=new double[partition.getLength()]; curvePoints[0]=a.get(0); for(int i=1;i<curvePoints.length;i++) { curvePoints[i]=curvePoints[i-1]+a.get(i)*(partition.getIntervalLength(i-1)); } return new CurveInterpolation( "RegressionCurve", referenceDate, CurveInterpolation.InterpolationMethod.LINEAR, CurveInterpolation.ExtrapolationMethod.CONSTANT, CurveInterpolation.InterpolationEntity.VALUE, partition.getPoints(), curvePoints); }
[ "Returns the curve resulting from the local linear regression with discrete kernel.\n\n@return The regression curve." ]
[ "Validations specific to PUT", "Removes any metadata cache file that might have been assigned to a particular player media slot, so metadata\nwill be looked up from the player itself.\n\n@param slot the media slot to which a meta data cache is to be attached", "Add contents to the deployment and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException", "Stop the drag action.", "Writes task baseline data.\n\n@param xmlTask MSPDI task\n@param mpxjTask MPXJ task", "Detach a connection from a key.\n\n@param key\nthe key\n@param connection\nthe connection", "Returns the default hidden preference for the user.\n\n@return boolean hidden or not\n@throws FlickrException", "Reads a single record from the table.\n\n@param buffer record data\n@param table parent table", "Append field with quotes and escape characters added in the key, if required.\nThe value is added without quotes and any escape characters.\n\n@return this" ]
public static vpnvserver_vpnnexthopserver_binding[] get(nitro_service service, String name) throws Exception{ vpnvserver_vpnnexthopserver_binding obj = new vpnvserver_vpnnexthopserver_binding(); obj.set_name(name); vpnvserver_vpnnexthopserver_binding response[] = (vpnvserver_vpnnexthopserver_binding[]) obj.get_resources(service); return response; }
[ "Use this API to fetch vpnvserver_vpnnexthopserver_binding resources of given name ." ]
[ "Get a collection of Photo objects for the specified Photoset.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@param photosetId\nThe photoset ID\n@param extras\nSet of extra-fields\n@param privacy_filter\nfilter value for authenticated calls\n@param perPage\nThe number of photos per page\n@param page\nThe page offset\n@return PhotoList The Collection of Photo objects\n@throws FlickrException", "Deletes the metadata on this folder associated with a specified template.\n\n@param templateName the metadata template type name.", "Removes the specified objects.\n\n@param collection The collection to remove.", "Obtains a Julian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Julian local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Returns the list of people who have favorited a given photo.\n\nThis method does not require authentication.\n\n@param photoId\n@param perPage\n@param page\n@return List of {@link com.flickr4java.flickr.people.User}", "Checks that a field exists and contains a non-null value.\n@param fieldName the name of the field to check existence/value of.\n@return true if the field exists in the result set and has a non-null value; false otherwise.", "Create a new builder for multiple unpaginated requests on the view.\n\n@param keyType {@link com.cloudant.client.api.views.Key.Type} of the key emitted by the\nview\n@param valueType class of the type of value emitted by the view\n@param <K> type of key emitted by the view\n@param <V> type of value emitted by the view\n@return a new {@link MultipleRequestBuilder} for the database view specified by this\nViewRequestBuilder", "Start pushing the element off to the right.", "Parameter validity check." ]
public void writeAnswers(List<IN> doc, PrintWriter printWriter, DocumentReaderAndWriter<IN> readerAndWriter) throws IOException { if (flags.lowerNewgeneThreshold) { return; } if (flags.numRuns <= 1) { readerAndWriter.printAnswers(doc, printWriter); // out.println(); printWriter.flush(); } }
[ "Write the classifications of the Sequence classifier out to a writer in a\nformat determined by the DocumentReaderAndWriter used.\n\n@param doc Documents to write out\n@param printWriter Writer to use for output\n@throws IOException If an IO problem" ]
[ "Returns the filename of the resource with extension.\n\n@return Filename of the GVRAndroidResource. May return null if the\nresource is not associated with any file", "Get the cached entry or null if no valid cached entry is found.", "Reads and consumes a number of characters from the underlying reader,\nfilling the byte array provided.\n\n@param holder A byte array which will be filled with bytes read from the underlying reader.\n@throws ProtocolException If a char can't be read into each array element.", "Transforms each character from this reader by passing it to the given\nclosure. The Closure should return each transformed character, which\nwill be passed to the Writer. The reader and writer will be both be\nclosed before this method returns.\n\n@param self a Reader object\n@param writer a Writer to receive the transformed characters\n@param closure a closure that performs the required transformation\n@throws IOException if an IOException occurs.\n@since 1.5.0", "Set the name of the schema containing the schedule tables.\n\n@param schema schema name.", "Parses the equation and compiles it into a sequence which can be executed later on\n@param equation String in simple equation format.\n@param assignment if true an assignment is expected and an exception if thrown if there is non\n@param debug if true it will print out debugging information\n@return Sequence of operations on the variables", "Position the child inside the layout based on the offset and axis-s factors\n@param dataIndex data index", "Converters the diffusion coefficient to hydrodynamic diameter and vice versa\n@param value Diffusion coefficient in [m^2 s^-1] or hydrodynamic diameter in [m]\n@param temperatur Temperatur in [Kelvin]\n@param viscosity Viscosity in [kg m^-1 s^-1]\n@return Hydrodynmaic diameter [m] / diffusion coefficient [m^2 s^-1]", "package scope in order to test the method" ]
public List<Method> getMethodsFromGroupId(int groupId, String[] filters) throws Exception { ArrayList<Method> methods = new ArrayList<Method>(); PreparedStatement statement = null; ResultSet results = null; try (Connection sqlConnection = sqlService.getConnection()) { statement = sqlConnection.prepareStatement( "SELECT * FROM " + Constants.DB_TABLE_OVERRIDE + " WHERE " + Constants.OVERRIDE_GROUP_ID + " = ?" ); statement.setInt(1, groupId); results = statement.executeQuery(); while (results.next()) { Method method = PathOverrideService.getInstance().getMethodForOverrideId(results.getInt("id")); if (method == null) { continue; } // decide whether or not to add this method based on the filters boolean add = true; if (filters != null) { add = false; for (String filter : filters) { if (method.getMethodType().endsWith(filter)) { add = true; break; } } } if (add && !methods.contains(method)) { methods.add(method); } } } catch (Exception e) { e.printStackTrace(); } finally { try { if (results != null) { results.close(); } } catch (Exception e) { } try { if (statement != null) { statement.close(); } } catch (Exception e) { } } return methods; }
[ "Returns all methods for a specific group\n\n@param groupId group ID to remove methods from\n@param filters array of method types to filter by, null means no filter\n@return Collection of methods found\n@throws Exception exception" ]
[ "Returns the difference of sets s1 and s2.", "Fixed length fancy formatting for doubles. If possible decimal notation is used. If all the significant digits\ncan't be shown then it will switch to exponential notation. If not all the space is needed then it will\nbe filled in to ensure it has the specified length.\n\n@param value value being formatted\n@param format default format before exponential\n@param length Maximum number of characters it can take.\n@param significant Number of significant decimal digits to show at a minimum.\n@return formatted string", "Given a list of store definitions, filters the list depending on the\nboolean\n\n@param storeDefs Complete list of store definitions\n@param isReadOnly Boolean indicating whether filter on read-only or not?\n@return List of filtered store definition", "Use this API to fetch cmppolicylabel_cmppolicy_binding resources of given name .", "Create button message key.\n\n@param gallery name\n@return Button message key as String", "Figure out the starting waveform segment that corresponds to the specified coordinate in the window.\n\n@param x the column being drawn\n\n@return the offset into the waveform at the current scale and playback time that should be drawn there", "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", "Reads the configuration of a range facet.\n@param pathPrefix The XML Path that leads to the range facet configuration, or <code>null</code> if the XML was not correctly structured.\n@return The read configuration, or <code>null</code> if the XML was not correctly structured.", "Appends to the statement table and all tables joined to it.\n@param alias the table alias\n@param where append conditions for WHERE clause here" ]
private void updateDb(String dbName, String webapp) { m_mainLayout.removeAllComponents(); m_setupBean.setDatabase(dbName); CmsDbSettingsPanel panel = new CmsDbSettingsPanel(m_setupBean); m_panel[0] = panel; panel.initFromSetupBean(webapp); m_mainLayout.addComponent(panel); }
[ "Switches DB type.\n\n@param dbName the database type\n@param webapp the webapp name" ]
[ "Removes the duplicate node list.\n\n@param list\nthe list\n@return the int", "Returns the nested object definition with the specified name.\n\n@param name The name of the attribute of the nested object\n@return The nested object definition or <code>null</code> if there is no such nested object", "Updates the polling state from a DELETE or POST operation.\n\n@param response the response from Retrofit REST call\n@throws IOException thrown by deserialization", "Set the given column name to the given value.\n\n@param name The column name to set.\n@param value the value to set.\n@return {@code this}\n@throws IllegalArgumentException if a column name does not exist in the table.", "Helper method that encapsulates the minimum logic for adding jobs to a queue.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param queue\nthe Resque queue name\n@param jobJsons\na list of jobs serialized as JSON", "Subtract two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the subtract of specified complex numbers.", "Get the value of a Annotation in a class declaration.\n@param classType\n@param annotationType\n@param attributeName\n@return the value of the annotation as String or null if something goes wrong", "Gets a JsonObject containing any pending changes to this object that can be sent back to the Box API.\n@return a JsonObject containing the pending changes.", "Constructs a valid request and passes it on to the next handler. It also\ncreates the 'Store' object corresponding to the store name specified in\nthe REST request.\n\n@param requestValidator The Validator object used to construct the\nrequest object\n@param ctx Context of the Netty channel\n@param messageEvent Message Event used to write the response / exception" ]
public static Dimension getDimension(File videoFile) throws IOException { try (FileInputStream fis = new FileInputStream(videoFile)) { return getDimension(fis, new AtomicReference<ByteBuffer>()); } }
[ "Returns the dimensions for the video\n@param videoFile Video file\n@return the dimensions\n@throws IOException" ]
[ "Stop listening for device announcements. Also discard any announcements which had been received, and\nnotify any registered listeners that those devices have been lost.", "This method is called if the data set has been changed. Subclasses might want to override\nthis method to add some extra logic.\n\nGo through all items in the list:\n- reuse the existing views in the list\n- add new views in the list if needed\n- trim the unused views\n- request re-layout\n\n@param preferableCenterPosition the preferable center position. If it is -1 - keep the\ncurrent center position.", "return request is success by JsonRtn object\n\n@param jsonRtn\n@return", "Finds all nWise combinations of a set of variables, each with a given domain of values\n\n@param nWise the number of variables in each combination\n@param coVariables the varisbles\n@param variableDomains the domains\n@return all nWise combinations of the set of variables", "Retrieves the members of the type and of its super types.\n\n@param memberNames Will receive the names of the members (for sorting)\n@param members Will receive the members\n@param type The type to process\n@param tagName An optional tag for filtering the types\n@param paramName The feature to be added to the MembersInclSupertypes attribute\n@param paramValue The feature to be added to the MembersInclSupertypes attribute\n@throws XDocletException If an error occurs", "This method writes extended attribute data for an assignment.\n\n@param xml MSPDI assignment\n@param mpx MPXJ assignment", "This method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions.\n\n@param date Date to be tested\n@return boolean value", "Use this API to export application.", "Gets a tokenizer from a reader." ]
public List<EndpointOverride> getPaths(int profileId, String clientUUID, String[] filters) throws Exception { ArrayList<EndpointOverride> properties = new ArrayList<EndpointOverride>(); PreparedStatement statement = null; ResultSet results = null; try (Connection sqlConnection = sqlService.getConnection()) { String queryString = this.getPathSelectString(); queryString += " AND " + Constants.DB_TABLE_PATH + "." + Constants.GENERIC_PROFILE_ID + "=? " + " ORDER BY " + Constants.PATH_PROFILE_PATH_ORDER + " ASC"; statement = sqlConnection.prepareStatement(queryString); statement.setString(1, clientUUID); statement.setInt(2, profileId); results = statement.executeQuery(); while (results.next()) { EndpointOverride endpoint = this.getEndpointOverrideFromResultSet(results); endpoint.setFilters(filters); properties.add(endpoint); } } catch (Exception e) { e.printStackTrace(); } finally { try { if (results != null) { results.close(); } } catch (Exception e) { } try { if (statement != null) { statement.close(); } } catch (Exception e) { } } return properties; }
[ "Returns an array of all endpoints\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param filters filters to apply to endpoints\n@return Collection of endpoints\n@throws Exception exception" ]
[ "Creates a converter function that converts value using a constructor that accepts a single String argument.\n\n@return A converter function or {@code null} if the given type doesn't have a public constructor that accepts\na single String argument.", "Prepare our statement for the subclasses.\n\n@param limit\nLimit for queries. Can be null if none.", "Verify the given job types are all valid.\n\n@param jobTypes the given job types\n@throws IllegalArgumentException if any of the job types are invalid\n@see #checkJobType(String, Class)", "Return the name of the current conf set\n@return the conf set name", "Specify the output format of the image.\n\n@see ImageFormat", "Returns the metallic factor for PBR shading", "Use this API to fetch wisite_binding resources of given names .", "Add the string representation of the given object to this sequence. The given indentation will be prepended to\neach line except the first one if the object has a multi-line string representation.\n\n@param object\nthe appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.", "Acquires a broker instance. If no PBKey is available a runtime exception will be thrown.\n\n@return A broker instance" ]
public void setPatternScheme(final boolean isByWeekDay, final boolean fireChange) { if (isByWeekDay ^ (null != m_model.getWeekDay())) { removeExceptionsOnChange(new Command() { public void execute() { if (isByWeekDay) { m_model.setWeekOfMonth(getPatternDefaultValues().getWeekOfMonth()); m_model.setWeekDay(getPatternDefaultValues().getWeekDay()); } else { m_model.clearWeekDays(); m_model.clearWeeksOfMonth(); m_model.setDayOfMonth(getPatternDefaultValues().getDayOfMonth()); } m_model.setInterval(getPatternDefaultValues().getInterval()); if (fireChange) { onValueChange(); } } }); } }
[ "Set the pattern scheme to either \"by weekday\" or \"by day of month\".\n@param isByWeekDay flag, indicating if the pattern \"by weekday\" should be set.\n@param fireChange flag, indicating if a value change event should be fired." ]
[ "Computes the determinant for the specified matrix. It must be square and have\nthe same width and height as what was specified in the constructor.\n\n@param mat The matrix whose determinant is to be computed.\n@return The determinant.", "Take four bytes from the specified position in the specified\nblock and convert them into a 32-bit int, using the big-endian\nconvention.\n@param bytes The data to read from.\n@param offset The position to start reading the 4-byte int from.\n@return The 32-bit integer represented by the four bytes.", "Determines if a token stream contains only numeric tokens\n@param stream\n@return true if all tokens in the given stream can be parsed as an integer", "Creates a new InternetPrintWriter for given charset encoding.\n\n@param outputStream the wrapped output stream.\n@param charset the charset.\n@return a new InternetPrintWriter.", "Remove all scene objects.", "Send a beat grid update announcement to all registered listeners.\n\n@param player the player whose beat grid information has changed\n@param beatGrid the new beat grid associated with that player, if any", "If a and b are not null, returns a new duration of a + b.\nIf a is null and b is not null, returns b.\nIf a is not null and b is null, returns a.\nIf a and b are null, returns null.\nIf needed, b is converted to a's time unit using the project properties.\n\n@param a first duration\n@param b second duration\n@param defaults project properties containing default values\n@return a + b", "Use this API to add dospolicy resources.", "change server state between OFFLINE_SERVER and NORMAL_SERVER\n\n@param setToOffline True if set to OFFLINE_SERVER" ]
private static void createDirectory(Path path) throws IOException { try { Files.createDirectory(path); } catch (FileAlreadyExistsException e) { if (!Files.isDirectory(path)) { throw e; } } }
[ "Create a directory at the given path if it does not exist yet.\n\n@param path\nthe path to the directory\n@throws IOException\nif it was not possible to create a directory at the given\npath" ]
[ "Updates the R matrix to take in account the removed row.", "Read an array of bytes of a specified size.\n\n@param size number of bytes to read\n@return ByteArray instance", "A safe wrapper to destroy the given resource request.", "Unlock all edited resources.", "Abort and close the transaction. Calling abort abandons all persistent\nobject modifications and releases the associated locks. Aborting a\ntransaction does not restore the state of modified transient objects", "Convert an object to another object with given type\n\n@param <T>\n@param source\nobject to convert\n@param typeReference\nreference to {@link java.lang.reflect.Type}\n@return the converted object if conversion failed\n@throws ConverterException", "Get permissions for who may view geo data for a photo.\n\nThis method requires authentication with 'read' permission.\n\n@param photoId\nreqired photo id, not null\n@return the permissions\n@throws FlickrException\nif photo id is invalid, if photo has no geodata or if any other error has been reported in the response.", "Returns a collection view of this map's values.\n\n@return a collection view of this map's values.", "Removes the task from wait q.\n\n@param taskTobeRemoved\nthe task tobe removed\n@return true, if successful" ]
int acquireTransaction(@NotNull final Thread thread) { try (CriticalSection ignored = criticalSection.enter()) { final int currentThreadPermits = getThreadPermitsToAcquire(thread); waitForPermits(thread, currentThreadPermits > 0 ? nestedQueue : regularQueue, 1, currentThreadPermits); } return 1; }
[ "Acquire transaction with a single permit in a thread. Transactions are acquired reentrantly, i.e.\nwith respect to transactions already acquired in the thread.\n\n@return the number of acquired permits, identically equal to 1." ]
[ "this method is basically checking whether we can return \"this\" for getNetworkSection", "Load an animation for the current avatar.\n@param animResource resource with the animation\n@param boneMap optional bone map to map animation skeleton to avatar", "Declares additional internal data structures.", "Use this API to fetch the statistics of all appfwpolicylabel_stats resources that are configured on netscaler.", "Private helper function that performs some assignability checks for the\nprovided GenericArrayType.", "Adds steps types from given injector and recursively its parent\n\n@param injector the current Inject\n@param types the List of steps types", "The context returned by this method may be later reused for other interception types.\n\n@param interceptionModel\n@param ctx\n@param manager\n@param type\n@return the interception context to be used for the AroundConstruct chain", "Shutdown the connection manager.", "Checks if the given argument is null and throws an exception with a\nmessage containing the argument name if that it true.\n\n@param argument the argument to check for null\n@param argumentName the name of the argument to check.\nThis is used in the exception message.\n@param <T> the type of the argument\n@return the argument itself\n@throws IllegalArgumentException in case argument is null" ]
public static void validateClusterNodeCounts(final Cluster lhs, final Cluster rhs) { if(!lhs.getNodeIds().equals(rhs.getNodeIds())) { throw new VoldemortException("Node ids are not the same [ lhs cluster node ids (" + lhs.getNodeIds() + ") not equal to rhs cluster node ids (" + rhs.getNodeIds() + ") ]"); } }
[ "Confirms that both clusters have the same number of nodes by comparing\nset of node Ids between clusters.\n\n@param lhs\n@param rhs" ]
[ "Read a short int from an input stream.\n\n@param is input stream\n@return int value", "Prepare a parallel HTTP OPTION Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder", "Acquire a permit for a particular node id so as to allow rebalancing\n\n@param nodeId The id of the node for which we are acquiring a permit\n@return Returns true if permit acquired, false if the permit is already\nheld by someone", "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.", "Retrieve from the parent pom the path to the modules of the project", "Extracts a particular data model instance from a JSON response\nreturned by MediaWiki. The location is described by a list of successive\nfields to use, from the root to the target object.\n\n@param response\nthe API response as returned by MediaWiki\n@param path\na list of fields from the root to the target object\n@return\nthe parsed POJO object\n@throws JsonProcessingException", "Adds the offset.\n\n@param start the start\n@param end the end", "Resets all override settings for the clientUUID and disables it\n\n@param profileId profile ID of the client\n@param clientUUID UUID of the client\n@throws Exception exception", "Awaits at most 5 minutes until all pods meets the given predicate.\n\n@param filter used to wait to detect that a pod is up and running." ]
public void transform(DataPipe cr) { Map<String, String> map = cr.getDataMap(); for (String key : map.keySet()) { String value = map.get(key); if (value.equals("#{customplaceholder}")) { // Generate a random number int ran = rand.nextInt(); map.put(key, String.valueOf(ran)); } else if (value.equals("#{divideBy2}")) { String i = map.get("var_out_V3"); String result = String.valueOf(Integer.valueOf(i) / 2); map.put(key, result); } } }
[ "Replace known tags in the current data values with actual values as appropriate\n\n@param cr a reference to DataPipe from which to read the current map" ]
[ "Copies entries in the source map to target map.\n\n@param source source map\n@param target target map", "Appends a formatted line of code to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).\n<li> {@link Class}, {@link TypeElement}, {@link DeclaredType} and {@link QualifiedName}\ninstances use their qualified names where necessary, or shorter versions if a suitable\nimport line can be added.\n<li> {@link Excerpt} instances have {@link Excerpt#addTo(SourceBuilder)} called.\n</ul>", "Checks, if the end type is valid for the set pattern type.\n@return a flag, indicating if the end type is valid for the pattern type.", "Add an additional binary type", "Returns the complete record for a single status update.\n\n@param projectStatus The project status update to get.\n@return Request object", "Creates a map between a calendar ID and a list of\nwork pattern assignment rows.\n\n@param rows work pattern assignment rows\n@return work pattern assignment map", "Gets the a singleton reference to the SPIProvider returned by the SPIProviderResolver\nretrieved using the default server integration classloader.\n\n@return this class instance", "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 a collection view of this map's values.\n\n@return a collection view of this map's values." ]
public Duration getDuration(FastTrackField type) { Double value = (Double) getObject(type); return value == null ? null : Duration.getInstance(value.doubleValue(), m_table.getDurationTimeUnit()); }
[ "Retrieve a duration field.\n\n@param type field type\n@return Duration instance" ]
[ "This method tokenizes a string by space characters,\nbut ignores spaces in quoted parts,that are parts in\n'' or \"\". The method does allows the usage of \"\" in ''\nand '' in \"\". The space character between tokens is not\nreturned.\n\n@param s the string to tokenize\n@return the tokens", "Implements get by delegating to getAll.", "Initialize the domain registry.\n\n@param registry the domain registry", "Open a new content stream.\n\n@param item the content item\n@return the content stream", "Deserialize an `AppDescriptor` from byte array\n\n@param bytes\nthe byte array\n@return\nan `AppDescriptor` instance", "Convert an object to a collection.\n\n@param mapper the object mapper\n@param source the source object\n@param targetCollectionType the target collection type\n@param targetElementType the target collection element type\n@return collection", "Creates a span that covers an exact row", "Use this API to update responderpolicy resources.", "Compute the proportional padding for all items in the cache\n@param cache Cache data set\n@return the uniform padding amount" ]
public static boolean isSinglePositionPrefix(FieldInfo fieldInfo, String prefix) throws IOException { if (fieldInfo == null) { throw new IOException("no fieldInfo"); } else { String info = fieldInfo.getAttribute( MtasCodecPostingsFormat.MTAS_FIELDINFO_ATTRIBUTE_PREFIX_SINGLE_POSITION); if (info == null) { throw new IOException("no " + MtasCodecPostingsFormat.MTAS_FIELDINFO_ATTRIBUTE_PREFIX_SINGLE_POSITION); } else { return Arrays.asList(info.split(Pattern.quote(MtasToken.DELIMITER))) .contains(prefix); } } }
[ "Checks if is single position prefix.\n\n@param fieldInfo\nthe field info\n@param prefix\nthe prefix\n@return true, if is single position prefix\n@throws IOException\nSignals that an I/O exception has occurred." ]
[ "Creates a new form session to edit the file with the given name using the given form configuration.\n\n@param configPath the site path of the form configuration\n@param fileName the name (not path) of the XML content to edit\n@return the id of the newly created form session\n\n@throws CmsUgcException if something goes wrong", "Validate the header signature.\n\n@param input The input to read the signature from\n@throws IOException If any read problems occur", "Download a specified URL to a file\n\n@param stringUrl URL to use\n@param parameters HTTP Headers\n@param fileToSave File to save content\n@throws IOException I/O error happened", "Read the metadata from a hadoop SequenceFile\n\n@param fs The filesystem to read from\n@param path The file to read from\n@return The metadata from this file", "Creates an IBlur instance for the given algorithm enum\n\n@param algorithm\n@param contextWrapper\n@return", "Removing surrounding space in image. Get trim color from specified pixel.\n@param value orientation from where to get the pixel color.\n@param colorTolerance 0 - 442. This is the euclidian distance\nbetween the colors of the reference pixel and the surrounding pixels is used.\nIf the distance is within the tolerance they'll get trimmed.", "Return cached object by key. The key will be concatenated with\ncurrent session id when fetching the cached object\n\n@param key\n@param <T>\nthe object type\n@return the cached object", "Write calendar exceptions.\n\n@param records list of ProjectCalendars\n@throws IOException", "The transform method for this DataTransformer\n@param cr a reference to DataPipe from which to read the current map" ]
public static NamingConvention determineNamingConvention( TypeElement type, Iterable<ExecutableElement> methods, Messager messager, Types types) { ExecutableElement beanMethod = null; ExecutableElement prefixlessMethod = null; for (ExecutableElement method : methods) { switch (methodNameConvention(method)) { case BEAN: beanMethod = firstNonNull(beanMethod, method); break; case PREFIXLESS: prefixlessMethod = firstNonNull(prefixlessMethod, method); break; default: break; } } if (prefixlessMethod != null) { if (beanMethod != null) { messager.printMessage( ERROR, "Type contains an illegal mix of get-prefixed and unprefixed getter methods, e.g. '" + beanMethod.getSimpleName() + "' and '" + prefixlessMethod.getSimpleName() + "'", type); } return new PrefixlessConvention(messager, types); } else { return new BeanConvention(messager, types); } }
[ "Determine whether the user has followed bean-like naming convention or not." ]
[ "Apply the layout to the each page in the list\n@param itemLayout item layout in the page\n@return true if the new layout is applied successfully, otherwise - false", "Sets the frame pointer to a specific frame\n\n@return boolean true if the move was successful", "Factory method to create EnumStringConverter\n\n@param <E>\nenum type inferred from enumType parameter\n@param enumType\nparticular enum class\n@return instance of EnumConverter", "Moves the drawer to the position passed.\n\n@param position The position the content is moved to.\n@param velocity Optional velocity if called by releasing a drag event.\n@param animate Whether the move is animated.", "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", "A document that is paused no longer has remote updates applied to it.\nAny local updates to this document cause it to be resumed. An example of pausing a document\nis when a conflict is being resolved for that document and the handler throws an exception.\n\nThis method allows you to resume sync for a document.\n\n@param namespace namespace for the document\n@param documentId the id of the document to resume syncing\n@return true if successfully resumed, false if the document\ncould not be found or there was an error resuming", "dispatch to gravity state", "The % Work Complete field contains the current status of a task,\nexpressed as the percentage of the task's work that has been completed.\nYou can enter percent work complete, or you can have Microsoft Project\ncalculate it for you based on actual work on the task.\n\n@return percentage as float", "Use this API to fetch appflowpolicy_appflowglobal_binding resources of given name ." ]
@Override public Iterator<? extends IPAddressSeqRange> prefixIterator(int prefixLength) { if(!isMultiple()) { return new Iterator<IPAddressSeqRange>() { IPAddressSeqRange orig = IPAddressSeqRange.this; @Override public boolean hasNext() { return orig != null; } @Override public IPAddressSeqRange next() { if(orig == null) { throw new NoSuchElementException(); } IPAddressSeqRange result = orig; orig = null; return result; } @Override public void remove() { throw new UnsupportedOperationException(); } }; } return new Iterator<IPAddressSeqRange>() { Iterator<? extends IPAddress> prefixBlockIterator = prefixBlockIterator(prefixLength); private boolean first = true; @Override public boolean hasNext() { return prefixBlockIterator.hasNext(); } @Override public IPAddressSeqRange next() { IPAddress next = prefixBlockIterator.next(); if(first) { first = false; // next is a prefix block IPAddress lower = getLower(); if(hasNext()) { if(!lower.includesZeroHost(prefixLength)) { return create(lower, next.getUpper()); } } else { IPAddress upper = getUpper(); if(!lower.includesZeroHost(prefixLength) || !upper.includesMaxHost(prefixLength)) { return create(lower, upper); } } } else if(!hasNext()) { IPAddress upper = getUpper(); if(!upper.includesMaxHost(prefixLength)) { return create(next.getLower(), upper); } } return next.toSequentialRange(); } @Override public void remove() { throw new UnsupportedOperationException(); } }; }
[ "Iterates through the range of prefixes in this range instance using the given prefix length.\n\n@param prefixLength\n@return" ]
[ "Returns an attribute's map value from this JAR's manifest's main section.\nThe attributes string value will be split on whitespace into map entries, and each entry will be split on '=' to get the key-value pair.\nThe returned map may be safely modified.\n\n@param name the attribute's name", "For the given service name return list of endpoint references currently\nregistered at the service locator server endpoints.\n\n@param serviceName\nthe name of the service for which to get the endpoints, must\nnot be <code>null</code>\n@return EndpointReferenceListType encapsulate list of endpoint references\nor <code>null</code>", "interceptors, decorators and observers go first", "Choose from three numbers based on version.", "Opens a new FileOutputStream for a file of the given name in the given\nresult directory. Any file of this name that exists already will be\nreplaced. The caller is responsible for eventually closing the stream.\n\n@param resultDirectory\nthe path to the result directory\n@param filename\nthe name of the file to write to\n@return FileOutputStream for the file\n@throws IOException\nif the file or example output directory could not be created", "Use this API to update nsdiameter.", "Set default value with\n\n@param iso ISO2 of country", "Get the configured hive.execution.engine. If not set it will default to the default value of HiveConf", "Unlinks a set of dependents from this task.\n\n@param task The task to remove dependents from.\n@return Request object" ]
public RowColumn following() { if (row.equals(Bytes.EMPTY)) { return RowColumn.EMPTY; } else if (col.equals(Column.EMPTY)) { return new RowColumn(followingBytes(row)); } else if (!col.isQualifierSet()) { return new RowColumn(row, new Column(followingBytes(col.getFamily()))); } else if (!col.isVisibilitySet()) { return new RowColumn(row, new Column(col.getFamily(), followingBytes(col.getQualifier()))); } else { return new RowColumn(row, new Column(col.getFamily(), col.getQualifier(), followingBytes(col.getVisibility()))); } }
[ "Returns a RowColumn following the current one\n\n@return RowColumn following this one" ]
[ "This method processes any extended attributes associated with a\nresource assignment.\n\n@param xml MSPDI resource assignment instance\n@param mpx MPX task instance", "Start the socket server and waiting for finished\n\n@throws InterruptedException thread interrupted", "Returns a matrix full of ones", "Replies the elements of the given map except the pairs with the given keys.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\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 keys the keys of the pairs to remove.\n@return the map with the content of the map except the pairs.\n@since 2.15", "Create a request for elevations for samples along a path.\n\n@param req\n@param callback", "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", "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}", "Use this API to add authenticationradiusaction.", "Set a bean in the context.\n\n@param name bean name\n@param object bean value" ]
public static base_response unset(nitro_service client, Interface resource, String[] args) throws Exception{ Interface unsetresource = new Interface(); unsetresource.id = resource.id; return unsetresource.unset_resource(client,args); }
[ "Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array." ]
[ "ten less than Cube Q", "Sends out the SQL as defined in the config upon first init of the connection.\n@param connection\n@param initSQL\n@throws SQLException", "Undeletes the selected files\n\n@return the ids of the modified resources\n\n@throws CmsException if something goes wrong", "Creates a PathAddress from the given ModelNode address. The given node is expected to be an address node.\n\n@param node the node (cannot be {@code null})\n\n@return the update identifier", "Use this API to add vpnsessionaction.", "Extract calendar data from the file.\n\n@throws SQLException", "Not used.", "Read data from the table. Return a reference to the current\ninstance to allow method chaining.\n\n@return reader instance", "We have identified that we have an MDB file. This could be a Microsoft Project database\nor an Asta database. Open the database and use the table names present to determine\nwhich type this is.\n\n@param stream schedule data\n@return ProjectFile instance" ]
public boolean hasValue(String fieldName) { return resultMap.containsKey(fieldName) && resultMap.get(fieldName) != null; }
[ "Checks that a field exists and contains a non-null value.\n@param fieldName the name of the field to check existence/value of.\n@return true if the field exists in the result set and has a non-null value; false otherwise." ]
[ "Adds a new Matrix variable. If one already has the same name it is written over.\n\nWhile more verbose for multiple variables, this function doesn't require new memory be declared\neach time it's called.\n\n@param variable Matrix which is to be assigned to name\n@param name The name of the variable", "Adds another scene object to pick against.\nEach frame all the colliders in the scene will be compared\nagainst the bounding volumes of all the collidables associated\nwith this picker.\n@param sceneObj new collidable\n@return index of collidable added, this is the CursorID in the GVRPickedObject", "Creates a ClassNode containing the wrapper of a ClassNode\nof primitive type. Any ClassNode representing a primitive\ntype should be created using the predefined types used in\nclass. The method will check the parameter for known\nreferences of ClassNode representing a primitive type. If\nReference is found, then a ClassNode will be contained that\nrepresents the wrapper class. For example for boolean, the\nwrapper class is java.lang.Boolean.\n\nIf the parameter is no primitive type, the redirected\nClassNode will be returned\n\n@see #make(Class)\n@see #make(String)\n@param cn the ClassNode containing a possible primitive type", "Notifies that a footer item is changed.\n\n@param position the position.", "Use this API to update bridgetable.", "returns the values of the orientation tag", "Removes obsolete elements from names and shared elements.\n\n@param names Shared element names.\n@param sharedElements Shared elements.\n@param elementsToRemove The elements that should be removed.", "Set the classpath for loading the driver.\n\n@param classpath the classpath", "Send a channels on-air update to all registered listeners.\n\n@param audibleChannels holds the device numbers of all channels that can currently be heard in the mixer output" ]
public void revisitThrowEvents(Definitions def) { List<RootElement> rootElements = def.getRootElements(); List<Signal> toAddSignals = new ArrayList<Signal>(); Set<Error> toAddErrors = new HashSet<Error>(); Set<Escalation> toAddEscalations = new HashSet<Escalation>(); Set<Message> toAddMessages = new HashSet<Message>(); Set<ItemDefinition> toAddItemDefinitions = new HashSet<ItemDefinition>(); for (RootElement root : rootElements) { if (root instanceof Process) { setThrowEventsInfo((Process) root, def, rootElements, toAddSignals, toAddErrors, toAddEscalations, toAddMessages, toAddItemDefinitions); } } for (Lane lane : _lanes) { setThrowEventsInfoForLanes(lane, def, rootElements, toAddSignals, toAddErrors, toAddEscalations, toAddMessages, toAddItemDefinitions); } for (Signal s : toAddSignals) { def.getRootElements().add(s); } for (Error er : toAddErrors) { def.getRootElements().add(er); } for (Escalation es : toAddEscalations) { def.getRootElements().add(es); } for (ItemDefinition idef : toAddItemDefinitions) { def.getRootElements().add(idef); } for (Message msg : toAddMessages) { def.getRootElements().add(msg); } }
[ "Updates event definitions for all throwing events.\n@param def Definitions" ]
[ "Deletes a chain of vertices from this list.", "Retrieves state and metrics information for all nodes in the cluster.\n\n@return list of nodes in the cluster", "Parse the XML for a collection as returned by getTree call.\n\n@param collectionElement\n@return", "Creates a map of work pattern rows indexed by the primary key.\n\n@param rows work pattern rows\n@return work pattern map", "Return all URI schemes that are supported in the system.", "Log a info message with a throwable.", "Multiple of gradient windwos per masc relation of x y\n\n@return int[]", "Sets the right padding character for all cells in the table.\n@param paddingRightChar new padding character, ignored if null\n@return this to allow chaining", "Register a new DropPasteWorkerInterface.\n@param worker The new worker" ]
private Map<String, I_CmsSearchConfigurationFacetField> getDefaultFieldFacets(boolean categoryConjunction) { Map<String, I_CmsSearchConfigurationFacetField> fieldFacets = new HashMap<String, I_CmsSearchConfigurationFacetField>(); fieldFacets.put( CmsListManager.FIELD_CATEGORIES, new CmsSearchConfigurationFacetField( CmsListManager.FIELD_CATEGORIES, null, Integer.valueOf(1), Integer.valueOf(200), null, "Category", SortOrder.index, null, Boolean.valueOf(categoryConjunction), null, Boolean.TRUE)); fieldFacets.put( CmsListManager.FIELD_PARENT_FOLDERS, new CmsSearchConfigurationFacetField( CmsListManager.FIELD_PARENT_FOLDERS, null, Integer.valueOf(1), Integer.valueOf(200), null, "Folders", SortOrder.index, null, Boolean.FALSE, null, Boolean.TRUE)); return Collections.unmodifiableMap(fieldFacets); }
[ "The default field facets.\n\n@param categoryConjunction flag, indicating if category selections in the facet should be \"AND\" combined.\n@return the default field facets." ]
[ "Visits a parameter of this method.\n\n@param name\nparameter name or null if none is provided.\n@param access\nthe parameter's access flags, only <tt>ACC_FINAL</tt>,\n<tt>ACC_SYNTHETIC</tt> or/and <tt>ACC_MANDATED</tt> are\nallowed (see {@link Opcodes}).", "This must be called with the write lock held.\n@param requirement the requirement", "Creates the .story file necessary for every Beast Test Case.\n\n@param scenarioName\n- The name of the scenario, with spaces\n@param srcTestRootFolder\n- The test root folder\n@param packagePath\n- The package of the BeastTestCase\n@param scenarioDescription\n- the scenario name\n@param givenDescription\n- The given description\n@param whenDescription\n- The when description\n@param thenDescription\n- The then description\n@throws BeastException", "Deletes all outgoing links of specified entity.\n\n@param entity the entity.", "Get the permission information for the specified photo.\n\nThis method requires authentication with 'read' permission.\n\n@param photoId\nThe photo id\n@return The Permissions object\n@throws FlickrException", "Operates on one dimension at a time.", "Use this API to disable clusterinstance of given name.", "Add the given, single header value under the given name.\n@param headerName the header name\n@param headerValue the header value\n@throws UnsupportedOperationException if adding headers is not supported\n@see #put(String, List)\n@see #set(String, String)", "This is a convenience method provided to allow a day to be set\nas working or non-working, by using the day number to\nidentify the required day.\n\n@param day required day\n@param working flag indicating if the day is a working day" ]
public void migrate() { if (databaseIsUpToDate()) { LOGGER.info(format("Keyspace %s is already up to date at version %d", database.getKeyspaceName(), database.getVersion())); return; } List<DbMigration> migrations = repository.getMigrationsSinceVersion(database.getVersion()); migrations.forEach(database::execute); LOGGER.info(format("Migrated keyspace %s to version %d", database.getKeyspaceName(), database.getVersion())); database.close(); }
[ "Start the actual migration. Take the version of the database, get all required migrations and execute them or do\nnothing if the DB is already up to date.\n\nAt the end the underlying database instance is closed.\n\n@throws MigrationException if a migration fails" ]
[ "Write entries into the storage.\nOverriding methods should first delegate to super before adding their own entries.", "Remove a custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object", "Use this API to fetch all the clusternodegroup resources that are configured on netscaler.", "Returns list of files matches filters in specified directories\n\n@param directories which will using to find files\n@param fileFilter file filter\n@param dirFilter directory filter\n@return list of files matches filters in specified directories", "Creates a map of work pattern rows indexed by the primary key.\n\n@param rows work pattern rows\n@return work pattern map", "Cancels all requests still waiting for a response.\n\n@return this {@link Searcher} for chaining.", "Return total number of connections created in all partitions.\n\n@return number of created connections", "Utility function to get the current value.", "Should this request URI be compressed?\n\n@param requestUri request URI\n@return true when should be compressed" ]
public static ForwardCurveInterpolation createForwardCurveFromMonteCarloLiborModel(String name, LIBORModelMonteCarloSimulationModel model, double startTime) throws CalculationException{ int timeIndex = model.getTimeIndex(startTime); // Get all Libors at timeIndex which are not yet fixed (others null) and times for the timeDiscretizationFromArray of the curves ArrayList<RandomVariable> liborsAtTimeIndex = new ArrayList<>(); int firstLiborIndex = model.getLiborPeriodDiscretization().getTimeIndexNearestGreaterOrEqual(startTime); double firstLiborTime = model.getLiborPeriodDiscretization().getTime(firstLiborIndex); if(firstLiborTime>startTime) { liborsAtTimeIndex.add(model.getLIBOR(startTime, startTime, firstLiborTime)); } // Vector of times for the forward curve double[] times = new double[firstLiborTime==startTime ? (model.getNumberOfLibors()-firstLiborIndex) : (model.getNumberOfLibors()-firstLiborIndex+1)]; times[0]=0; int indexOffset = firstLiborTime==startTime ? 0 : 1; for(int i=firstLiborIndex;i<model.getNumberOfLibors();i++) { liborsAtTimeIndex.add(model.getLIBOR(timeIndex,i)); times[i-firstLiborIndex+indexOffset]=model.getLiborPeriodDiscretization().getTime(i)-startTime; } RandomVariable[] libors = liborsAtTimeIndex.toArray(new RandomVariable[liborsAtTimeIndex.size()]); return ForwardCurveInterpolation.createForwardCurveFromForwards(name, times, libors, model.getLiborPeriodDiscretization().getTimeStep(firstLiborIndex)); }
[ "Create a forward curve from forwards given by a LIBORMonteCarloModel.\n\n@param name name of the forward curve.\n@param model Monte Carlo model providing the forwards.\n@param startTime time at which the curve starts, i.e. zero time for the curve\n@return a forward curve from forwards given by a LIBORMonteCarloModel.\n@throws CalculationException Thrown if the model failed to provide the forward rates." ]
[ "Function to perform forward activation", "Extracts warnings that are returned in an API response.\n\n@param root\nroot node of the JSON result", "Sets the value to a default.", "Cache a parse failure for this document.", "Returns a count of in-window events.\n\n@return the the count of in-window events.", "obtains the internal JDO lifecycle state of the input StatemanagerInternal.\nThis Method is helpful to display persistent objects internal state.\n@param sm the StateManager to be inspected\n@return the LifeCycleState of a StateManager instance", "Closes off all connections in all partitions.", "Use this API to fetch all the lbsipparameters resources that are configured on netscaler.", "Lookup the username for the specified User URL.\n\n@param url\nThe user profile URL\n@return The username\n@throws FlickrException" ]
public void setBackgroundColor(int color) { setBackgroundColorR(Colors.byteToGl(Color.red(color))); setBackgroundColorG(Colors.byteToGl(Color.green(color))); setBackgroundColorB(Colors.byteToGl(Color.blue(color))); setBackgroundColorA(Colors.byteToGl(Color.alpha(color))); }
[ "Set the background color.\n\nIf you don't set the background color, the default is an opaque black:\n{@link Color#BLACK}, 0xff000000.\n\n@param color\nAn Android 32-bit (ARGB) {@link Color}, such as you get from\n{@link Resources#getColor(int)}" ]
[ "Sets axis dimension\n@param val dimension\n@param axis Axis. It might be either {@link Layout.Axis#X X} or\n{@link Layout.Axis#Y Y} or {@link Layout.Axis#Z Z}", "Add a source and destination.\n\n@param source Source path to be routed. Routed path can have named wild-card pattern with braces \"{}\".\n@param destination Destination of the path.", "Update counters and call hooks.\n@param handle connection handle.", "Handles the response of the SendData request.\n@param incomingMessage the response message to process.", "Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception", "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.", "Generates a file of random data in a format suitable for the DIEHARD test.\nDIEHARD requires 3 million 32-bit integers.\n@param rng The random number generator to use to generate the data.\n@param outputFile The file that the random data is written to.\n@throws IOException If there is a problem writing to the file.", "Fills a rectangle in the image.\n\n@param x rect�s start position in x-axis\n@param y rect�s start positioj in y-axis\n@param w rect�s width\n@param h rect�s height\n@param c rect�s color", "Retrieve the var data key for a specific field.\n\n@param type field type\n@return var data key" ]
public static tmglobal_binding get(nitro_service service) throws Exception{ tmglobal_binding obj = new tmglobal_binding(); tmglobal_binding response = (tmglobal_binding) obj.get_resource(service); return response; }
[ "Use this API to fetch a tmglobal_binding resource ." ]
[ ">>>>>> measureUntilFull helper methods", "Returns the probability that the records v1 and v2 came from\nrepresent the same entity, based on high and low probability\nsettings etc.", "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.", "Returns the count of total number of unread inbox messages for the user\n@return int - count of all unread messages", "Checks String to see if the parameter is null.\n@param paramValue Object that will be checked if null.\n@return this.true if the parameter that is being checked is not null", "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", "This ensures that we are able to use the default preference from JSDK, to check basically if we are in Android or Not\n@param preference\n@throws BackingStoreException", "Adds all items from the iterable to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed", "Verify that all OGM custom externalizers are present.\nN.B. even if some Externalizer is only needed in specific configuration,\nit is not safe to start a CacheManager without one as the same CacheManager\nmight be used, or have been used in the past, to store data using a different\nconfiguration.\n\n@see ExternalizerIds\n@see AdvancedExternalizer\n@param externalCacheManager the provided CacheManager to validate" ]
public static Map<String, Object> with(Object... params) { Map<String, Object> map = new HashMap<>(); for (int i = 0; i < params.length; i++) { map.put(String.valueOf(i), params[i]); } return map; }
[ "Convenience wrapper for message parameters\n@param params\n@return" ]
[ "Tests correctness.", "Get list of Jobs from a queue.\n\n@param jedis\n@param queueName\n@param jobOffset\n@param jobCount\n@return", "Helper method to abstract out the common logic from the various users methods.\n\n@param api the API connection to be used when retrieving the users.\n@param filterTerm The filter term to lookup users by (login for external, login or name for managed)\n@param userType The type of users we want to search with this request.\nValid values are 'managed' (enterprise users), 'external' or 'all'\n@param externalAppUserId the external app user id that has been set for an app user\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return An iterator over the selected users.", "Adds a child to this node and sets this node as its parent node.\n\n@param node The node to add.", "set ViewPager scroller to change animation duration when sliding", "Returns a description a block of work, or \"exit\" if no more blocks exist\n\n@param name the assigned name of the consumer requesting a block of work\n@return a description a block of work, or \"exit\" if no more blocks exist", "Adds a listener to this collection.\n\n@param listener The listener to add", "Use this API to fetch all the gslbsite resources that are configured on netscaler.", "Returns if a request should be retried based on the retry count, current response,\nand the current strategy.\n\n@param retryCount The current retry attempt count.\n@param response The exception that caused the retry conditions to occur.\n@return true if the request should be retried; false otherwise." ]
public static Map<String, String> parseProperties(String s) { Map<String, String> properties = new HashMap<String, String>(); if (!StringUtils.isEmpty(s)) { Matcher matcher = PROPERTIES_PATTERN.matcher(s); int start = 0; while (matcher.find()) { addKeyValuePairAsProperty(s.substring(start, matcher.start()), properties); start = matcher.start() + 1; } addKeyValuePairAsProperty(s.substring(start), properties); } return properties; }
[ "Parses a String comprised of 0 or more comma-delimited key=value pairs.\n\n@param s the string to parse\n@return the Map of parsed key value pairs" ]
[ "Obtain collection of Parameters from request\n\n@param dataArray request parameters\n@return Map of parameters\n@throws Exception exception", "Formats event output by key, usually equal to the method name.\n\n@param key the event key\n@param defaultPattern the default pattern to return if a custom pattern\nis not found\n@param args the args used to format output\n@return A formatted event output", "Creates a polling state.\n\n@param response the response from Retrofit REST call that initiate the long running operation.\n@param lroOptions long running operation options.\n@param defaultRetryTimeout the long running operation retry timeout.\n@param resourceType the type of the resource the long running operation returns\n@param serializerAdapter the adapter for the Jackson object mapper\n@param <T> the result type\n@return the polling state\n@throws IOException thrown by deserialization", "Saves a screenshot of every new state.", "Recursively sort the supplied child tasks.\n\n@param container child tasks", "Adds an EJB descriptor to the maps\n\n@param ejbDescriptor The EJB descriptor to add", "Creates AzureAsyncOperation from the given HTTP response.\n\n@param serializerAdapter the adapter to use for deserialization\n@param response the response\n@return the async operation object\n@throws CloudException if the deserialization fails or response contains invalid body", "takes the pixels from a BufferedImage and stores them in an array", "Returns the key value in the given array.\n\n@param keyIndex the index of the scale key" ]
public Headers toHeaders() { Headers headers = new Headers(); if (!getMatch().isEmpty()) { headers = headers.add(new Header(HeaderConstants.IF_MATCH, buildTagHeaderValue(getMatch()))); } if (!getNoneMatch().isEmpty()) { headers = headers.add(new Header(HeaderConstants.IF_NONE_MATCH, buildTagHeaderValue(getNoneMatch()))); } if (modifiedSince.isPresent()) { headers = headers.set(HeaderUtils.toHttpDate(HeaderConstants.IF_MODIFIED_SINCE, modifiedSince.get())); } if (unModifiedSince.isPresent()) { headers = headers.set(HeaderUtils.toHttpDate(HeaderConstants.IF_UNMODIFIED_SINCE, unModifiedSince.get())); } return headers; }
[ "Converts the Conditionals into real headers.\n@return real headers." ]
[ "Walks from the most outer embeddable to the most inner one\nlook for all columns contained in these embeddables\nand exclude the embeddables that have a non null column\nbecause of caching, the algorithm is only run once per column parameter", "Set the color for each total for the column\n@param column the number of the column (starting from 1)\n@param color", "Convenience method for retrieving an Object resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value", "Returns a new instance of the given class using the constructor with the specified parameter.\n\n@param target The class to instantiate\n@param type The types of the single parameter of the constructor\n@param arg The argument\n@return The instance", "helper function to convert strings to bytes as needed.\n\n@param key\n@param value", "Resolves a conflict between a synchronized document's local and remote state. The resolution\nwill result in either the document being desynchronized or being replaced with some resolved\nstate based on the conflict resolver specified for the document. Uses the last uncommitted\nlocal event as the local state.\n\n@param nsConfig the namespace synchronization config of the namespace where the document\nlives.\n@param docConfig the configuration of the document that describes the resolver and current\nstate.\n@param remoteEvent the remote change event that is conflicting.", "Use this API to delete nsip6 of given name.", "Samples without replacement from a collection.\n\n@param c\nThe collection to be sampled from\n@param n\nThe number of samples to take\n@return a new collection with the sample", "Returns the comma separated list of available scopes\n\n@return String" ]
@NonNull @Override public File getParent(@NonNull final File from) { if (from.getPath().equals(getRoot().getPath())) { // Already at root, we can't go higher return from; } else if (from.getParentFile() != null) { return from.getParentFile(); } else { return from; } }
[ "Return the path to the parent directory. Should return the root if\nfrom is root.\n\n@param from either a file or directory\n@return the parent directory" ]
[ "Helper for reading a mandatory String value list - throwing an Exception if parsing fails.\n@param json The JSON object where the list should be read from.\n@param key The key of the value to read.\n@return The value from the JSON.\n@throws JSONException thrown when parsing fails.", "Uninstall current location collection client.\n\n@return true if uninstall was successful", "Deletes specified entity clearing all its properties and deleting all its outgoing links.\n\n@param entity to delete.", "Reads the entity hosting the association from the datastore and applies any property changes from the server\nside.", "Helper method to add a parameter without having to create it explicitely. The created parameter should be persisted afterwards.\n\n@param key\nname of the parameter to add\n@param value\nvalue of the parameter to create\n@return the newly created parameter", "Notifies that multiple footer items are removed.\n\n@param positionStart the position.\n@param itemCount the item count.", "Fling the content\n\n@param velocityX The initial velocity in the X direction. Positive numbers mean that the\nfinger/cursor is moving to the left on the screen, which means we want to\nscroll towards the beginning.\n@param velocityY The initial velocity in the Y direction. Positive numbers mean that the\nfinger/cursor is moving down the screen, which means we want to scroll\ntowards the top.\n@param velocityZ TODO: Z-scrolling is currently not supported\n@return", "Extracts the rank of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The rank of the decomposed matrix.", "The primary run loop of the event processor." ]
public void readData(BufferedReader in) throws IOException { String line, value; // skip old variables if still present lexOptions.readData(in); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); try { tlpParams = (TreebankLangParserParams) Class.forName(value).newInstance(); } catch (Exception e) { IOException ioe = new IOException("Problem instantiating parserParams: " + line); ioe.initCause(e); throw ioe; } line = in.readLine(); // ensure backwards compatibility if (line.matches("^forceCNF.*")) { value = line.substring(line.indexOf(' ') + 1); forceCNF = Boolean.parseBoolean(value); line = in.readLine(); } value = line.substring(line.indexOf(' ') + 1); doPCFG = Boolean.parseBoolean(value); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); doDep = Boolean.parseBoolean(value); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); freeDependencies = Boolean.parseBoolean(value); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); directional = Boolean.parseBoolean(value); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); genStop = Boolean.parseBoolean(value); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); distance = Boolean.parseBoolean(value); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); coarseDistance = Boolean.parseBoolean(value); line = in.readLine(); value = line.substring(line.indexOf(' ') + 1); dcTags = Boolean.parseBoolean(value); line = in.readLine(); if ( ! line.matches("^nPrune.*")) { throw new RuntimeException("Expected nPrune, found: " + line); } value = line.substring(line.indexOf(' ') + 1); nodePrune = Boolean.parseBoolean(value); line = in.readLine(); // get rid of last line if (line.length() != 0) { throw new RuntimeException("Expected blank line, found: " + line); } }
[ "Populates data in this Options from the character stream.\n@param in The Reader\n@throws IOException If there is a problem reading data" ]
[ "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.", "Create constant name.\n@param state STATE_UNCHANGED, STATE_CHANGED, STATE_NEW or STATE_DELETED.\n@return cconstanname as String", "Implementation of FNV-1a hash algorithm.\n@see <a href=\"https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function\">\nttps://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function</a>\n@param doc the document to hash\n@return", "Answer the counted size\n\n@return int", "Allows testsuites to shorten the domain timeout adder", "This method maps the resource unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param rscFixedMeta resource fixed meta data\n@param rscFixedData resource fixed data\n@return map of resource IDs to resource data", "Adds a constructor for the proxy for each constructor declared by the base\nbean type.\n\n@param proxyClassType the Javassist class for the proxy\n@param initialValueBytecode", "Put features in a tile. This will assure all features are only added in one tile. When a feature's unique tile\nis different from this one a link is added in the tile.\n\n@param tile\ntile to put features in\n@param maxTileExtent\nthe maximum tile extent\n@throws GeomajasException oops", "Retrieve all Collection attributes of a given instance, and make all of the Proxy Collections\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true, loading is forced even if cld differs" ]
private static String makeAsciiTableCell(Object obj, int padLeft, int padRight, boolean tsv) { String result = obj.toString(); if (padLeft > 0) { result = padLeft(result, padLeft); } if (padRight > 0) { result = pad(result, padRight); } if (tsv) { result = result + '\t'; } return result; }
[ "The cell String is the string representation of the object.\nIf padLeft is greater than 0, it is padded. Ditto right" ]
[ "Provides a reverse view on the given list which is especially useful to traverse a list backwards in a for-each\nloop. The list itself is not modified by calling this method.\n\n@param list\nthe list whose elements should be traversed in reverse. May not be <code>null</code>.\n@return a list with the same elements as the given list, in reverse", "Obtains a International Fixed zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the International Fixed zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "XER files can contain multiple projects when there are cross-project dependencies.\nAs the UniversalProjectReader is designed just to read a single project, we need\nto select one project from those available in the XER file.\nThe original project selected for export by the user will have its \"export flag\"\nset to true. We'll return the first project we find where the export flag is\nset to true, otherwise we'll just return the first project we find in the file.\n\n@param stream schedule data\n@return ProjectFile instance", "Use this API to add gslbservice resources.", "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}", "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.", "Use this API to delete sslcipher of given name.", "Reads data from the SP file.\n\n@return Project File instance", "Extract site path, base name and locale from the resource opened with the editor." ]
@VisibleForTesting @Nullable protected LineSymbolizer createLineSymbolizer(final PJsonObject styleJson) { final Stroke stroke = createStroke(styleJson, true); if (stroke == null) { return null; } else { return this.styleBuilder.createLineSymbolizer(stroke); } }
[ "Add a line symbolizer definition to the rule.\n\n@param styleJson The old style." ]
[ "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.", "Updates the statements of the item document identified by the given item\nid. The updates are computed with respect to the current data found\nonline, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged.\n\n@param itemIdValue\nid of the document to be updated\n@param addStatements\nthe list of statements to be added or updated; statements with\nempty statement id will be added; statements with non-empty\nstatement id will be updated (if such a statement exists)\n@param deleteStatements\nthe list of statements to be deleted; statements will only be\ndeleted if they are present in the current document (in\nexactly the same form, with the same id)\n@param summary\nshort edit summary\n@return the updated document\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are IO problems, such as missing network connection", "Writes a resource assignment to a PM XML file.\n\n@param mpxj MPXJ ResourceAssignment instance", "Should only called on a column that is being set to null.\n\nReturns the most outer embeddable containing {@code column} that is entirely null.\nReturn null otherwise i.e. not embeddable.\n\nThe implementation lazily compute the embeddable state and caches it.\nThe idea behind the lazy computation is that only some columns will be set to null\nand only in some situations.\nThe idea behind caching is that an embeddable contains several columns, no need to recompute its state.", "Retrieve a value from the map, ensuring that a key exists in the map\nwith the specified name.\n\n@param name column name\n@return column value", "Adds error correction data to the specified binary string, which already contains the primary data", "Use this API to fetch sslcertkey_crldistribution_binding resources of given name .", "Returns the compact project records for all projects in the workspace.\n\n@param workspace The workspace or organization to find projects in.\n@return Request object", "Calculate entropy value.\n@param values Values.\n@return Returns entropy value of the specified histogram array." ]
public static boolean isPostJDK5(String bytecodeVersion) { return JDK5.equals(bytecodeVersion) || JDK6.equals(bytecodeVersion) || JDK7.equals(bytecodeVersion) || JDK8.equals(bytecodeVersion); }
[ "Checks if the specified bytecode version string represents a JDK 1.5+ compatible\nbytecode version.\n@param bytecodeVersion the bytecode version string (1.4, 1.5, 1.6, 1.7 or 1.8)\n@return true if the bytecode version is JDK 1.5+" ]
[ "lookup a ClassDescriptor in the internal Hashtable\n@param strClassName a fully qualified class name as it is returned by Class.getName().", "Emit an enum event with parameters and force all listener to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(Enum, Object...)", "2-D Perlin noise function.\n\n@param x X Value.\n@param y Y Value.\n@return Returns function's value at point xy.", "Creates a XopBean. The image on the disk is included as a byte array,\na DataHandler and java.awt.Image\n@return the bean\n@throws Exception", "Returns the active logged in user.", "Try to open a file at the given position.", "Returns the perma link for the current page based on the URI and detail content id stored in the CmsObject passed as a parameter.<p<\n\n@param cms the CMS context to use to generate the permalink\n\n@return the permalink", "On host controller reload, remove a not running server registered in the process controller declared as down.", "any possible bean invocations from other ADV observers" ]
public static void checkFileOrDirectoryToBeRead(File fileOrDir, String fileDesc) { if (fileOrDir == null) throw new IllegalArgumentException(fileDesc + " must not be null."); if (!fileOrDir.exists()) throw new IllegalArgumentException(fileDesc + " does not exist: " + fileOrDir.getAbsolutePath()); if (!(fileOrDir.isDirectory() || fileOrDir.isFile())) throw new IllegalArgumentException(fileDesc + " must be a file or a directory: " + fileOrDir.getPath()); if (fileOrDir.isDirectory()) { if (fileOrDir.list().length == 0) throw new IllegalArgumentException(fileDesc + " is an empty directory: " + fileOrDir.getPath()); } }
[ "Throws if the given file is null, is not a file or directory, or is an empty directory." ]
[ "Returns a new instance of the given class using the constructor with the specified parameter.\n\n@param target The class to instantiate\n@param type The types of the single parameter of the constructor\n@param arg The argument\n@return The instance", "1-D Gaussian kernel.\n\n@param size Kernel size (should be odd), [3, 101].\n@return Returns 1-D Gaussian kernel of the specified size.", "Validate the JtsLayer.\n\n@param name mvt layer name\n@param geometries geometries in the tile\n@throws IllegalArgumentException when {@code name} or {@code geometries} are null", "Use this API to fetch spilloverpolicy resource of given name .", "Checks that a field exists and contains a non-null value.\n@param fieldName the name of the field to check existence/value of.\n@return true if the field exists in the result set and has a non-null value; false otherwise.", "Resolve a resource transformer for a given address.\n\n@param address the address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the resource transformer", "Checks if a parameter exists. If it exists, it is left untouched. If it doesn't, it is created. Only works for parameters which key\nis unique. Must be called from within an open transaction.", "Returns whether the values of this division grouping contain the prefix block for the given prefix length\n\n@param prefixLength\n@return", "Adds the basic sentence.\n\n@param s the s\n@throws ParseException the parse exception" ]
private String[] getColumnNames(ResultSetMetaData rsmd) throws Exception { ArrayList<String> names = new ArrayList<String>(); // Get result set meta data int numColumns = rsmd.getColumnCount(); // Get the column names; column indices start from 1 for (int i = 1; i < numColumns + 1; i++) { String columnName = rsmd.getColumnName(i); names.add(columnName); } return names.toArray(new String[0]); }
[ "Gets all of the column names for a result meta data\n\n@param rsmd Resultset metadata\n@return Array of column names\n@throws Exception exception" ]
[ "Get the int resource id with specified type definition\n@param context\n@param id String resource id\n@return int resource id", "Returns the query string currently in the text field.\n\n@return the query string", "Creates a ClassNode containing the wrapper of a ClassNode\nof primitive type. Any ClassNode representing a primitive\ntype should be created using the predefined types used in\nclass. The method will check the parameter for known\nreferences of ClassNode representing a primitive type. If\nReference is found, then a ClassNode will be contained that\nrepresents the wrapper class. For example for boolean, the\nwrapper class is java.lang.Boolean.\n\nIf the parameter is no primitive type, the redirected\nClassNode will be returned\n\n@see #make(Class)\n@see #make(String)\n@param cn the ClassNode containing a possible primitive type", "Closes the output. Should be called after the JSON serialization was\nfinished.\n\n@throws IOException\nif there was a problem closing the output", "Get a bean value from the context.\n\n@param name bean name\n@return bean value or null", "Prepare the filter for the transiton at a given time.\nThe default implementation sets the given filter property, but you could override this method to make other changes.\n@param transition the transition time in the range 0 - 1", "Tries to load a class using the specified ResourceLoader. Returns null if the class is not found.\n@param className\n@param resourceLoader\n@return the loaded class or null if the given class cannot be loaded", "Adds a resource collection with execution hints.", "Call commit on the underlying connection." ]
protected void checkProxyPrefetchingLimit(DefBase def, String checkLevel) throws ConstraintException { if (CHECKLEVEL_NONE.equals(checkLevel)) { return; } if (def.hasProperty(PropertyHelper.OJB_PROPERTY_PROXY_PREFETCHING_LIMIT)) { if (!def.hasProperty(PropertyHelper.OJB_PROPERTY_PROXY)) { if (def instanceof ClassDescriptorDef) { LogHelper.warn(true, ConstraintsBase.class, "checkProxyPrefetchingLimit", "The class "+def.getName()+" has a proxy-prefetching-limit property but no proxy property"); } else { LogHelper.warn(true, ConstraintsBase.class, "checkProxyPrefetchingLimit", "The feature "+def.getName()+" in class "+def.getOwner().getName()+" has a proxy-prefetching-limit property but no proxy property"); } } String propValue = def.getProperty(PropertyHelper.OJB_PROPERTY_PROXY_PREFETCHING_LIMIT); try { int value = Integer.parseInt(propValue); if (value < 0) { if (def instanceof ClassDescriptorDef) { throw new ConstraintException("The proxy-prefetching-limit value of class "+def.getName()+" must be a non-negative number"); } else { throw new ConstraintException("The proxy-prefetching-limit value of the feature "+def.getName()+" in class "+def.getOwner().getName()+" must be a non-negative number"); } } } catch (NumberFormatException ex) { if (def instanceof ClassDescriptorDef) { throw new ConstraintException("The proxy-prefetching-limit value of the class "+def.getName()+" is not a number"); } else { throw new ConstraintException("The proxy-prefetching-limit value of the feature "+def.getName()+" in class "+def.getOwner().getName()+" is not a number"); } } } }
[ "Constraint that ensures that the proxy-prefetching-limit has a valid value.\n\n@param def The descriptor (class, reference, collection)\n@param checkLevel The current check level (this constraint is checked in basic and strict)" ]
[ "Set the time and value of the key at the given index\n@param keyIndex 0 based index of key\n@param time key time in seconds\n@param values key values", "Creates new row in table\n@param broker\n@param field\n@param sequenceName\n@param maxKey\n@throws Exception", "Release all memory addresses taken by this allocator.\nBe careful in using this method, since all of the memory addresses become invalid.", "Use this context as prototype for a new mutable builder. The new builder is\npre-populated with the current settings of this context instance.", "Only call with the read lock held", "Fetches the current online data for the given item, and adds numerical\nlabels if necessary.\n\n@param itemIdValue\nthe id of the document to inspect", "Finish the work of building and sending a protocol packet.\n\n@param kind the type of packet to create and send\n@param payload the content which will follow our device name in the packet\n@param destination where the packet should be sent\n@param port the port to which the packet should be sent\n\n@throws IOException if there is a problem sending the packet", "Creates an immutable list that consists of the elements in the given collection. If the given collection is already an immutable list,\nit is returned directly.\n\n@param source the given collection\n@return an immutable list", "Utility method to retrieve the next working date start time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of next work start" ]
public static <K, V> QueuedKeyedResourcePool<K, V> create(ResourceFactory<K, V> factory) { return create(factory, new ResourcePoolConfig()); }
[ "Create a new queued pool using the defaults for key of type K, request of\ntype R, and value of Type V.\n\n@param factory The factory that creates objects\n@return The created pool" ]
[ "Merges a specialized archetype with its parent. Merge will be done in-place on the specialized parameter.\n\n@param flatParent Flat parent archetype\n@param specialized Specialized archetype", "This function looks for files with the \"wrong\" replica type in their name, and\nif it finds any, renames them.\n\nThose files may have ended up on this server either because:\n- 1. We restored them from another server, where they were named according to\nanother replica type. Or,\n- 2. The {@link voldemort.store.readonly.mr.azkaban.VoldemortBuildAndPushJob}\nand the {@link voldemort.store.readonly.fetcher.HdfsFetcher} are\noperating in 'build.primary.replicas.only' mode, so they only ever built\nand fetched replica 0 of any given file.\n\nNote: This is an implementation detail of the READONLY_V2 naming scheme, and should\nnot be used outside of that scope.\n\n@param masterPartitionId partition ID of the \"primary replica\"\n@param correctReplicaType replica number which should be found on the current\nnode for the provided masterPartitionId.", "Determines the number of elements that the query would return. Override this\nmethod if the size shall be determined in a specific way.\n\n@return The number of elements", "Processes the template for the comma-separated value pairs in an attribute of the current object on the specified level.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"level\" optional=\"false\" description=\"The level for the current object\"\nvalues=\"class,field,reference,collection\"\[email protected] name=\"name\" optional=\"true\" description=\"The name of the attribute containg attributes (defaults to 'attributes')\"\[email protected] name=\"default-right\" optional=\"true\" description=\"The default right value if none is given (defaults to empty value)\"", "This method extracts a portion of a byte array and writes it into\nanother byte array.\n\n@param data Source data\n@param offset Offset into source data\n@param size Required size to be extracted from the source data\n@param buffer Destination buffer\n@param bufferOffset Offset into destination buffer", "Reads a combined date and time value.\n\n@param data byte array of data\n@param offset location of data as offset into the array\n@return time value", "This method is called to alert project listeners to the fact that\na calendar has been read from a project file.\n\n@param calendar calendar instance", "Sets a property on this Javascript object for which the value is a\nJavascriptEnum\n\nThe value is set to what is returned by the getEnumValue() method on the JavascriptEnum\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property.", "Find the index of the specified name in field name array." ]
public void collectVariables(EnvVars env, Run build, TaskListener listener) { EnvVars buildParameters = Utils.extractBuildParameters(build, listener); if (buildParameters != null) { env.putAll(buildParameters); } addAllWithFilter(envVars, env, filter.getPatternFilter()); Map<String, String> sysEnv = new HashMap<>(); Properties systemProperties = System.getProperties(); Enumeration<?> enumeration = systemProperties.propertyNames(); while (enumeration.hasMoreElements()) { String propertyKey = (String) enumeration.nextElement(); sysEnv.put(propertyKey, systemProperties.getProperty(propertyKey)); } addAllWithFilter(sysVars, sysEnv, filter.getPatternFilter()); }
[ "Collect environment variables and system properties under with filter constrains" ]
[ "Returns a list of the rekordbox IDs of the tracks contained in the cache.\n\n@return a list containing the rekordbox ID for each track present in the cache, in the order they appear", "Hide multiple channels. All other channels will be shown.\n@param channels The channels to hide", "Puts strings inside quotes and numerics are left as they are.\n@param str\n@return", "Checks if the provided module is valid and could be stored into the database\n\n@param module the module to test\n@throws WebApplicationException if the data is corrupted", "Update max min.\n\n@param n the n\n@param c the c", "Convenience routine to return the specified error's\nunderlying SyntaxException, or null if it isn't one.", "Calculates a md5 hash for an url\n\nIf a passed in url is absent then this method will return absent as well\n\n@param url - an url to a soy template file\n@return - md5 checksum of a template file\n@throws IOException - in a case there is an IO error calculating md5 checksum", "Apply clipping to the features in a tile. The tile and its features should already be in map space.\n\n@param tile\ntile to put features in\n@param scale\nscale\n@param panOrigin\nWhen panning on the client, only this parameter changes. So we need to be aware of it as we calculate\nthe maxScreenEnvelope.\n@throws GeomajasException oops", "Parses command-line and gets read-only metadata.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException" ]
public static int serialize(OutputStream stream, Object obj) { ObjectMapper mapper = createMapperWithJaxbAnnotationInspector(); try (DataOutputStream data = new DataOutputStream(stream); OutputStreamWriter writer = new OutputStreamWriter(data, StandardCharsets.UTF_8)) { mapper.writerWithDefaultPrettyPrinter().writeValue(writer, obj); return data.size(); } catch (IOException e) { throw new ReportGenerationException(e); } }
[ "Serialize specified object to directory with specified name. Given output stream will be closed.\n\n@param obj object to serialize\n@return number of bytes written to directory" ]
[ "Boot the controller. Called during service start.\n\n@param context the boot context\n@throws ConfigurationPersistenceException\nif the configuration failed to be loaded", "Executes a API query action to get a new token.\nThe method only executes the action, without doing any\nchecks first. If errors occur, they are logged and null is returned.\n\n@param tokenType The kind of token to retrieve like \"csrf\" or \"login\"\n@return newly retrieved token or null if no token was retrieved", "Obtains a Pax zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Pax zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Gets the UTF-8 sequence length of the code point.\n\n@throws InvalidCodePointException if code point is not within a valid range", "Get the default providers list to be used.\n\n@return the default provider list and ordering, not null.", "Retrieve a specific row by index number, creating a blank row if this row does not exist.\n\n@param index index number\n@return MapRow instance", "Check if the specified sql-string is a stored procedure\nor not.\n@param sql The sql query to check\n@return <em>True</em> if the query is a stored procedure, else <em>false</em> is returned.", "Use this API to update inat resources.", "Use this API to add inat resources." ]
private static int abs(int a) { if(a >= 0) return a; else if(a != Integer.MIN_VALUE) return -a; return Integer.MAX_VALUE; }
[ "A modified version of abs that always returns a non-negative value.\nMath.abs returns Integer.MIN_VALUE if a == Integer.MIN_VALUE and this\nmethod returns Integer.MAX_VALUE in that case." ]
[ "Perform the entire sort operation", "Loads treebank data from first argument and prints it.\n\n@param args Array of command-line arguments: specifies a filename", "Retrieves a vertex attribute as an integer array.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>int</i>\n@see #setIntVec(String, IntBuffer)\n@see #getIntArray(String)", "Updates the styling and content of the internal text area based on the real value, the ghost value, and whether\nit has focus.", "Creates a REST client used to perform Voldemort operations against the\nCoordinator\n\n@param storeName Name of the store to perform the operations on\n@param resolver Custom resolver as specified by the application\n@return", "Finds all providers for the given service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@return\nThe ordered set of providers for the service if any exists.\nOtherwise, it returns an empty list.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>", "Extract a duration amount from the assignment, converting a percentage\ninto an actual duration.\n\n@param task parent task\n@param work duration from assignment\n@return Duration instance", "Switches DB type.\n\n@param dbName the database type\n@param webapp the webapp name", "Print the lead string followed by centered formatted string. The whole\nlength of the line is 80 chars.\n\nExample:\n\n```java\nprintCenterWithLead(\" *\", \"Hello %s\", \"World\");\n```\n\nwill print something like\n\n```\n* Hello World\n```\n\nNote the above is just a demo, the exact number of whitespace might not be correct.\n\n\n@param lead\nthe lead string\n@param format\nThe string format pattern\n@param args\nThe string format arguments" ]
public void add(StatementRank rank, Resource subject) { if (this.bestRank == rank) { subjects.add(subject); } else if(bestRank == StatementRank.NORMAL && rank == StatementRank.PREFERRED) { //We found a preferred statement subjects.clear(); bestRank = StatementRank.PREFERRED; subjects.add(subject); } }
[ "Adds a Statement.\n\n@param rank\nrank of the statement\n@param subject\nrdf resource that refers to the statement" ]
[ "Use this API to fetch all the snmpalarm resources that are configured on netscaler.", "Check if the given class represents an array of primitives,\ni.e. boolean, byte, char, short, int, long, float, or double.\n@param clazz the class to check\n@return whether the given class is a primitive array class", "Export the odo overrides setup and odo configuration\n\n@param oldExport Whether this is a backup from scratch or backing up because user will upload after (matches API)\n@return The odo configuration and overrides in JSON format, can be written to a file after", "Generate a map file from a jar file.\n\n@param jarFile jar file\n@param mapFileName map file name\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws XMLStreamException\n@throws IOException\n@throws ClassNotFoundException\n@throws IntrospectionException", "Delete a module\n\n@param moduleId String", "Returns the compact project membership records for the project.\n\n@param project The project for which to fetch memberships.\n@return Request object", "Sets the model that the handling works on.\n\n@param databaseModel The database model\n@param objModel The object model", "Loads the favorite list.\n\n@return the list of favorites\n\n@throws CmsException if something goes wrong", "Use this API to fetch all the appfwsignatures resources that are configured on netscaler." ]
public ItemRequest<CustomField> findById(String customField) { String path = String.format("/custom_fields/%s", customField); return new ItemRequest<CustomField>(this, CustomField.class, path, "GET"); }
[ "Returns the complete definition of a custom field's metadata.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object" ]
[ "Given a status update from a CDJ, find the metadata for the track that it has loaded, if any. If there is\nan appropriate metadata cache, will use that, otherwise makes a query to the players dbserver.\n\n@param status the CDJ status update that will be used to determine the loaded track and ask the appropriate\nplayer for metadata about it\n\n@return the metadata that was obtained, if any", "Use this API to fetch dnspolicylabel resource of given name .", "Two stage promotion, dry run and actual promotion to verify correctness.\n\n@param promotion\n@param client\n@param listener\n@param buildName\n@param buildNumber\n@throws IOException", "Use this API to fetch autoscalepolicy_binding resource of given name .", "Set the state of an individual day in a weekly recurrence.\n\n@param day Day instance\n@param value true if this day is included in the recurrence", "Returns true if required properties for FluoAdmin are set", "Get the next available ordinal for a method ID\n\n@param methodId ID of method\n@return value of next ordinal\n@throws Exception exception", "Mbeans for SLOP_UPDATE", "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" ]
private List<String> parseParams(String param) { Assert.hasText(param, "param must not be empty nor null"); List<String> paramsToUse = new ArrayList<>(); Matcher regexMatcher = DEPLOYMENT_PARAMS_PATTERN.matcher(param); int start = 0; while (regexMatcher.find()) { String p = removeQuoting(param.substring(start, regexMatcher.start()).trim()); if (StringUtils.hasText(p)) { paramsToUse.add(p); } start = regexMatcher.start(); } if (param != null && param.length() > 0) { String p = removeQuoting(param.substring(start, param.length()).trim()); if (StringUtils.hasText(p)) { paramsToUse.add(p); } } return paramsToUse; }
[ "Parses a string of space delimited command line parameters and returns a\nlist of parameters which doesn't contain any special quoting either for\nvalues or whole parameter.\n\n@param param string containing a list\n@return the list" ]
[ "Writes the buffer contents to the given byte channel.\n\n@param channel\n@throws IOException", "Load an animation for the current avatar.\n@param animResource resource with the animation\n@param boneMap optional bone map to map animation skeleton to avatar", "Reads the text files in the given directory and puts their content\nin the given map after compressing it. Note that this method does not\ntraverse recursivly into sub-directories.\n\n@param dir The directory to process\n@param results Map that will receive the contents (indexed by the relative filenames)\n@throws IOException If an error ocurred", "Obtains a Accounting zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Accounting zoned date-time, not null\n@throws DateTimeException if unable to create the date-time", "Searches for brackets which are only used to construct new matrices by concatenating\n1 or more matrices together", "Writes task predecessor links to a PM XML file.\n\n@param task MPXJ Task instance", "Add a rollback loader for a give patch.\n\n@param patchId the patch id.\n@param target the patchable target\n@throws XMLStreamException\n@throws IOException", "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.", "The default User-Agent header. Override this method to override the user agent.\n\n@return the user agent string." ]
public void setValue(T value) { try { lock.writeLock().lock(); this.value = value; } finally { lock.writeLock().unlock(); } }
[ "Change the value that is returned by this generator.\n@param value The new value to return." ]
[ "Returns the earlier of two dates, handling null values. A non-null Date\nis always considered to be earlier than a null Date.\n\n@param d1 Date instance\n@param d2 Date instance\n@return Date earliest date", "This method extracts project extended attribute data from an MSPDI file.\n\n@param project Root node of the MSPDI file", "Gets bounds which are identical for all dimensions.\n\n@param dim The number of dimensions.\n@param l The value of all lower bounds.\n@param u The value of all upper bounds.\n@return The new bounds.", "Returns all the persistent id generators which potentially require the creation of an object in the schema.", "Tries to guess location of the user secure keyring using various\nheuristics.\n\n@return path to the keyring file\n@throws FileNotFoundException if no keyring file found", "Synchronize the geotools transaction with the platform transaction, if such a transaction is active.\n\n@param featureStore\n@param dataSource", "Create a style from a list of rules.\n\n@param styleRules the rules", "Determine the target type for the generic return type of the given method,\nwhere formal type variables are declared on the given class.\n@param method the method to introspect\n@param clazz the class to resolve type variables against\n@return the corresponding generic parameter or return type\n@see #resolveReturnTypeForGenericMethod", "Pass the activity you use the drawer in ;)\nThis is required if you want to set any values by resource\n\n@param activity\n@return" ]
public Collection<BoxFileVersion> getVersions() { URL url = VERSIONS_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID()); BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET"); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject jsonObject = JsonObject.readFrom(response.getJSON()); JsonArray entries = jsonObject.get("entries").asArray(); Collection<BoxFileVersion> versions = new ArrayList<BoxFileVersion>(); for (JsonValue entry : entries) { versions.add(new BoxFileVersion(this.getAPI(), entry.asObject(), this.getID())); } return versions; }
[ "Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve\nprevious versions of their files.\n\n@return a list of previous file versions." ]
[ "Process calendar hours and exception data from the database.\n\n@param calendars all calendars for the project", "Enables a dark shadow for this CircularImageView.\nIf the radius is set to 0, the shadow is removed.\n@param radius Radius for the shadow to extend to.\n@param dx Horizontal shadow offset.\n@param dy Vertical shadow offset.\n@param color The color of the shadow to apply.", "Used internally to find the solution to a single column vector.", "Draw the specified geometry.\n\n@param geometry geometry to draw\n@param symbol symbol for geometry\n@param fillColor fill colour\n@param strokeColor stroke colour\n@param lineWidth line width\n@param clipRect clipping rectangle", "Prints to a file. If the file does not exist, rewrites the file;\ndoes not append.", "Use this API to fetch all the nsacl6 resources that are configured on netscaler.", "Support the range subscript operator for String with IntRange\n\n@param text a String\n@param range an IntRange\n@return the resulting String\n@since 1.0", "Sends the events to monitoring service client.\n\n@param events the events", "Returns a new instance of the class with the given qualified name using the constructor with\nthe specified parameter.\n\n@param className The qualified name of the class to instantiate\n@param type The types of the single parameter of the constructor\n@param arg The argument\n@return The instance" ]
public void setProxy(String proxyHost, int proxyPort, String username, String password) { setProxy(proxyHost, proxyPort); proxyAuth = true; proxyUser = username; proxyPassword = password; }
[ "Set a proxy with authentication for REST-requests.\n\n@param proxyHost\n@param proxyPort\n@param username\n@param password" ]
[ "Check given class modifiers. Plugin with resources plugin should not be private or abstract\nor interface.", "Obtains a Ethiopic local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic local date-time, not null\n@throws DateTimeException if unable to create the date-time", "Sets the HTML entity translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator\n@return this to allow chaining", "Generated the report.", "Runs a Story with the given configuration and steps, applying the given\nmeta filter.\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@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.", "Use this API to save cacheobject.", "Helper method to get a list of node ids.\n\n@param nodeList", "Creates an IndexableTaskItem from provided FunctionalTaskItem.\n\n@param taskItem functional TaskItem\n@return IndexableTaskItem", "Position the child inside the layout based on the offset and axis-s factors\n@param dataIndex data index" ]
public List<BoxComment.Info> getComments() { URL url = GET_COMMENTS_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID()); BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET"); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject responseJSON = JsonObject.readFrom(response.getJSON()); int totalCount = responseJSON.get("total_count").asInt(); List<BoxComment.Info> comments = new ArrayList<BoxComment.Info>(totalCount); JsonArray entries = responseJSON.get("entries").asArray(); for (JsonValue value : entries) { JsonObject commentJSON = value.asObject(); BoxComment comment = new BoxComment(this.getAPI(), commentJSON.get("id").asString()); BoxComment.Info info = comment.new Info(commentJSON); comments.add(info); } return comments; }
[ "Gets a list of any comments on this file.\n\n@return a list of comments on this file." ]
[ "Method used to create missing timephased data.\n\n@param file project file\n@param assignment resource assignment\n@param timephasedPlanned planned timephased data\n@param timephasedComplete complete timephased data", "Returns the default safety level preference for the user.\n\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_MODERATE\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_RESTRICTED\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_SAFE\n@return The current users safety-level\n@throws FlickrException", "Indicates whether or not an event ID is a duplicate.\n\n<p>This method can be overridden by a subclass in order to provide custom de-duping logic.</p>\n\n@param eventID the event ID.\n@return true if the event is a duplicate; otherwise false.", "Call when you are done with the client\n\n@throws Exception", "Retrieve the integer value used to represent a task field in an\nMPX file.\n\n@param value MPXJ task field value\n@return MPX field value", "create a new instance of class clazz.\nfirst use the public default constructor.\nIf this fails also try to use protected an private constructors.\n@param clazz the class to instantiate\n@return the fresh instance of class clazz\n@throws InstantiationException", "Use this API to Import application.", "Filter events.\n\n@param events the events\n@return the list of filtered events", "Returns the given collection persister for the inverse side in case the given persister represents the main side\nof a bi-directional many-to-many association.\n\n@param mainSidePersister the collection persister on the main side of a bi-directional many-to-many association\n@return the collection persister for the inverse side of the given persister or {@code null} in case it\nrepresents the inverse side itself or the association is uni-directional" ]
private static double threePointsAngle(Point vertex, Point A, Point B) { double b = pointsDistance(vertex, A); double c = pointsDistance(A, B); double a = pointsDistance(B, vertex); return Math.toDegrees(Math.acos((a * a + b * b - c * c) / (2 * a * b))); }
[ "calculate the point a's angle of rectangle consist of point a,point b, point c;\n\n@param vertex\n@param A\n@param B\n@return" ]
[ "Calculates the bar width and bar margin based on the _DataSize and settings and starts the boundary\ncalculation in child classes.\n@param _DataSize Amount of data sets", "Active inverter colors", "send object to client and serialize it using JSON\n\n@param objectToSend the object to send\n@param cb the callback after sending the message", "Additional bean deployment archives are used for extentions, synthetic annotated types and beans which do not come from a bean archive.\n\n@param beanClass\n@return the additional bean deployment archive", "Converts an image to a RGBA direct color model using a workaround via buffered image directly calling the\nColorConvert operation fails for unknown reasons ?!\n\n@param img image to convert\n@return converted image", "The digits were stored as a hex value, thix switches them to an octal value.\n\n@param currentHexValue\n@param digitCount\n@return", "Processes the template for all class definitions.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"", "Uploads a new file to this folder with custom upload parameters.\n\n@param uploadParams the custom upload parameters.\n@return the uploaded file's info.", "Parses a name into a Region object and creates a new Region instance if not found among the existing ones.\n\n@param name a region name\n@return the parsed or created region" ]
public String toIPTC(SubjectReferenceSystem srs) { StringBuffer b = new StringBuffer(); b.append("IPTC:"); b.append(getNumber()); b.append(":"); if (getNumber().endsWith("000000")) { b.append(toIPTCHelper(srs.getName(this))); b.append("::"); } else if (getNumber().endsWith("000")) { b.append(toIPTCHelper(srs.getName(srs.get(getNumber().substring(0, 2) + "000000")))); b.append(":"); b.append(toIPTCHelper(srs.getName(this))); b.append(":"); } else { b.append(toIPTCHelper(srs.getName(srs.get(getNumber().substring(0, 2) + "000000")))); b.append(":"); b.append(toIPTCHelper(srs.getName(srs.get(getNumber().substring(0, 5) + "000")))); b.append(":"); b.append(toIPTCHelper(srs.getName(this))); } return b.toString(); }
[ "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" ]
[ "Get the values for a particular configuration property\n\n@param name - name of the property\n@return All values encountered or null", "Specify the proxy and the authentication parameters to be used\nto establish the connections to Apple Servers.\n\n<p>Read the <a href=\"http://java.sun.com/javase/6/docs/technotes/guides/net/proxies.html\">\nJava Networking and Proxies</a> guide to understand the\nproxies complexity.\n\n@param proxy the proxy object to be used to create connections\n@param proxyUsername a String object representing the username of the proxy server\n@param proxyPassword a String object representing the password of the proxy server\n@return this", "Tries to load a site specific error page. If\n@param cms {@link CmsObject} used for reading the resource (site root and uri get adjusted!)\n@param req the current request\n@param res the current response\n@param errorCode the error code to display\n@return a flag, indicating if the custom error page could be loaded.", "Peeks the current top of the stack or returns null if the stack is empty\n@return the current top of the stack or returns null if the stack is empty", "Extract and return the table name for a class.", "Create a request for elevations for samples along a path.\n\n@param req\n@param callback", "Set default values for annotations.\nInitial annotation take precedence over the default annotation when both annotation types are present\n\n@param defaultAnnotations default value for annotations", "Returns the number of key-value mappings in this map for the third key.\n\n@param firstKey\nthe first key\n@param secondKey\nthe second key\n@return Returns the number of key-value mappings in this map for the third key.", "Initializes the external child resource collection." ]
public static void read(InputStream stream, byte[] buffer) throws IOException { int read = 0; while(read < buffer.length) { int newlyRead = stream.read(buffer, read, buffer.length - read); if(newlyRead == -1) throw new EOFException("Attempt to read " + buffer.length + " bytes failed due to EOF."); read += newlyRead; } }
[ "Read exactly buffer.length bytes from the stream into the buffer\n\n@param stream The stream to read from\n@param buffer The buffer to read into" ]
[ "Explode the deployment contents and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException", "Use this API to count sslcipher_individualcipher_binding resources configued on NetScaler.", "Look up all recorded playback state information.\n\n@return the playback state recorded for any player\n@since 0.5.0", "Sets the color for the big total between the column and row\n@param row row index (starting from 1)\n@param column column index (starting from 1)\n@param color", "Returns the bill for the month specified.\n\n@param month for which bill to retrieve.\n@param year for which bill to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.", "Use this API to fetch auditnslogpolicy_systemglobal_binding resources of given name .", "Visits a method instruction. A method instruction is an instruction that\ninvokes a method.\n\n@param opcode\nthe opcode of the type instruction to be visited. This opcode\nis either INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or\nINVOKEINTERFACE.\n@param owner\nthe internal name of the method's owner class (see\n{@link Type#getInternalName() getInternalName}).\n@param name\nthe method's name.\n@param desc\nthe method's descriptor (see {@link Type Type}).\n@param itf\nif the method's owner class is an interface.", "Called on mouse up in the caption area, ends dragging by ending event\ncapture.\n\n@param event the mouse up event that ended dragging\n\n@see DOM#releaseCapture\n@see #beginDragging\n@see #endDragging", "Get the last modified time for a set of files." ]
@Override public String toNormalizedString() { String result = normalizedString; if(result == null) { normalizedString = result = toNormalizedString(false); } return result; }
[ "Provides a normalized string which is lowercase for host strings, and which is a normalized string for addresses.\n@return" ]
[ "Add a clause where the ID is from an existing object.", "Checks the widget by index\n@param checkableIndex The index is in the range from 0 to size -1, where size is the number of\nCheckable widgets in the group. It does not take into account any\nnon-Checkable widgets added to the group widget.\n@return {@code True} if {@code checkableWidget} is a child of this {@code CheckableGroup} and\nwas not already checked; {@code false} otherwise.", "Saves the favorites.\n\n@param favorites the list of favorites to save\n@throws CmsException if something goes wrong", "Use this API to expire cacheobject.", "Get the list of supported resolutions for the layer. Each resolution is specified in map units per pixel.\n\n@return list of supported resolutions\n@deprecated use {@link #getZoomLevels()}", "Open the store with the version directory specified. If null is specified\nwe open the directory with the maximum version\n\n@param versionDir Version Directory to open. If null, we open the max\nversioned / latest directory", "Loads the leap second rules from a URL, often in a jar file.\n\n@param url the jar file to load, not null\n@throws Exception if an error occurs", "Converts the text stream data to HTML form.\n\n@param content the content to convert\n@return the HTML version of the content", "Add the final assignment of the property to the partial value object's source code." ]
public boolean checkSuffixes(String uri, String[] patterns) { for (String pattern : patterns) { if (pattern.length() > 0) { if (uri.endsWith(pattern)) { return true; } } } return false; }
[ "Check whether the URL end with one of the given suffixes.\n\n@param uri URI\n@param patterns possible suffixes\n@return true when URL ends with one of the suffixes" ]
[ "Parse the given projection.\n\n@param projection The projection string.\n@param longitudeFirst longitudeFirst", "Put the core auto-code algorithm here so an external class can call it", "Returns angle in degrees between two points\n\n@param ax x of the point 1\n@param ay y of the point 1\n@param bx x of the point 2\n@param by y of the point 2\n@return angle in degrees between two points", "replace the counter for K1-index o by new counter c", "Starts the named animation.\n@see GVRAvatar#stop(String)\n@see GVRAnimationEngine#start(GVRAnimation)", "Extracts value from map if given value is null.\n@param value current value\n@param props properties to extract value from\n@param key property name to extract\n@return initial value or value extracted from map", "Allows testsuites to shorten the domain timeout adder", "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", "This is a service method that takes care of putting al the target values in a single array.\n@return" ]
private void readTable(InputStream is, SynchroTable table) throws IOException { int skip = table.getOffset() - m_offset; if (skip != 0) { StreamHelper.skip(is, skip); m_offset += skip; } String tableName = DatatypeConverter.getString(is); int tableNameLength = 2 + tableName.length(); m_offset += tableNameLength; int dataLength; if (table.getLength() == -1) { dataLength = is.available(); } else { dataLength = table.getLength() - tableNameLength; } SynchroLogger.log("READ", tableName); byte[] compressedTableData = new byte[dataLength]; is.read(compressedTableData); m_offset += dataLength; Inflater inflater = new Inflater(); inflater.setInput(compressedTableData); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(compressedTableData.length); byte[] buffer = new byte[1024]; while (!inflater.finished()) { int count; try { count = inflater.inflate(buffer); } catch (DataFormatException ex) { throw new IOException(ex); } outputStream.write(buffer, 0, count); } outputStream.close(); byte[] uncompressedTableData = outputStream.toByteArray(); SynchroLogger.log(uncompressedTableData); m_tableData.put(table.getName(), uncompressedTableData); }
[ "Read data for a single table and store it.\n\n@param is input stream\n@param table table header" ]
[ "Returns the primary port of the server.\n\n@return the primary {@link ServerPort} if the server is started. {@link Optional#empty()} otherwise.", "Get a patch entry for either a layer or add-on.\n\n@param name the layer name\n@param addOn whether the target is an add-on\n@return the patch entry, {@code null} if it there is no such layer", "Sets the country for which currencies should be requested.\n\n@param countries The ISO countries.\n@return the query for chaining.", "retrieve a single reference- or collection attribute\nof a persistent instance.\n@param pInstance the persistent instance\n@param pAttributeName the name of the Attribute to load", "Write a double attribute.\n\n@param name attribute name\n@param value attribute value", "Get a property as an long or throw an exception.\n\n@param key the property name", "Keep a cache of items files associated with classification in order to improve performance.", "Creates the container for a bundle without descriptor.\n@return the container for a bundle without descriptor.\n@throws IOException thrown if reading the bundle fails.\n@throws CmsException thrown if reading the bundle fails.", "Create a new path address by appending more elements to the end of this address.\n\n@param additionalElements the elements to append\n@return the new path address" ]
private void readResourceAssignments(Project gpProject) { Allocations allocations = gpProject.getAllocations(); if (allocations != null) { for (Allocation allocation : allocations.getAllocation()) { readResourceAssignment(allocation); } } }
[ "Read all resource assignments from a GanttProject project.\n\n@param gpProject GanttProject project" ]
[ "Tries to load the custom error page at the given rootPath.\n@param cms {@link CmsObject} used for reading the resource (site root and uri get adjusted!)\n@param req the current request\n@param res the current response\n@param rootPath the VFS root path to the error page resource\n@return a flag, indicating if the error page could be loaded", "Given a list of store definitions return a set of store names\n\n@param storeDefList The list of store definitions\n@return Returns a set of store names", "Write the given long value as a 4 byte unsigned integer. Overflow is\nignored.\n\n@param buffer The buffer to write to\n@param index The position in the buffer at which to begin writing\n@param value The value to write", "Defines how messages should be logged. This method can be modified to\nrestrict the logging messages that are shown on the console or to change\ntheir formatting. See the documentation of Log4J for details on how to do\nthis.", "Gets the current instance of plugin manager\n\n@return PluginManager", "Replace bad xml charactes in given array by space\n\n@param cbuf buffer to replace in\n@param off Offset from which to start reading characters\n@param len Number of characters to be replaced", "this method looks up the appropriate JDOClass for a given persistent Class.\nIt uses the JDOModel to perfom this lookup.\n@param c the persistent Class\n@return the JDOCLass object", "Sets the value of the given variable\n\n@param name the name of the variable to set\n@param value the new value for the given variable", "a useless object at the top level of the response JSON for no reason at all." ]
public static CustomInfo getOrCreateCustomInfo(Message message) { CustomInfo customInfo = message.get(CustomInfo.class); if (customInfo == null) { customInfo = new CustomInfo(); message.put(CustomInfo.class, customInfo); } return customInfo; }
[ "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" ]
[ "Helper method to send message on outputStream and account for network\ntime stats.\n\n@param outputStream\n@param message\n@throws IOException", "Export data base contents to a directory using supplied connection.\n\n@param connection database connection\n@param directory target directory\n@throws Exception", "This method extracts project properties from a Phoenix file.\n\n@param phoenixSettings Phoenix settings\n@param storepoint Current storepoint", "Throws an IllegalArgumentException when the given value is not true.\n@param value the value to assert if true\n@param message the message to display if the value is false\n@return the value", "Removes all events from table\n\n@param table the table to remove events", "Use this API to fetch gslbvserver_spilloverpolicy_binding resources of given name .", "Return a new instance of the BufferedImage\n\n@return BufferedImage", "Loads the currently known phases from Furnace to the map.", "Evaluates the body if the current class has at least one member with at least one tag with the specified name.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException Description of Exception\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" description=\"The parameter name. If not specified, then the raw\ncontent of the tag is returned.\"\[email protected] name=\"error\" description=\"Show this error message if no tag found.\"" ]
public static boolean isFileExist(String filePath) { File f = new File(filePath); return f.exists() && !f.isDirectory(); }
[ "Checks if is file exist.\n\n@param filePath\nthe file path\n@return true, if is file exist" ]
[ "Returns the default privacy level preference for the user.\n\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_NO_FILTER\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_PUBLIC\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FAMILY\n@see com.flickr4java.flickr.Flickr#PRIVACY_LEVEL_FRIENDS\n@throws FlickrException\n@return privacyLevel", "Adds a file to your assembly but automatically genarates the name of the file.\n\n@param inputStream {@link InputStream} the file to be uploaded.", "Visits a method instruction. A method instruction is an instruction that\ninvokes a method.\n\n@param opcode\nthe opcode of the type instruction to be visited. This opcode\nis either INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or\nINVOKEINTERFACE.\n@param owner\nthe internal name of the method's owner class (see\n{@link Type#getInternalName() getInternalName}).\n@param name\nthe method's name.\n@param desc\nthe method's descriptor (see {@link Type Type}).\n@param itf\nif the method's owner class is an interface.", "Required to close the connection reading on the terminal, otherwise\nit can't be interrupted.\n\n@throws InterruptedException", "This method is used to extract the resource hyperlink attributes\nfrom a block of data and call the appropriate modifier methods\nto configure the specified task object.\n\n@param resource resource instance\n@param data hyperlink data block", "Get the element at the index as a float.\n\n@param i the index of the element to access", "Write correlation id.\n\n@param message the message\n@param correlationId the correlation id", "Returns a flag indicating if the query given by the parameters should be ignored.\n@return A flag indicating if the query given by the parameters should be ignored.", "Places the real component of the input matrix into the output matrix.\n\n@param input Complex matrix. Not modified.\n@param output real matrix. Modified." ]
private void addFilters(MpxjTreeNode parentNode, List<Filter> filters) { for (Filter field : filters) { final Filter f = field; MpxjTreeNode childNode = new MpxjTreeNode(field) { @Override public String toString() { return f.getName(); } }; parentNode.add(childNode); } }
[ "Add filters to the tree.\n\n@param parentNode parent tree node\n@param filters list of filters" ]
[ "Use this API to disable vserver of given name.", "Given an array of variable names, returns a JsonObject\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@return a json object of values", "Manage the artifact add to the Module AbstractGraph\n\n@param graph\n@param depth", "Sets the values of this input field. Only Applicable check-boxes and a radio buttons.\n\n@param values Values to set.", "Gets a JSON string containing any pending changes to this object that can be sent back to the Box API.\n@return a JSON string containing the pending changes.", "Get logs for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return log stream response", "Log modified request\n\n@param httpMethodProxyRequest\n@param httpServletResponse\n@param history", "Use this API to delete sslcertkey resources of given names.", "Creates necessary objects to make a chart an hyperlink\n\n@param design\n@param djlink\n@param chart\n@param name" ]
public static double Y(double x) { if (x < 8.0) { double y = x * x; double ans1 = x * (-0.4900604943e13 + y * (0.1275274390e13 + y * (-0.5153438139e11 + y * (0.7349264551e9 + y * (-0.4237922726e7 + y * 0.8511937935e4))))); double ans2 = 0.2499580570e14 + y * (0.4244419664e12 + y * (0.3733650367e10 + y * (0.2245904002e8 + y * (0.1020426050e6 + y * (0.3549632885e3 + y))))); return (ans1 / ans2) + 0.636619772 * (J(x) * Math.log(x) - 1.0 / x); } else { double z = 8.0 / x; double y = z * z; double xx = x - 2.356194491; double ans1 = 1.0 + y * (0.183105e-2 + y * (-0.3516396496e-4 + y * (0.2457520174e-5 + y * (-0.240337019e-6)))); double ans2 = 0.04687499995 + y * (-0.2002690873e-3 + y * (0.8449199096e-5 + y * (-0.88228987e-6 + y * 0.105787412e-6))); return Math.sqrt(0.636619772 / x) * (Math.sin(xx) * ans1 + z * Math.cos(xx) * ans2); } }
[ "Bessel function of the second kind, of order 1.\n\n@param x Value.\n@return Y value." ]
[ "Add parameter to testCase\n\n@param context which can be changed", "Returns the real key object.", "Hides the original Java-style method name using an attribute\nwhich should be respected by Visual Studio, the creates a new\nwrapper method using a .Net style method name.\n\nNote that this does not work for VB as it is case insensitive. Even\nthough Visual Studio won't show you the Java-style method name,\nthe VB compiler sees both and thinks they are the same... which\ncauses it to fail.\n\n@param writer output stream\n@param aClass class being processed\n@param methodSet set of methods which have been processed.\n@throws XMLStreamException", "remove all prefetching listeners", "Parse a version String and add the components to a properties object.\n\n@param version the version to parse", "Set the position of the pick ray.\nThis function is used internally to update the\npick ray with the new controller position.\n@param x the x value of the position.\n@param y the y value of the position.\n@param z the z value of the position.", "Record the checkout wait time in us\n\n@param dest Destination of the socket to checkout. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param checkoutTimeUs The number of us to wait before getting a socket", "Returns a product regarding its name\n\n@param name String\n@return DbProduct", "Create a patch representing what we actually processed. This may contain some fixed content hashes for removed\nmodules.\n\n@param original the original\n@return the processed patch" ]
public Response remove(DesignDocument designDocument) { assertNotEmpty(designDocument, "DesignDocument"); ensureDesignPrefixObject(designDocument); return db.remove(designDocument); }
[ "Removes a design document using DesignDocument object from the database.\n\n@param designDocument the design document object to be removed\n@return {@link DesignDocument}" ]
[ "Use this API to add cachepolicylabel.", "Sets either the upper or low triangle of a matrix to zero", "Use this API to fetch filtered set of appfwlearningsettings resources.\nset the filter parameter values in filtervalue object.", "Extract a Class from the given Type.", "Calls the specified Stitch function, and decodes the response into an instance of the specified\ntype. The response will be decoded using the codec registry given.\n\n@param name the name of the Stitch function to call.\n@param args the arguments to pass to the Stitch function.\n@param requestTimeout the number of milliseconds the client should wait for a response from the\nserver before failing with an error.\n@param resultClass the class that the Stitch response should be decoded as.\n@param <T> the type into which the Stitch response will be decoded.\n@param codecRegistry the codec registry that will be used to encode/decode the function call.\n@return the decoded value.", "Write resource assignment.\n\n@param record resource assignment instance\n@throws IOException", "Returns the property value read from the given JavaBean.\n\n@param bean the JavaBean to read the property from\n@param property the property to read\n\n@return the property value read from the given JavaBean", "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.", "Checks that the data starting at startLocRecord looks like a local file record header.\n\n@param channel the channel\n@param startLocRecord offset into channel of the start of the local record\n@param compressedSize expected compressed size of the file, or -1 to indicate this isn't known" ]
public static Boolean parseBoolean(String value) throws ParseException { Boolean result = null; Integer number = parseInteger(value); if (number != null) { result = number.intValue() == 0 ? Boolean.FALSE : Boolean.TRUE; } return result; }
[ "Parse a string representation of a Boolean value.\n\n@param value string representation\n@return Boolean value" ]
[ "Returns the finish date for this resource assignment.\n\n@return finish date", "Use this API to update onlinkipv6prefix resources.", "Logs all properties", "Clears the dest ColumnBuffer and inserts all entries in dest where the timestamp passes the\ntimestampTest.\n\n@param dest Destination ColumnBuffer\n@param timestampTest Test to determine which timestamps get added to dest", "Returns the value of this product under the given model.\n\n@param evaluationTime Evaluation time.\n@param model The model.\n@return Value of this product und the given model.", "Computes the square root of the complex number.\n\n@param input Input complex number.\n@param root Output. The square root of the input", "return the ctc costs and gradients, given the probabilities and labels", "Handle a value change.\n@param propertyId the column in which the value has changed.", "Transits a float property from the start value to the end value.\n\n@param propertyId\n@param vals\n@return self" ]
public void logAttributeWarning(PathAddress address, String message, String attribute) { logAttributeWarning(address, null, message, attribute); }
[ "Log warning for the resource at the provided address and single attribute, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param message custom error message to append\n@param attribute attribute we are warning about" ]
[ "Returns a RowColumn following the current one\n\n@return RowColumn following this one", "Parse a date value.\n\n@param value String representation\n@return Date instance", "Notifies that a content item is removed.\n\n@param position the position.", "Records that there is no media mounted in a particular media player slot, updating listeners if this is a change,\nand clearing any affected items from our in-memory caches.\n\n@param slot the slot in which no media is mounted", "Removes a value from the list.\n\n@param list the list\n@param value value to remove", "Creates a timespan from a list of other timespans.\n\n@return a timespan representing the sum of all the timespans provided", "return a HashMap with all properties, name as key, value as value\n@return the properties", "Selects the specified value in the list.\n\n@param value the new value\n@param fireEvents if true, a ValueChangeEvent event will be fired\n@see #setAddMissingValue", "This is a convenience method used to add a default set of calendar\nhours to a calendar.\n\n@param day Day for which to add default hours for" ]
private void calcCurrentItem() { int pointerAngle; // calculate the correct pointer angle, depending on clockwise drawing or not if(mOpenClockwise) { pointerAngle = (mIndicatorAngle + 360 - mPieRotation) % 360; } else { pointerAngle = (mIndicatorAngle + 180 + mPieRotation) % 360; } for (int i = 0; i < mPieData.size(); ++i) { PieModel model = mPieData.get(i); if (model.getStartAngle() <= pointerAngle && pointerAngle <= model.getEndAngle()) { if (i != mCurrentItem) { setCurrentItem(i, false); } break; } } }
[ "Calculate which pie slice is under the pointer, and set the current item\nfield accordingly." ]
[ "Readable yyyyMMdd int representation of a day, which is also sortable.", "First looks for zeros and then performs the implicit single step in the QR Algorithm.", "Adds a security property to be passed to the server.\n\n@param key the property key\n@param value the property value\n\n@return the builder", "Cancel all task with this tag and returns the canceled task count\n\n@param tagToCancel\n@return", "Validates the deployment.\n\n@param isDomain {@code true} if this is a domain server, otherwise {@code false}\n\n@throws MojoDeploymentException if the deployment is invalid", "Use this API to fetch aaapreauthenticationpolicy_binding resource of given name .", "Should be called after new data is inserted. Will be automatically called, when the view dimensions\nhas changed.\n\nCalculates the start- and end-angles for every PieSlice.", "Ask the specified player for the album art in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param artReference uniquely identifies the desired album art\n@param trackType the kind of track that owns the art\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nartwork updates will use available caches only\n\n@return the album art found, if any", "Attaches the menu drawer to the content view." ]
public final static void appendCode(final StringBuilder out, final String in, final int start, final int end) { for (int i = start; i < end; i++) { final char c; switch (c = in.charAt(i)) { case '&': out.append("&amp;"); break; case '<': out.append("&lt;"); break; case '>': out.append("&gt;"); break; default: out.append(c); break; } } }
[ "Appends the given string encoding special HTML characters.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nInput String starting position.\n@param end\nInput String end position." ]
[ "Returns the JMX connector address of a child process.\n\n@param p the process to which to connect\n@param startAgent whether to installed the JMX agent in the target process if not already in place\n@return a {@link JMXServiceURL} to the process's MBean server", "Returns a ReportWriter that which will use memory or a file depending on the parameter PAGES_THRESHOLD\n@param _jasperPrint\n@param _format\n@param _parameters\n@return", "Updates the information about the user status for this terms of service with any info fields that have\nbeen modified locally.\n@param info the updated info.", "Gets a design document using the id and revision from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@param rev the document revision\n@return {@link DesignDocument}", "Ask the specified player for the specified waveform detail from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform detail\n\n@return the waveform detail, if it was found, or {@code null}\n\n@throws IllegalStateException if the WaveformFinder is not running", "Use this API to fetch all the snmpoption resources that are configured on netscaler.", "Creates a new subtask and adds it to the parent task. Returns the full record\nfor the newly created subtask.\n\n@param task The task to add a subtask to.\n@return Request object", "Deletes a path from the filesystem\n\nIf the path is a directory its contents\nwill be recursively deleted before it itself\nis deleted.\n\nNote that removal of a directory is not an atomic-operation\nand so if an error occurs during removal, some of the directories\ndescendants may have already been removed\n\n@throws IOException if an error occurs whilst removing a file or directory", "Register a data type with the manager." ]
private static void bodyWithBuilder( SourceBuilder code, Datatype datatype, Map<Property, PropertyCodeGenerator> generatorsByProperty, String typename, Predicate<PropertyCodeGenerator> isOptional) { Variable result = new Variable("result"); code.add(" %1$s %2$s = new %1$s(\"%3$s{", StringBuilder.class, result, typename); boolean midStringLiteral = true; boolean midAppends = true; boolean prependCommas = false; PropertyCodeGenerator lastOptionalGenerator = generatorsByProperty.values() .stream() .filter(isOptional) .reduce((first, second) -> second) .get(); for (Property property : generatorsByProperty.keySet()) { PropertyCodeGenerator generator = generatorsByProperty.get(property); if (isOptional.test(generator)) { if (midStringLiteral) { code.add("\")"); } if (midAppends) { code.add(";%n "); } code.add("if ("); if (generator.initialState() == Initially.OPTIONAL) { generator.addToStringCondition(code); } else { code.add("!%s.contains(%s.%s)", UNSET_PROPERTIES, datatype.getPropertyEnum(), property.getAllCapsName()); } code.add(") {%n %s.append(\"", result); if (prependCommas) { code.add(", "); } code.add("%s=\").append(%s)", property.getName(), property.getField()); if (!prependCommas) { code.add(".append(\", \")"); } code.add(";%n }%n "); if (generator.equals(lastOptionalGenerator)) { code.add("return %s.append(\"", result); midStringLiteral = true; midAppends = true; } else { midStringLiteral = false; midAppends = false; } } else { if (!midAppends) { code.add("%s", result); } if (!midStringLiteral) { code.add(".append(\""); } if (prependCommas) { code.add(", "); } code.add("%s=\").append(%s)", property.getName(), (Excerpt) generator::addToStringValue); midStringLiteral = false; midAppends = true; prependCommas = true; } } checkState(prependCommas, "Unexpected state at end of toString method"); checkState(midAppends, "Unexpected state at end of toString method"); if (!midStringLiteral) { code.add(".append(\""); } code.add("}\").toString();%n", result); }
[ "Generates the body of a toString method that uses a StringBuilder.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\noptional, we have no choice but to track the separators at runtime, but if any of them will\nalways be present, we can actually do the hard work at compile time. Specifically, we can pick\nthe first such and output it without a comma; any property before it will have a comma\n<em>appended</em>, and any property after it will have a comma <em>prepended</em>. This gives\nus the right number of commas in the right places in all circumstances.\n\n<p>As well as keeping track of whether we are <b>prepending commas</b> yet (initially false),\nwe also keep track of whether we have just finished an if-then block for an optional property,\nor if we are in the <b>middle of an append chain</b>, and if so, whether we are in the\n<b>middle of a string literal</b>. This lets us output the fewest literals and statements,\nmuch as a mildly compulsive programmer would when writing the same code." ]
[ "Destroy the proxy & update the map containing the registration ref.\n\n@param importDeclaration", "Concatenate all the arrays in the list into a vector.\n\n@param arrays List of arrays.\n@return Vector.", "Construct a pretty string documenting progress for this batch plan thus\nfar.\n\n@return pretty string documenting progress", "Create an error image should an error occur while fetching a WMS map.\n\n@param width image width\n@param height image height\n@param e exception\n@return error image\n@throws java.io.IOException oops", "Term value.\n\n@param term\nthe term\n@return the string", "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.", "Creates a sort configuration iff at least one of the parameters is not null and the options list is not empty.\n@param sortParam The request parameter used to send the currently chosen search option.\n@param options The available sort options.\n@param defaultOption The default sort option.\n@return the sort configuration or null, depending on the arguments.", "Close the store.", "Saves messages to a propertyvfsbundle file.\n\n@throws CmsException thrown if writing to the file fails." ]
public static long decodeLong(byte[] ba, int offset) { return ((((long) ba[offset + 0] << 56) + ((long) (ba[offset + 1] & 255) << 48) + ((long) (ba[offset + 2] & 255) << 40) + ((long) (ba[offset + 3] & 255) << 32) + ((long) (ba[offset + 4] & 255) << 24) + ((ba[offset + 5] & 255) << 16) + ((ba[offset + 6] & 255) << 8) + ((ba[offset + 7] & 255) << 0))); }
[ "Decode long from byte array at offset\n\n@param ba byte array\n@param offset Offset\n@return long value" ]
[ "Add a Opacity bar to the color wheel.\n\n@param bar The instance of the Opacity bar.", "Log a message with a throwable at the provided level.", "Creates a new Message from the specified text.", "Sets the bottom padding for all cells in the table.\n@param paddingBottom new padding, ignored if smaller than 0\n@return this to allow chaining", "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", "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", "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", "Tries to load a site specific error page. If\n@param cms {@link CmsObject} used for reading the resource (site root and uri get adjusted!)\n@param req the current request\n@param res the current response\n@param errorCode the error code to display\n@return a flag, indicating if the custom error page could be loaded.", "Returns a sampling of the source at the specified line and column,\nof null if it is unavailable." ]
public boolean removeWriter(Object key, Object resourceId) { boolean result = false; ObjectLocks objectLocks = null; synchronized(locktable) { objectLocks = (ObjectLocks) locktable.get(resourceId); if(objectLocks != null) { /** * MBAIRD, last one out, close the door and turn off the lights. * if no locks (readers or writers) exist for this object, let's remove * it from the locktable. */ LockEntry entry = objectLocks.getWriter(); if(entry != null && entry.isOwnedBy(key)) { objectLocks.setWriter(null); result = true; // no need to check if writer is null, we just set it. if(objectLocks.getReaders().size() == 0) { locktable.remove(resourceId); } } } } return result; }
[ "Remove an write lock." ]
[ "Copies the non-zero structure of orig into \"this\"\n@param orig Matrix who's structure is to be copied", "Creates a new pagination configuration if at least one of the provided parameters is not null.\nOtherwise returns null.\n@param pageParam The request parameter used to send the current page number.\n@param pageSizes The page sizes for the first pages. The last provided size is the size of all following pages.\n@param pageNavLength The length of the \"Google\"-like page navigation. Should be an odd number.\n@return the pagination configuration, or <code>null</code> if none of the provided parameters is not null.", "Processes graphical indicator definitions for each column.", "Removes the key and its associated value from this map.\n\n@param key the key to remove\n@return the value associated with that key, or null if\nthe key was not in the map", "Returns an ArrayList of String URLs of the Carousel Images\n@return ArrayList of Strings", "Calculate matrix exponential of a square matrix.\n\nA scaled Pade approximation algorithm is used.\nThe algorithm has been directly translated from Golub & Van Loan \"Matrix Computations\",\nalgorithm 11.3.1. Special Horner techniques from 11.2 are also used to minimize the number\nof matrix multiplications.\n\n@param A square matrix\n@return matrix exponential of A", "Returns the indices that would sort an array.\n\n@param array Array.\n@param ascending Ascending order.\n@return Array of indices.", "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", "generate a message for loglevel DEBUG\n\n@param pObject the message Object" ]
public static void generateJavaFiles(String requirementsFolder, String platformName, String src_test_dir, String tests_package, String casemanager_package, String loggingPropFile) throws Exception { File reqFolder = new File(requirementsFolder); if (reqFolder.isDirectory()) { for (File f : reqFolder.listFiles()) { if (f.getName().endsWith(".story")) { try { SystemReader.generateJavaFilesForOneStory( f.getCanonicalPath(), platformName, src_test_dir, tests_package, casemanager_package, loggingPropFile); } catch (IOException e) { String message = "ERROR: " + e.getMessage(); logger.severe(message); throw new BeastException(message, e); } } } for (File f : reqFolder.listFiles()) { if (f.isDirectory()) { SystemReader.generateJavaFiles(requirementsFolder + File.separator + f.getName(), platformName, src_test_dir, tests_package + "." + f.getName(), casemanager_package, loggingPropFile); } } } else if (reqFolder.getName().endsWith(".story")) { SystemReader.generateJavaFilesForOneStory(requirementsFolder, platformName, src_test_dir, tests_package, casemanager_package, loggingPropFile); } else { String message = "No story file found in " + requirementsFolder; logger.severe(message); throw new BeastException(message); } }
[ "Main method of the class, which handles the process of creating the tests\n\n@param requirementsFolder\n, it is the folder where the plain text given by the client is\nstored\n@param platformName\n, to choose the MAS platform (JADE, JADEX, etc.)\n@param src_test_dir\n, the folder where our classes are created\n@param tests_package\n, the name of the package where the stories are created\n@param casemanager_package\n, the path where casemanager must be created\n@param loggingPropFile\n, properties file\n@throws Exception\n, if any error is found in the configuration" ]
[ "Create a rollback patch based on the recorded actions.\n\n@param patchId the new patch id, depending on release or one-off\n@param patchType the current patch identity\n@return the rollback patch", "Generate a map file from a jar file.\n\n@param jarFile jar file\n@param mapFileName map file name\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws XMLStreamException\n@throws IOException\n@throws ClassNotFoundException\n@throws IntrospectionException", "Sets the replacement var map node specific.\n\n@param replacementVarMapNodeSpecific\nthe replacement var map node specific\n@return the parallel task builder", "Print rate.\n\n@param rate Rate instance\n@return rate value", "Replace known tags in the current data values with actual values as appropriate\n\n@param cr a reference to DataPipe from which to read the current map", "Return whether or not the field value passed in is the default value for the type of the field. Null will return\ntrue.", "Set the buttons span text.", "Tells you if the expression is a spread operator call\n@param expression\nexpression\n@return\ntrue if is spread expression", "Checks whether table name and key column names of the given joinable and inverse collection persister match." ]
private float MIN(float first, float second, float third) { float min = Integer.MAX_VALUE; if (first < min) { min = first; } if (second < min) { min = second; } if (third < min) { min = third; } return min; }
[ "Calculates the smallest value between the three inputs.\n@param first value\n@param second value\n@param third value\n@return the smallest value between the three inputs" ]
[ "Retrieve the Activity ID value for this task.\n@param task Task instance\n@return Activity ID value", "Set a Background Drawable using the appropriate Android version api call\n\n@param view\n@param drawable", "Seeks forward or backwards to a particular holiday based on the current date\n\n@param holidayString The holiday to seek to\n@param direction The direction to seek\n@param seekAmount The number of years to seek", "Calculate the signature by which we can reliably recognize a loaded track.\n\n@param title the track title\n@param artist the track artist, or {@code null} if there is no artist\n@param duration the duration of the track in seconds\n@param waveformDetail the monochrome waveform detail of the track\n@param beatGrid the beat grid of the track\n\n@return the SHA-1 hash of all the arguments supplied, or {@code null} if any either {@code waveFormDetail} or {@code beatGrid} were {@code null}", "Filter unsafe or unnecessary request.\n\n@param nodeDataMapValidSource\nthe node data map valid source\n@param nodeDataMapValidSafe\nthe node data map valid safe", "Tests if this partition has hit a threshold and signal to the pool watch thread to create new connections\n@param connectionPartition to test for.", "Creates a directory at the given path if it does not exist yet and if the\ndirectory manager was not configured for read-only access.\n\n@param path\n@throws IOException\nif it was not possible to create a directory at the given\npath", "Use this API to fetch appfwprofile_crosssitescripting_binding resources of given name .", "Close and remove expired streams. Package protected to allow unit tests to invoke it." ]
@Override public int getMinPrefixLengthForBlock() { int count = getDivisionCount(); int totalPrefix = getBitCount(); for(int i = count - 1; i >= 0 ; i--) { AddressDivisionBase div = getDivision(i); int segBitCount = div.getBitCount(); int segPrefix = div.getMinPrefixLengthForBlock(); if(segPrefix == segBitCount) { break; } else { totalPrefix -= segBitCount; if(segPrefix != 0) { totalPrefix += segPrefix; break; } } } return totalPrefix; }
[ "Returns the smallest prefix length possible such that this address division grouping includes the block of addresses for that prefix.\n\n@return the prefix length" ]
[ "Make all elements of a String array upper case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements upper case", "Called when a ParentViewHolder has triggered a collapse for it's parent\n\n@param flatParentPosition the position of the parent that is calling to be collapsed", "Looks up the object from the cache\n\n@param oid The Identity to look up the object for\n@return The object if found, otherwise null", "Do some magic to turn request parameters into a context object", "Return true if the AST expression has not already been visited. If it is\nthe first visit, register the expression so that the next visit will return false.\n\n@param expression - the AST expression to check\n@return true if the AST expression has NOT already been visited", "Convenience method to set the underlying bean instance for a proxy.\n\n@param proxy the proxy instance\n@param beanInstance the instance of the bean", "region Override Methods", "Log the data for a single column.\n\n@param startIndex offset into buffer\n@param length length", "Bessel function of order n.\n\n@param n Order.\n@param x Value.\n@return J value." ]