query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public static void executorShutDown(ExecutorService executorService, long timeOutSec) {
try {
executorService.shutdown();
executorService.awaitTermination(timeOutSec, TimeUnit.SECONDS);
} catch(Exception e) {
logger.warn("Error while stoping executor service.", e);
}
} | [
"Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for"
] | [
"Skips the stream over the specified number of bytes, adding the skipped\namount to the count.\n\n@param length the number of bytes to skip\n@return the actual number of bytes skipped\n@throws java.io.IOException if an I/O error occurs\n@see java.io.InputStream#skip(long)",
"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.",
"Inserts a single document locally and being to synchronize it based on its _id. Inserting\na document with the same _id twice will result in a duplicate key exception.\n\n@param namespace the namespace to put the document in.\n@param document the document to insert.",
"Returns the ordered Map value of the field.\n\n@return the ordered Map value of the field. It returns a reference of the value.\n@throws IllegalArgumentException if the value cannot be converted to ordered Map.",
"Parses formatter attributes.\n\n@param formatterLoc the node location\n@return the map of formatter attributes (unmodifiable)",
"Check if the current node is part of routing request based on cluster.xml\nor throw an exception.\n\n@param key The key we are checking\n@param routingStrategy The routing strategy\n@param currentNode Current node",
"Sets the global setting for this ID\n\n@param pathId ID of path\n@param global True if global, False otherwise",
"This method retrieves all security permissions contained within the specified node.\n\n@param context the {@link OperationContext} used to resolve the permission attributes.\n@param node the {@link ModelNode} that might contain security permissions metadata.\n@return a {@link List} containing the retrieved permissions. They are wrapped as {@link PermissionFactory} instances.\n@throws OperationFailedException if an error occurs while retrieving the security permissions.",
"Reads a color value represented by three bytes, for R, G, and B\ncomponents, plus a flag byte indicating if this is an automatic color.\nReturns null if the color type is \"Automatic\".\n\n@param data byte array of data\n@param offset offset into array\n@return new Color instance"
] |
public static InterceptorFactory getInstance()
{
if (instance == null)
{
instance = new InterceptorFactory();
OjbConfigurator.getInstance().configure(instance);
}
return instance;
} | [
"Returns the instance.\n@return InterceptorFactory"
] | [
"Get the Operation metadata for an MBean by name.\n@return the {@link Map} of {@link String} operation names to {@link MBeanOperationInfo} values.",
"Imports a file via assimp without post processing.\n\n@param filename the file to import\n@return the loaded scene\n@throws IOException if an error occurs",
"Reads an argument of type \"astring\" from the request.",
"Analyzes the source code of an interface. The specified interface must not contain methods, that changes the\nstate of the corresponding object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@return analysis result",
"Calls beforeMaterialization on all registered listeners in the reverse\norder of registration.",
"Converts a JSON patch path to a JSON property name.\nCurrently the metadata API only supports flat maps.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return the JSON property name.",
"Formats a connection string for CLI to use as it's controller connection.\n\n@return the controller string to connect CLI",
"Writes the torque schemata to files in the given directory and returns\na comma-separated list of the filenames.\n\n@param dir The directory to write the files to\n@return The list of filenames\n@throws IOException If an error occurred",
"Gets an entry point for the given deployment. If one does not exist it will be created. If the request controller is disabled\nthis will return null.\n\nEntry points are reference counted. If this method is called n times then {@link #removeControlPoint(ControlPoint)}\nmust also be called n times to clean up the entry points.\n\n@param deploymentName The top level deployment name\n@param entryPointName The entry point name\n@return The entry point, or null if the request controller is disabled"
] |
@Beta
public MSICredentials withObjectId(String objectId) {
this.objectId = objectId;
this.clientId = null;
this.identityId = null;
return this;
} | [
"Specifies the object id associated with a user assigned managed service identity\nresource that should be used to retrieve the access token.\n\n@param objectId Object ID of the identity to use when authenticating to Azure AD.\n@return MSICredentials"
] | [
"Read all configuration files.\n@return the list with all available configurations",
"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\"",
"Get a property as a json array or default.\n\n@param key the property name\n@param defaultValue default",
"Add a new subsystem to a given registry.\n\n@param registry the registry\n@param name the subsystem name\n@param version the version",
"Remove the nodes representing the entity and the embedded elements attached to it.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values of the key identifying the entity to remove",
"Provides the results of a QR decomposition. These will be modified by adding or removing\nrows from the original 'A' matrix.\n\n@param Q The Q matrix which is to be modified. Is modified later and reference saved.\n@param R The R matrix which is to be modified. Is modified later and reference saved.",
"Determines the offset code of a forward contract from a schedule. Rounds the average period length to full months.\n\n@param schedule The schedule.\n@return The offset code as String",
"provides a safe toString",
"Removes trailing and leading whitespace, and also reduces each\nsequence of internal whitespace to a single space."
] |
protected void appendWhereClause(StringBuffer stmt, Object[] columns)
{
stmt.append(" WHERE ");
for (int i = 0; i < columns.length; i++)
{
if (i > 0)
{
stmt.append(" AND ");
}
stmt.append(columns[i]);
stmt.append("=?");
}
} | [
"Generate a sql where-clause matching the contraints defined by the array of fields\n\n@param columns array containing all columns used in WHERE clause"
] | [
"Issue the database statements to drop the table associated with a table configuration.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so.",
"Used when setting the \"visible\" field in the response. See the \"List Conversations\" docs for details\n@param filters Filter strings to be applied to the visibility of conversations\n@return this to continue building options",
"Adds a single value to the data set and updates any\nstatistics that are calculated cumulatively.\n@param value The value to add.",
"Gets information for a Box Storage Policy with optional fields.\n\n@param fields the fields to retrieve.\n@return info about this item containing only the specified fields, including storage policy.",
"Compute the key to use.\n\n@param ref The reference number.\n@param filename The filename.\n@param extension The file extension.",
"Convert a drawable object into a Bitmap.\n@param drawable Drawable to extract a Bitmap from.\n@return A Bitmap created from the drawable parameter.",
"Enable or disable this component.\n@param flag true to enable, false to disable.\n@see #enable()\n@see #disable()\n@see #isEnabled()",
"Create the navigation frame.\n@param outputDirectory The target directory for the generated file(s).",
"Updates the date and time formats.\n\n@param properties project properties"
] |
public List<ProjectListType.Project> getProject()
{
if (project == null)
{
project = new ArrayList<ProjectListType.Project>();
}
return this.project;
} | [
"Gets the value of the project property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the project property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetProject().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link ProjectListType.Project }"
] | [
"Not used.",
"Creates an instance of a NewSimpleBean from an annotated class\n\n@param clazz The annotated class\n@param beanManager The Bean manager\n@return a new NewSimpleBean instance",
"Creates the code mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param realOffsetStart\nthe real offset start\n@param realOffsetEnd\nthe real offset end\n@param codePositions\nthe code positions\n@throws IOException\nSignals that an I/O exception has occurred.",
"Gets an iterator to the EJB descriptors for an EJB implementation class\n\n@param beanClass The EJB class\n@return An iterator",
"Sort MapRows based on a named attribute.\n\n@param rows map rows to sort\n@param attribute attribute to sort on\n@return list argument (allows method chaining)",
"Analyze all source code using the specified RuleSet and return the report results.\n\n@param ruleSet - the RuleSet to apply to each source component; must not be null.\n@return the results from applying the RuleSet to all of the source",
"Adjusts all links in the target folder that point to the source folder\nso that they are kept \"relative\" in the target folder where possible.\n\nIf a link is found from the target folder to the source folder,\nthen the target folder is checked if a target of the same name\nis found also \"relative\" inside the target Folder, and if so,\nthe link is changed to that \"relative\" target. This is mainly used to keep\nrelative links inside a copied folder structure intact.\n\nExample: Image we have folder /folderA/ that contains files\n/folderA/x1 and /folderA/y1. x1 has a link to y1 and y1 to x1.\nNow someone copies /folderA/ to /folderB/. So we end up with\n/folderB/x2 and /folderB/y2. Because of the link mechanism in OpenCms,\nx2 will have a link to y1 and y2 to x1. By using this method,\nthe links from x2 to y1 will be replaced by a link x2 to y2,\nand y2 to x1 with y2 to x2.\n\nLink replacement works for links in XML files as well as relation only\ntype links.\n\n@param sourceFolder the source folder\n@param targetFolder the target folder\n\n@throws CmsException if something goes wrong",
"Checks if a given number is in the range of a double.\n\n@param number\na number which should be in the range of a double (positive or negative)\n\n@see java.lang.Double#MIN_VALUE\n@see java.lang.Double#MAX_VALUE\n\n@return number as a double",
"Get the URI for the given property in the given context.\n\n@param propertyIdValue\nthe property id for which to create a URI\n@param propertyContext\nthe context for which the URI will be needed\n@return the URI"
] |
public void clearRequestSettings(int pathId, String clientUUID) throws Exception {
this.setRequestEnabled(pathId, false, clientUUID);
OverrideService.getInstance().disableAllOverrides(pathId, clientUUID, Constants.OVERRIDE_TYPE_REQUEST);
EditService.getInstance().updateRepeatNumber(Constants.OVERRIDE_TYPE_REQUEST, pathId, clientUUID);
} | [
"Clear all overrides, reset repeat counts for a request path\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@throws Exception exception"
] | [
"Add a row to the table if it does not already exist\n\n@param cells String...",
"Read task relationships.",
"Returns the u component of a coordinate from a texture coordinate set.\n\n@param vertex the vertex index\n@param coords the texture coordinate set\n@return the u component",
"Set value for given object field.\n\n@param object object to be updated\n@param field field name\n@param value field value\n\n@throws NoSuchMethodException if property writer is not available\n@throws InvocationTargetException if property writer throws an exception\n@throws IllegalAccessException if property writer is inaccessible",
"Validates this string is a valid address, and if not, throws an exception with a descriptive message indicating why it is not.\n@throws AddressStringException",
"Print out the configuration that the client needs to make a request.\n\n@param json the output writer.\n@throws JSONException",
"Remove a descriptor.\n@param validKey This could be the {@link JdbcConnectionDescriptor}\nitself, or the associated {@link JdbcConnectionDescriptor#getPBKey PBKey}.",
"Called by implementation class once websocket connection established\nat networking layer.\n@param context the websocket context",
"Gets the listener classes to which dispatching should be prevented while\nthis event is being dispatched.\n\n@return The listener classes marked to prevent.\n@see #preventCascade(Class)"
] |
protected void load()
{
properties = new Properties();
String filename = getFilename();
try
{
URL url = ClassHelper.getResource(filename);
if (url == null)
{
url = (new File(filename)).toURL();
}
logger.info("Loading OJB's properties: " + url);
URLConnection conn = url.openConnection();
conn.setUseCaches(false);
conn.connect();
InputStream strIn = conn.getInputStream();
properties.load(strIn);
strIn.close();
}
catch (FileNotFoundException ex)
{
// [tomdz] If the filename is explicitly reset (null or empty string) then we'll
// output an info message because the user did this on purpose
// Otherwise, we'll output a warning
if ((filename == null) || (filename.length() == 0))
{
logger.info("Starting OJB without a properties file. OJB is using default settings instead.");
}
else
{
logger.warn("Could not load properties file '"+filename+"'. Using default settings!", ex);
}
// [tomdz] There seems to be no use of this setting ?
//properties.put("valid", "false");
}
catch (Exception ex)
{
throw new MetadataException("An error happend while loading the properties file '"+filename+"'", ex);
}
} | [
"Loads the Configuration from the properties file.\n\nLoads the properties file, or uses defaults on failure.\n\n@see org.apache.ojb.broker.util.configuration.impl.ConfigurationAbstractImpl#setFilename(java.lang.String)"
] | [
"Determine if the exception is relative based on the recurrence type integer value.\n\n@param value integer value\n@return true if the recurrence is relative",
"Count the total number of queued resource requests for all queues. The\nresult is \"approximate\" in the face of concurrency since individual\nqueues can change size during the aggregate count.\n\n@return The (approximate) aggregate count of queued resource requests.",
"Use this API to add snmpuser.",
"Invoke a method through reflection.\nFalls through to using the Invoker to call the method in case the reflection call fails..\n\n@param object the object on which to invoke a method\n@param methodName the name of the method to invoke\n@param parameters the parameters of the method call\n@return the result of the method call",
"The parameter 'project' is not used at the moment, but will be used once schema and plugin support lands.",
"Copy all of the mappings from the specified map to this one, replacing\nany mappings with the same keys.\n\n@param in the map whose mappings are to be copied",
"Informs this sequence model that the value of the whole sequence is initialized to sequence",
"Processes graphical indicator definitions for each column.",
"Use this API to rename a responderpolicy resource."
] |
static JDOClass getJDOClass(Class c)
{
JDOClass rc = null;
try
{
JavaModelFactory javaModelFactory = RuntimeJavaModelFactory.getInstance();
JavaModel javaModel = javaModelFactory.getJavaModel(c.getClassLoader());
JDOModel m = JDOModelFactoryImpl.getInstance().getJDOModel(javaModel);
rc = m.getJDOClass(c.getName());
}
catch (RuntimeException ex)
{
throw new JDOFatalInternalException("Not a JDO class: " + c.getName());
}
return rc;
} | [
"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"
] | [
"Plots the MSD curve for trajectory t.\n@param t List of trajectories\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",
"Calculates the beginLine of a violation report.\n\n@param pmdViolation The violation for which the beginLine should be calculated.\n@return The beginLine is assumed to be the line with the smallest number. However, if the smallest number is\nout-of-range (non-positive), it takes the other number.",
"Given a BSON document, remove any forbidden fields and return the document. If no changes are\nmade, the original document reference is returned. If changes are made, a cloned copy of the\ndocument with the changes will be returned.\n\n@param document the document from which to remove forbidden fields\n\n@return a BsonDocument without any forbidden fields.",
"Use this API to delete sslcertkey resources of given names.",
"generate a prepared DELETE-Statement for the Class\ndescribed by cld.\n@param cld the ClassDescriptor",
"Creates a new Message from the specified text.",
"Returns the name of the class to be instantiated.\n@param rs the Resultset\n@return null if the column is not available",
"Create a new DateTime. To the last second. This will not create any\nextra-millis-seconds, which may cause bugs when writing to stores such as\ndatabases that round milli-seconds up and down.",
"Sets the character translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTranslator translator\n@return this to allow chaining"
] |
public SingleProfileBackup getProfileBackupData(int profileID, String clientUUID) throws Exception {
SingleProfileBackup singleProfileBackup = new SingleProfileBackup();
List<PathOverride> enabledPaths = new ArrayList<>();
List<EndpointOverride> paths = PathOverrideService.getInstance().getPaths(profileID, clientUUID, null);
for (EndpointOverride override : paths) {
if (override.getRequestEnabled() || override.getResponseEnabled()) {
PathOverride pathOverride = new PathOverride();
pathOverride.setPathName(override.getPathName());
if (override.getRequestEnabled()) {
pathOverride.setRequestEnabled(true);
}
if (override.getResponseEnabled()) {
pathOverride.setResponseEnabled(true);
}
pathOverride.setEnabledEndpoints(override.getEnabledEndpoints());
enabledPaths.add(pathOverride);
}
}
singleProfileBackup.setEnabledPaths(enabledPaths);
Client backupClient = ClientService.getInstance().findClient(clientUUID, profileID);
ServerGroup activeServerGroup = ServerRedirectService.getInstance().getServerGroup(backupClient.getActiveServerGroup(), profileID);
singleProfileBackup.setActiveServerGroup(activeServerGroup);
return singleProfileBackup;
} | [
"Get the active overrides with parameters and the active server group for a client\n\n@param profileID Id of profile to get configuration for\n@param clientUUID Client Id to export configuration\n@return SingleProfileBackup containing active overrides and active server group\n@throws Exception exception"
] | [
"Utility function that constructs AdminClient.\n\n@param url URL pointing to the bootstrap node\n@return Newly constructed AdminClient",
"Tell a device to become tempo master.\n\n@param deviceNumber the device we want to take over the role of tempo master\n\n@throws IOException if there is a problem sending the command to the device\n@throws IllegalStateException if the {@code VirtualCdj} is not active\n@throws IllegalArgumentException if {@code deviceNumber} is not found on the network",
"Converts a number of bytes to a human-readable string\n@param bytes the bytes\n@return the human-readable string",
"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",
"Returns the name of the current member which is the name in the case of a field, or the property name for an\naccessor method.\n\n@return The member name\n@exception XDocletException if an error occurs",
"A tie-in for subclasses such as AdaGrad.",
"Use this API to fetch appflowpolicy_appflowpolicylabel_binding resources of given name .",
"Check if a given string is a valid java package or class name.\n\nThis method use the technique documented in\n[this SO question](https://stackoverflow.com/questions/13557195/how-to-check-if-string-is-a-valid-class-identifier)\nwith the following extensions:\n\n* if the string does not contain `.` then assume it is not a valid package or class name\n\n@param s\nthe string to be checked\n@return\n`true` if `s` is a valid java package or class name",
"Format a calendar instance that is parseable from JavaScript, according to ISO-8601.\n\n@param cal the calendar to format to a JSON string\n@return a formatted date in the form of a string"
] |
private Map<Set<ServerIdentity>, ModelNode> getDeploymentOverlayOperations(ModelNode operation,
ModelNode host) {
final PathAddress realAddress = PathAddress.pathAddress(operation.get(OP_ADDR));
if (realAddress.size() == 0 && COMPOSITE.equals(operation.get(OP).asString())) {
//We have a composite operation resulting from a transformation to redeploy affected deployments
//See redeploying deployments affected by an overlay.
ModelNode serverOp = operation.clone();
Map<ServerIdentity, Operations.CompositeOperationBuilder> composite = new HashMap<>();
for (ModelNode step : serverOp.get(STEPS).asList()) {
ModelNode newStep = step.clone();
String groupName = PathAddress.pathAddress(step.get(OP_ADDR)).getElement(0).getValue();
newStep.get(OP_ADDR).set(PathAddress.pathAddress(step.get(OP_ADDR)).subAddress(1).toModelNode());
Set<ServerIdentity> servers = getServersForGroup(groupName, host, localHostName, serverProxies);
for(ServerIdentity server : servers) {
if(!composite.containsKey(server)) {
composite.put(server, Operations.CompositeOperationBuilder.create());
}
composite.get(server).addStep(newStep);
}
if(!servers.isEmpty()) {
newStep.get(OP_ADDR).set(PathAddress.pathAddress(step.get(OP_ADDR)).subAddress(1).toModelNode());
}
}
if(!composite.isEmpty()) {
Map<Set<ServerIdentity>, ModelNode> result = new HashMap<>();
for(Entry<ServerIdentity, Operations.CompositeOperationBuilder> entry : composite.entrySet()) {
result.put(Collections.singleton(entry.getKey()), entry.getValue().build().getOperation());
}
return result;
}
return Collections.emptyMap();
}
final Set<ServerIdentity> allServers = getAllRunningServers(host, localHostName, serverProxies);
return Collections.singletonMap(allServers, operation.clone());
} | [
"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"
] | [
"Add an index on the given collection and field\n\n@param collection the collection to use for the index\n@param field the field to use for the index\n@param asc the sorting direction. <code>true</code> to sort ascending; <code>false</code> to sort descending\n@param background iff <code>true</code> the index is created in the background",
"Utility method used to round a double to the given precision.\n\n@param value value to truncate\n@param precision Number of decimals to round to.\n@return double value",
"Adds a new row after the given one.\n\n@param row the row after which a new one should be added",
"returns controller if a new device is found",
"So we will follow rfc 1035 and in addition allow the underscore.",
"Copy bytes from an input stream to a file and log progress\n@param is the input stream to read\n@param destFile the file to write to\n@throws IOException if an I/O error occurs",
"this class loader interface can be used by other plugins to lookup\nresources from the bundles. A temporary class loader interface is set\nduring other configuration loading as well\n\n@return ClassLoaderInterface (BundleClassLoaderInterface)",
"Load a table configuration in from a text-file reader.\n\n@return A config if any of the fields were set otherwise null if we reach EOF.",
"Converts milliseconds into a calendar object.\n\n@param millis a time given in milliseconds after epoch\n@return the calendar object for the given time"
] |
public static URL getKubernetesConfigurationUrl(Map<String, String> map) throws MalformedURLException {
if (Strings.isNotNullOrEmpty(Utils.getSystemPropertyOrEnvVar(ENVIRONMENT_CONFIG_URL, ""))) {
return new URL(Utils.getSystemPropertyOrEnvVar(ENVIRONMENT_CONFIG_URL, ""));
} else if (Strings.isNotNullOrEmpty(Utils.getSystemPropertyOrEnvVar(ENVIRONMENT_CONFIG_RESOURCE_NAME, ""))) {
String resourceName = Utils.getSystemPropertyOrEnvVar(ENVIRONMENT_CONFIG_RESOURCE_NAME, "");
return findConfigResource(resourceName);
} else if (map.containsKey(ENVIRONMENT_CONFIG_URL)) {
return new URL(map.get(ENVIRONMENT_CONFIG_URL));
} else if (map.containsKey(ENVIRONMENT_CONFIG_RESOURCE_NAME)) {
String resourceName = map.get(ENVIRONMENT_CONFIG_RESOURCE_NAME);
return findConfigResource(resourceName);
} else {
// Let the resource locator find the resource
return null;
}
} | [
"Applies the kubernetes json url to the configuration.\n\n@param map\nThe arquillian configuration."
] | [
"Process the response by reporting proper log and feeding failure\ndetectors\n\n@param response\n@param pipeline",
"Creates a scheduled thread pool where each thread has the daemon\nproperty set to true. This allows the program to quit without\nexplicitly calling shutdown on the pool\n\n@param corePoolSize the number of threads to keep in the pool,\neven if they are idle\n\n@return a newly created scheduled thread pool",
"Creates a tar file entry with defaults parameters.\n@param fileName the entry name\n@return file entry with reasonable defaults",
"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",
"Print a a basic type t",
"Returns the z-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the z coordinate",
"Change contrast of the image\n\n@param contrast default is 0, pos values increase contrast, neg. values decrease contrast",
"domain.xml",
"Return all URI schemes that are supported in the system."
] |
private ClassMatcher buildMatcher(String tagText) {
// check there are at least @match <type> and a parameter
String[] strings = StringUtil.tokenize(tagText);
if (strings.length < 2) {
System.err.println("Skipping uncomplete @match tag, type missing: " + tagText + " in view " + viewDoc);
return null;
}
try {
if (strings[0].equals("class")) {
return new PatternMatcher(Pattern.compile(strings[1]));
} else if (strings[0].equals("context")) {
return new ContextMatcher(root, Pattern.compile(strings[1]), getGlobalOptions(),
false);
} else if (strings[0].equals("outgoingContext")) {
return new ContextMatcher(root, Pattern.compile(strings[1]), getGlobalOptions(),
false);
} else if (strings[0].equals("interface")) {
return new InterfaceMatcher(root, Pattern.compile(strings[1]));
} else if (strings[0].equals("subclass")) {
return new SubclassMatcher(root, Pattern.compile(strings[1]));
} else {
System.err.println("Skipping @match tag, unknown match type, in view " + viewDoc);
}
} catch (PatternSyntaxException pse) {
System.err.println("Skipping @match tag due to invalid regular expression '" + tagText
+ "'" + " in view " + viewDoc);
} catch (Exception e) {
System.err.println("Skipping @match tag due to an internal error '" + tagText
+ "'" + " in view " + viewDoc);
e.printStackTrace();
}
return null;
} | [
"Factory method that builds the appropriate matcher for @match tags"
] | [
"Normalizes this vector in place.",
"Scan a network interface to find if it has an address space which matches the device we are trying to reach.\nIf so, return the address specification.\n\n@param aDevice the DJ Link device we are trying to communicate with\n@param networkInterface the network interface we are testing\n@return the address which can be used to communicate with the device on the interface, or null",
"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.",
"Gets existing config files.\n\n@return the existing config files",
"This can be called to adjust the size of the dialog glass. It\nis implemented using JSNI to bypass the \"private\" keyword on\nthe glassResizer.",
"Start a print.\n\n@param jobId the job ID\n@param specJson the client json request.\n@param out the stream to write to.",
"Get a list of collaborators that are allowed access to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return list of collaborators",
"Use this API to fetch all the cachepolicylabel resources that are configured on netscaler.",
"Sets the specified date attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0"
] |
@NonNull
public static File[] listAllFiles(File directory) {
if (directory == null) {
return new File[0];
}
File[] files = directory.listFiles();
return files != null ? files : new File[0];
} | [
"Return list of all files in the directory.\n\n@param directory target directory on file system\n@return list of files in the directory or empty list if directory is empty."
] | [
"Get list of Jobs from a queue.\n\n@param jedis\n@param queueName\n@param jobOffset\n@param jobCount\n@return",
"Guesses the best set to use at the specified index by looking at the surrounding sets. In general, characters in\nlower-numbered sets are more common, so we choose them if we can. If no good surrounding sets can be found, the default\nvalue returned is the first value from the valid set.\n\n@param index the current index\n@param length the maximum length to look at\n@param valid the valid sets for this index\n@return the best set to use at the specified index",
"Extract data for a single calendar.\n\n@param row calendar data",
"Counts the coordinates stored in a single statement for the relevant\nproperty, if they are actually given and valid.\n\n@param statement\n@param itemDocument",
"Post a build info to the server\n\n@param moduleName String\n@param moduleVersion String\n@param buildInfo Map<String,String>\n@param user String\n@param password String\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Called by spring when application context is being destroyed.",
"callers of doLogin should be serialized before calling in.",
"Use this API to fetch all the gslbsite resources that are configured on netscaler.",
"Define the set of extensions.\n\n@param extensions\n@return self"
] |
public static <T> OptionalValue<T> ofNullable(T value) {
return new GenericOptionalValue<T>(RUNTIME_SOURCE, DEFAULT_KEY, value);
} | [
"Returns new instance of OptionalValue with given value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue"
] | [
"This method returns the mapped certificate for a hostname, or generates a \"standard\"\nSSL server certificate issued by the CA to the supplied subject if no mapping has been\ncreated. This is not a true duplication, just a shortcut method\nthat is adequate for web browsers.\n\n@param hostname\n@return\n@throws CertificateParsingException\n@throws InvalidKeyException\n@throws CertificateExpiredException\n@throws CertificateNotYetValidException\n@throws SignatureException\n@throws CertificateException\n@throws NoSuchAlgorithmException\n@throws NoSuchProviderException\n@throws KeyStoreException\n@throws UnrecoverableKeyException",
"Sorts the given array into sorted order using the given comparator.\n\n@param self the array to be sorted\n@param comparator a Comparator used for the comparison\n@return the sorted array\n@since 1.5.5",
"Closes the server socket.",
"Set the order in which sets are returned for the user.\n\nThis method requires authentication with 'write' permission.\n\n@param photosetIds\nAn array of Ids\n@throws FlickrException",
"Sets the package pattern to match against.",
"get the TypeArgSignature corresponding to given type\n\n@param type\n@return",
"The normalized string returned by this method is consistent with java.net.Inet6address.\n\nIPs are not compressed nor mixed in this representation. If this has a prefix length, that will be included in the string.",
"Returns the local collection representing the given namespace.\n\n@param namespace the namespace referring to the local collection.\n@param resultClass the {@link Class} that represents documents in the collection.\n@param <T> the type documents in the collection.\n@return the local collection representing the given namespace.",
"generate a prepared INSERT-Statement for the Class\ndescribed by cld.\n\n@param cld the ClassDescriptor"
] |
public boolean isEmpty() {
int snapshotSize = cleared ? 0 : snapshot.size();
//nothing in both
if ( snapshotSize == 0 && currentState.isEmpty() ) {
return true;
}
//snapshot bigger than changeset
if ( snapshotSize > currentState.size() ) {
return false;
}
return size() == 0;
} | [
"Whether this association contains no rows.\n\n@return {@code true} if this association contains no rows, {@code false} otherwise"
] | [
"Convert the message to a FinishRequest",
"Tells you if the ASTNode is a method node for the given name, arity, and return type.\n@param node\nthe node to inspect\n@param methodNamePattern\nthe expected name of the method\n@param numArguments\nthe expected number of arguments, optional\n@param returnType\nthe expected return type, optional\n@return\ntrue if this node is a MethodNode meeting the parameters. false otherwise",
"Add a channel to the animation to animate the named bone.\n@param boneName name of bone to animate.\n@param channel The animation channel.",
"Check that the range resulting from the mask is contiguous, otherwise we cannot represent it.\n\nFor instance, for the range 0 to 3 (bits are 00 to 11), if we mask all 4 numbers from 0 to 3 with 2 (ie bits are 10),\nthen we are left with 1 and 3. 2 is not included. So we cannot represent 1 and 3 as a contiguous range.\n\nThe underlying rule is that mask bits that are 0 must be above the resulting range in each segment.\n\nAny bit in the mask that is 0 must not fall below any bit in the masked segment range that is different between low and high.\n\nAny network mask must eliminate the entire segment range. Any host mask is fine.\n\n@param maskValue\n@param segmentPrefixLength\n@return\n@throws PrefixLenException",
"We are adding a redeploy operation step for each specified deployment runtime name.\n\n@param context\n@param deploymentsRootAddress\n@param deploymentNames\n@throws OperationFailedException",
"Use this API to fetch dnsview resources of given names .",
"Adds main report query.\n\n@param text\n@param language use constants from {@link DJConstants}\n@return",
"Gets the currency codes, or the regular expression to select codes.\n\n@return the query for chaining.",
"Sets the name of the designated bone.\n\n@param boneindex zero based index of bone to rotate.\n@param bonename string with name of bone.\n. * @see #getBoneName"
] |
public Map<String, Object> getModuleFieldsFilters() {
final Map<String, Object> params = new HashMap<String, Object>();
for(final Filter filter: filters){
params.putAll(filter.moduleFilterFields());
}
return params;
} | [
"Generates a Map of query parameters for Module regarding the filters\n\n@return Map<String, Object>"
] | [
"Use this API to delete sslcertkey.",
"Set the TableAlias for ClassDescriptor",
"This method is used to associate a child task with the current\ntask instance. It has package access, and has been designed to\nallow the hierarchical outline structure of tasks in an MPX\nfile to be constructed as the file is read in.\n\n@param child Child task.\n@param childOutlineLevel Outline level of the child task.",
"Copies file from a resource to a local temp file\n\n@param sourceResource\n@return Absolute filename of the temp file\n@throws Exception",
"Compute the repair set from the given values and nodes\n\n@param nodeValues The value found on each node\n@return A set of repairs to perform",
"Start ssh session and obtain session.\n\n@return the session",
"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.",
"Mbeans for SLOP_UPDATE",
"Extract a list of work pattern assignments.\n\n@param workPatterns string representation of work pattern assignments\n@return list of work pattern assignment rows"
] |
@VisibleForTesting
protected static double getNearestNiceValue(
final double value, final DistanceUnit scaleUnit, final boolean lockUnits) {
DistanceUnit bestUnit = bestUnit(scaleUnit, value, lockUnits);
double factor = scaleUnit.convertTo(1.0, bestUnit);
// nearest power of 10 lower than value
int digits = (int) Math.floor((Math.log(value * factor) / Math.log(10)));
double pow10 = Math.pow(10, digits);
// ok, find first character
double firstChar = value * factor / pow10;
// right, put it into the correct bracket
int barLen;
if (firstChar >= 10.0) {
barLen = 10;
} else if (firstChar >= 5.0) {
barLen = 5;
} else if (firstChar >= 2.0) {
barLen = 2;
} else {
barLen = 1;
}
// scale it up the correct power of 10
return barLen * pow10 / factor;
} | [
"Reduce the given value to the nearest smaller 1 significant digit number starting with 1, 2 or 5.\n\n@param value the value to find a nice number for.\n@param scaleUnit the unit of the value.\n@param lockUnits if set, the values are not scaled to a \"nicer\" unit."
] | [
"Use this API to fetch all the nsdiameter resources that are configured on netscaler.",
"This method is called to try to catch any invalid tasks that may have sneaked past all our other checks.\nThis is done by validating the tasks by task ID.",
"Use this API to update Interface resources.",
"Sets the number of ms to wait before attempting to obtain a connection again after a failure.\n@param acquireRetryDelay the acquireRetryDelay to set\n@param timeUnit time granularity",
"Convert a layer type to a geometry class.\n\n@param layerType\nlayer type\n@return JTS class",
"Get the sub registry for the domain.\n\n@param range the version range\n@return the sub registry",
"Executes an operation on the controller latching onto an existing transaction\n\n@param operation the operation\n@param handler the handler\n@param control the transaction control\n@param prepareStep the prepare step to be executed before any other steps\n@param operationId the id of the current transaction\n@return the result of the operation",
"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.",
"Add assertions to tests execution."
] |
private void sendResponse(final HttpServletResponse res, final CmsSpellcheckingRequest request) throws IOException {
final PrintWriter pw = res.getWriter();
final JSONObject response = getJsonFormattedSpellcheckResult(request);
pw.println(response.toString());
pw.close();
} | [
"Sends the JSON-formatted spellchecking results to the client.\n\n@param res The HttpServletResponse object.\n@param request The spellchecking request object.\n\n@throws IOException in case writing the response fails"
] | [
"Returns the secret key matching the specified identifier.\n\n@param input the input stream containing the keyring collection\n@param keyId the 4 bytes identifier of the key",
"Add an object into cache by key. The key will be used in conjunction with session id if\nthere is a session instance\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached",
"All the indexes defined in the database. Type widening means that the returned Index objects\nare limited to the name, design document and type of the index and the names of the fields.\n\n@return a list of defined indexes with name, design document, type and field names.",
"Replaces new line delimiters in the input stream with the Unix line feed.\n\n@param input",
"Use this API to fetch the statistics of all rnatip_stats resources that are configured on netscaler.",
"Calls a function script associated with this component.\nThe function is called even if the component\nis not enabled and not attached to a scene object.\n@param funcName name of script function to call.\n@param args function parameters as an array of objects.\n@return true if function was called, false if no such function\n@see org.gearvrf.script.GVRScriptFile#invokeFunction(String, Object[]) invokeFunction",
"Log a message line to the output.",
"Use this API to delete gslbsite resources of given names.",
"Deletes this collaboration."
] |
public synchronized void init() {
channelFactory = new NioClientSocketChannelFactory(
Executors.newCachedThreadPool(),
Executors.newCachedThreadPool());
datagramChannelFactory = new NioDatagramChannelFactory(
Executors.newCachedThreadPool());
timer = new HashedWheelTimer();
} | [
"Initialize; cached threadpool is safe as it is releasing resources automatically if idle"
] | [
"Counts the number of lines.\n\n@param str the input string\n@return Returns the number of lines terminated by '\\n' in string",
"Finds the first mesh in the given model.\n@param model root of a model loaded by the asset loader.\n@return GVRMesh found or null if model does not contain meshes\n@see #loadMesh(GVRAndroidResource.MeshCallback, GVRAndroidResource, int)",
"Print a task UID.\n\n@param value task UID\n@return task UID string",
"Read one collection element from the current row of the JDBC result set\n\n@param optionalOwner the collection owner\n@param optionalKey the collection key\n@param persister the collection persister\n@param descriptor the collection aliases\n@param rs the result set\n@param session the session\n@throws HibernateException if an error occurs\n@throws SQLException if an error occurs during the query execution",
"Creates a string representation of the given node. Useful for debugging.\n\n@return a debug string for the given node.",
"Count the total number of queued resource requests for all queues. The\nresult is \"approximate\" in the face of concurrency since individual\nqueues can change size during the aggregate count.\n\n@return The (approximate) aggregate count of queued resource requests.",
"Creates builder for passed path element\n\n@param elementName name of xml element that is used as decorator\n@return PersistentResourceXMLBuilder\n@deprecated decorator element support is currently considered as preview\n@since 4.0",
"Registers an image to be captured by the build-info proxy.\n\n@param imageTag\n@param host\n@param targetRepo\n@param buildInfoId\n@throws IOException\n@throws InterruptedException",
"Transform the given bytes into an object.\n\n@param bytes The bytes to construct the object from\n@return The object constructed"
] |
private static void processTaskFilter(ProjectFile project, Filter filter)
{
for (Task task : project.getTasks())
{
if (filter.evaluate(task, null))
{
System.out.println(task.getID() + "," + task.getUniqueID() + "," + task.getName());
}
}
} | [
"Apply a filter to the list of all tasks, and show the results.\n\n@param project project file\n@param filter filter"
] | [
"If a text contains double quotes, escape them.\n\n@param text the text to escape\n@return Escaped text or {@code null} if the text is null",
"Writes assignment data to a PM XML file.",
"Used to create a new retention policy with optional parameters.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param type the type of the retention policy. Can be \"finite\" or \"indefinite\".\n@param length the duration in days that the retention policy will be active for after being assigned to content.\n@param action the disposition action can be \"permanently_delete\" or \"remove_retention\".\n@param optionalParams the optional parameters.\n@return the created retention policy's info.",
"Sets the lower limits for the \"moving\" body rotation relative to joint point.\n\n@param limitX the X axis lower rotation limit (in radians)\n@param limitY the Y axis lower rotation limit (in radians)\n@param limitZ the Z axis lower rotation limit (in radians)",
"This method writes project property data to a JSON file.",
"Invoke to tell listeners that an step started event processed",
"Use this API to fetch all the locationfile resources that are configured on netscaler.",
"Create a hazard curve from given times and given discount factors using default interpolation and extrapolation methods.\n\n@param name The name of this hazard curve.\n@param times Array of times as doubles.\n@param givenSurvivalProbabilities Array of corresponding survival probabilities.\n@return A new discount factor object.",
"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"
] |
private EditorState getDefaultState() {
List<TableProperty> cols = new ArrayList<TableProperty>(1);
cols.add(TableProperty.TRANSLATION);
return new EditorState(cols, false);
} | [
"Creates the default editor state for editing a bundle with descriptor.\n@return the default editor state for editing a bundle with descriptor."
] | [
"Handle unbind service event.\n@param service Service instance\n@param props Service reference properties",
"read CustomInfo list from table.\n\n@param eventId the event id\n@return the map",
"Invoke the setters for the given variables on the given instance.\n@param <T> the instance type\n@param instance the instance to inject with the variables\n@param vars the variables to inject\n@return the instance\n@throws ReflectiveOperationException if there was a problem finding or invoking a setter method",
"Use this API to fetch all the route6 resources that are configured on netscaler.\nThis uses route6_args which is a way to provide additional arguments while fetching the resources.",
"Generate a path select string\n\n@return Select query string",
"Build call for getCharactersCharacterIdShip\n\n@param characterId\nAn EVE character ID (required)\n@param datasource\nThe server name you would like data from (optional, default to\ntranquility)\n@param ifNoneMatch\nETag from a previous request. A 304 will be returned if this\nmatches the current ETag (optional)\n@param token\nAccess token to use if unable to set a header (optional)\n@param callback\nCallback for upload/download progress\n@return Call to execute\n@throws ApiException\nIf fail to serialize the request body object",
"Close the Closeable. Logging a warning if any problems occur.\n\n@param c the thing to close",
"Read ClassDescriptors from the given repository file.\n@see #mergeDescriptorRepository",
"Scan the segments to find the largest height value present.\n\n@return the largest waveform height anywhere in the preview."
] |
public AT_Row setPaddingTopBottom(int padding){
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setPaddingTopBottom(padding);
}
}
return this;
} | [
"Sets top and bottom padding for all cells in the row.\n@param padding new padding for top and bottom, ignored if smaller than 0\n@return this to allow chaining"
] | [
"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",
"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",
"Infer the type of and create a new output variable using the results from the right side of the equation.\nIf the type is already known just return that.",
"Convert a drawable object into a Bitmap.\n@param drawable Drawable to extract a Bitmap from.\n@return A Bitmap created from the drawable parameter.",
"Creates an object instance from the Scala class name\n\n@param className the Scala class name\n@return An Object instance",
"Switches to the next tab.",
"Returns an integer array that contains the default values for all the\ntexture parameters.\n\n@return an integer array that contains the default values for all the\ntexture parameters.",
"Merges two lists of references, eliminating duplicates in the process.\n\n@param references1\n@param references2\n@return merged list",
"Matches the styles and adjusts the size. This needs to be\ncalled after the input is added to the DOM, so we do it in\nonLoad."
] |
static ModelNode createOperation(final ModelNode operationToValidate) {
PathAddress pa = PathAddress.pathAddress(operationToValidate.require(ModelDescriptionConstants.OP_ADDR));
PathAddress realmPA = null;
for (int i = pa.size() - 1; i > 0; i--) {
PathElement pe = pa.getElement(i);
if (SECURITY_REALM.equals(pe.getKey())) {
realmPA = pa.subAddress(0, i + 1);
break;
}
}
assert realmPA != null : "operationToValidate did not have an address that included a " + SECURITY_REALM;
return Util.getEmptyOperation("validate-authentication", realmPA.toModelNode());
} | [
"Creates an operations that targets this handler.\n@param operationToValidate the operation that this handler will validate\n@return the validation operation"
] | [
"Decomposes a submatrix. The results are written to the submatrix\nand to its internal matrix L.\n\n@param mat A matrix which has a submatrix that needs to be inverted\n@param indexStart the first index of the submatrix\n@param n The width of the submatrix that is to be inverted.\n@return True if it was able to finish the decomposition.",
"Use this API to fetch sslcertkey resource of given name .",
"Expands the cluster to include density-reachable items.\n\n@param cluster Cluster to expand\n@param point Point to add to cluster\n@param neighbors List of neighbors\n@param points the data set\n@param visited the set of already visited points\n@return the expanded cluster",
"Reads Logical Screen Descriptor.",
"Prepare a parallel HTTP PUT Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Use the jgrapht cycle checker to detect any cycles in the provided dependency graph.",
"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",
"Associate the specified value with the specified key in this map.\nIf the map previously contained a mapping for this key, the old\nvalue is replaced and returned.\n\n@param key the key with which the value is to be associated\n@param value the value to be associated with this key\n@return the value previously mapped to the key, or null",
"Use this API to fetch tmsessionpolicy_binding resource of given name ."
] |
public void set1Value(int index, String newValue) {
try {
value.set( index, newValue );
}
catch (IndexOutOfBoundsException e) {
Log.e(TAG, "X3D MFString set1Value(int index, ...) out of bounds." + e);
}
catch (Exception e) {
Log.e(TAG, "X3D MFString set1Value(int index, ...) exception " + e);
}
} | [
"Replace a single value at the appropriate location in the existing value array.\n@param index - location in the array list\n@param newValue - the new String"
] | [
"Unmarshal the XML content with auto-correction.\n@param file the file that contains the XML\n@return the XML read from the file\n@throws CmsXmlException thrown if the XML can't be read.",
"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.",
"Reset a timer of the given string name for the given thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked",
"This method inserts a name value pair into internal storage.\n\n@param field task field\n@param value attribute value",
"Use this API to fetch autoscaleprofile resource of given name .",
"Write the standard set of day types.\n\n@param calendars parent collection of calendars",
"Checks to see if the submatrix has its boundaries along inner blocks.\n\n@param blockLength Size of an inner block.\n@param A Submatrix.\n@return If it is block aligned or not.",
"Sets the jdbcLevel. parse the string setting and check that it is indeed an integer.\n@param jdbcLevel The jdbcLevel to set",
"given the groupId, and 2 string arrays, adds the name-responses pair to the table_override\n\n@param groupId ID of group\n@param methodName name of method\n@param className name of class\n@throws Exception exception"
] |
public boolean mapsCell(String cell) {
return mappers.values().stream().anyMatch(mapper -> mapper.mapsCell(cell));
} | [
"Returns if this has any mapping for the specified cell.\n\n@param cell the cell name\n@return {@code true} if there is any mapping for the cell, {@code false} otherwise"
] | [
"Calculate the value of a CMS option using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option maturity\n@param swapMaturity The swap maturity\n@param payoffUnit The payoff unit, e.g., the discount factor corresponding to the payment date\n@param optionStrike The option strike\n@return Value of the CMS option",
"Register the given common classes with the ClassUtils cache.",
"return a prepared Update Statement fitting to the given ClassDescriptor",
"Create a ModelNode representing the operating system the instance is running on.\n\n@return a ModelNode representing the operating system the instance is running on.\n@throws OperationFailedException",
"Collect the URIs of resources, that are referenced by the given description.\n@return the list of referenced URIs. Never <code>null</code>.",
"Retrieve the request History based on the specified filters.\nIf no filter is specified, return the default size history.\n\n@param filters filters to be applied\n@return array of History items\n@throws Exception exception",
"Returns all found resolvers\n@return",
"Creates a date from the equivalent long value. This conversion\ntakes account of the time zone.\n\n@param date date expressed as a long integer\n@return new Date instance",
"retrieve a collection of type collectionClass matching the Query query\nif lazy = true return a CollectionProxy\n\n@param collectionClass\n@param query\n@param lazy\n@return ManageableCollection\n@throws PersistenceBrokerException"
] |
public static base_response add(nitro_service client, authenticationradiusaction resource) throws Exception {
authenticationradiusaction addresource = new authenticationradiusaction();
addresource.name = resource.name;
addresource.serverip = resource.serverip;
addresource.serverport = resource.serverport;
addresource.authtimeout = resource.authtimeout;
addresource.radkey = resource.radkey;
addresource.radnasip = resource.radnasip;
addresource.radnasid = resource.radnasid;
addresource.radvendorid = resource.radvendorid;
addresource.radattributetype = resource.radattributetype;
addresource.radgroupsprefix = resource.radgroupsprefix;
addresource.radgroupseparator = resource.radgroupseparator;
addresource.passencoding = resource.passencoding;
addresource.ipvendorid = resource.ipvendorid;
addresource.ipattributetype = resource.ipattributetype;
addresource.accounting = resource.accounting;
addresource.pwdvendorid = resource.pwdvendorid;
addresource.pwdattributetype = resource.pwdattributetype;
addresource.defaultauthenticationgroup = resource.defaultauthenticationgroup;
addresource.callingstationid = resource.callingstationid;
return addresource.add_resource(client);
} | [
"Use this API to add authenticationradiusaction."
] | [
"Starts the one and only job instance in a separate Thread. Should be called exactly one time before\nthe operation is stopped.\n\n@param arguments {@inheritDoc}",
"Returns the index of the first invalid character of the zone, or -1 if the zone is valid\n\n@param sequence\n@return",
"Returns the metallic factor for PBR shading",
"Returns an array with the width of the longest word per column calculated from the given table.\nDefault padding will be added per column.\nPadding for individual columns will be added if defined.\n@param rows the table rows for calculations\n@param colNumbers number of columns in the table\n@return array with width of longest word for each column, null if input table was null",
"Set the payload to the fileModel of the given instance even though the variable is not directly of it's type. This is mainly to simplify the\ncreation of the rule, when the FileModel itself is not being iterated but just a model referencing it.",
"Use this API to unset the properties of coparameter resource.\nProperties that need to be unset are specified in args array.",
"Copy all of the mappings from the specified map to this one, replacing\nany mappings with the same keys.\n\n@param in the map whose mappings are to be copied",
"Gets a legend graphic with the specified metadata parameters. All parameters are passed as request parameters.\n\n@param layerId\nthe layer id\n@param styleName\nthe style name\n@param ruleIndex\nthe rule index\n@param format\nthe image format ('png','jpg','gif')\n@param width\nthe graphic's width\n@param height\nthe graphic's height\n@param scale\nthe scale denominator (not supported yet)\n@param allRules\nif true the image will contain all rules stacked vertically\n@param request\nthe servlet request object\n@return the model and view\n@throws GeomajasException\nwhen a style or rule does not exist or is not renderable",
"Creates a new child folder inside this folder.\n\n@param name the new folder's name.\n@return the created folder's info."
] |
public static String getParameter(DbConn cnx, String key, String defaultValue)
{
try
{
return cnx.runSelectSingle("globalprm_select_by_key", 3, String.class, key);
}
catch (NoResultException e)
{
return defaultValue;
}
} | [
"Retrieve the value of a single-valued parameter.\n\n@param key\n@param defaultValue\n@param cnx"
] | [
"Updates the properties of a tag. Only the fields provided in the `data`\nblock will be updated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated tag record.\n\n@param tag The tag to update.\n@return Request object",
"blocks until there is a connection",
"returns a sorted array of properties",
"Process a device update once it has been received. Track it as the most recent update from its address,\nand notify any registered listeners, including master listeners if it results in changes to tracked state,\nsuch as the current master player and tempo. Also handles the Baroque dance of handing off the tempo master\nrole from or to another device.",
"Adds vector v1 to v2 and places the result in this vector.\n\n@param v1\nleft-hand vector\n@param v2\nright-hand vector",
"Creates a Source Processor\n\n@param source the data source itself\n@param parallelism the parallelism of this processor\n@param description the description of this processor\n@param taskConf the configuration of this processor\n@param system actor system\n@return the new created source processor",
"Use this API to count sslcertkey_crldistribution_binding resources configued on NetScaler.",
"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",
"Checks whether a String satisfies the number range selection filter.\nThe test is evaluated based on the rightmost natural number found in\nthe String. Note that this is just evaluated on the String as given.\nIt is not trying to interpret it as a filename and to decide whether\nthe file exists, is a directory or anything like that.\n\n@param str The String to check for a number in\n@return true If the String is within the ranges filtered for"
] |
@Override
public void setValue(String value, boolean fireEvents) {
boolean added = setSelectedValue(this, value, addMissingValue);
if (added && fireEvents) {
ValueChangeEvent.fire(this, getValue());
}
} | [
"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"
] | [
"Passes the Socket's InputStream and OutputStream to the closure. The\nstreams will be closed after the closure returns, even if an exception\nis thrown.\n\n@param socket a Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 1.5.2",
"Log a warning for the given operation at the provided address for the given attributes, using the provided detail\nmessage.\n\n@param address where warning occurred\n@param operation where which problem occurred\n@param message custom error message to append\n@param attributes attributes we that have problems about",
"Delete an index with the specified name and type in the given design document.\n\n@param indexName name of the index\n@param designDocId ID of the design doc (the _design prefix will be added if not present)\n@param type type of the index, valid values or \"text\" or \"json\"",
"Checks that excess arguments match the vararg signature parameter.\n@param params\n@param args\n@return -1 if no match, 0 if all arguments matches the vararg type and >0 if one or more vararg argument is\nassignable to the vararg type, but still not an exact match",
"We have obtained a waveform preview for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this waveform preview\n@param preview the waveform preview which we retrieved",
"Write a comma to the output stream if required.",
"if you don't have an argument, choose the value that is going to be inserted into the map instead\n\n@param commandLineOption specification of the command line options\n@param value the value that is going to be inserted into the map instead of the argument",
"This adds to the feature name the name of classes that are other than\nthe current class that are involved in the clique. In the CMM, these\nother classes become part of the conditioning feature, and only the\nclass of the current position is being predicted.\n\n@return A collection of features with extra class information put\ninto the feature name.",
"Returns a builder that is initialized with the given path.\n@param path the path to initialize with\n@return the new {@code UriComponentsBuilder}"
] |
private Duration getAssignmentWork(ProjectCalendar calendar, TimephasedWork assignment)
{
Date assignmentStart = assignment.getStart();
Date splitStart = assignmentStart;
Date splitFinishTime = calendar.getFinishTime(splitStart);
Date splitFinish = DateHelper.setTime(splitStart, splitFinishTime);
Duration calendarSplitWork = calendar.getWork(splitStart, splitFinish, TimeUnit.MINUTES);
Duration assignmentWorkPerDay = assignment.getAmountPerDay();
Duration splitWork;
double splitMinutes = assignmentWorkPerDay.getDuration();
splitMinutes *= calendarSplitWork.getDuration();
splitMinutes /= (8 * 60); // this appears to be a fixed value
splitWork = Duration.getInstance(splitMinutes, TimeUnit.MINUTES);
return splitWork;
} | [
"Retrieves the pro-rata work carried out on a given day.\n\n@param calendar current calendar\n@param assignment current assignment.\n@return assignment work duration"
] | [
"Returns the configured fields of the current field configuration.\n\n@return the configured fields of the current field configuration",
"Sets the current switch index based on object name.\nThis function finds the child of the scene object\nthis component is attached to and sets the switch\nindex to reference it so this is the object that\nwill be displayed.\n\nIf it is out of range, none of the children will be shown.\n@param childName name of child to select\n@see GVRSceneObject#getChildByIndex(int)",
"Gets the URL of the route with given name.\n@param routeName to return its URL\n@return URL backed by the route with given name.",
"Clear all overrides, reset repeat counts for a response path\n\n@param pathId ID of path\n@param clientUUID UUID of client\n@throws Exception exception",
"Returns the required gallery open parameters.\n\n@param cms an initialized instance of a CmsObject\n@param messages the dialog messages\n@param param the widget parameter to generate the widget for\n@param resource the resource being edited\n@param hashId the field id hash\n\n@return the gallery open parameters",
"Shuffle an array.\n\n@param array Array.\n@param seed Random seed.",
"Creates a polling state.\n\n@param response the response from Retrofit REST call that initiate the long running operation.\n@param lroOptions long running operation options.\n@param defaultRetryTimeout the long running operation retry timeout.\n@param resourceType the type of the resource the long running operation returns\n@param serializerAdapter the adapter for the Jackson object mapper\n@param <T> the result type\n@return the polling state\n@throws IOException thrown by deserialization",
"note, this just logs an error and doesn't throw as its only used to remove old configuration files, and shouldn't stop boot",
"returns an Array with an Objects PK VALUES, with any java-to-sql\nFieldConversion applied. If the Object is a Proxy or a VirtualProxy NO\nconversion is necessary.\n\n@param objectOrProxy\n@return Object[]\n@throws PersistenceBrokerException"
] |
private static boolean mayBeIPv6Address(String input) {
if (input == null) {
return false;
}
boolean result = false;
int colonsCounter = 0;
int length = input.length();
for (int i = 0; i < length; i++) {
char c = input.charAt(i);
if (c == '.' || c == '%') {
// IPv4 in IPv6 or Zone ID detected, end of checking.
break;
}
if (!((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f')
|| (c >= 'A' && c <= 'F') || c == ':')) {
return false;
} else if (c == ':') {
colonsCounter++;
}
}
if (colonsCounter >= 2) {
result = true;
}
return result;
} | [
"Heuristic check if string might be an IPv6 address.\n\n@param input Any string or null\n@return true, if input string contains only hex digits and at least two colons, before '.' or '%' character."
] | [
"Splits the given string.",
"Finds any clients which are not currently in use, and which have been idle for longer than the\nidle timeout, and closes them.",
"Display web page, but no user interface - close",
"Add the list with given bundles to the \"Require-Bundle\" main attribute.\n\n@param requiredBundles The list of all bundles to add.",
"Read an optional string value form a JSON value.\n@param val the JSON value that should represent the string.\n@return the string from the JSON or null if reading the string fails.",
"Returns the set of synchronized documents in a namespace.\n\n@param namespace the namespace to get synchronized documents for.\n@return the set of synchronized documents in a namespace.",
"This method is called to format a date. It will return the null text\nif a null value is supplied.\n\n@param value date value\n@return formatted date value",
"Returns a Span that covers all rows beginning with a prefix String parameters will be encoded\nas UTF-8",
"Checks that sequence-name is only used with autoincrement='ojb'\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated"
] |
public static Logger getLogger(String className) {
if (logType == null) {
logType = findLogType();
}
return new Logger(logType.createLog(className));
} | [
"Return a logger associated with a particular class name."
] | [
"Upgrades a read transaction to a write transaction, executes the work then downgrades to a read transaction\nagain.\n\n@since 2.4\n@noreference",
"Return the number of entries in the cue list that represent hot cues.\n\n@return the number of cue list entries that are hot cues",
"Returns a new instance of the class with the given qualified name using the constructor with\nthe specified signature.\n\n@param className The qualified name of the class to instantiate\n@param types The parameter types\n@param args The arguments\n@return The instance",
"Determine if a task field contains data.\n\n@param task task instance\n@param field target field\n@return true if the field contains data",
"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",
"Retrieve the default mapping between MPXJ resource fields and Primavera resource field names.\n\n@return mapping",
"Obtains a Coptic local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Coptic local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Starts the enforcer.",
"Mbeans for SLOP_UPDATE"
] |
protected String getClasspath() throws IOException {
List<String> classpath = new ArrayList<>();
classpath.add(getBundleJarPath());
classpath.addAll(getPluginsPath());
return StringUtils.toString(classpath.toArray(new String[classpath.size()]), " ");
} | [
"Returns the classpath for executable jar."
] | [
"Use this API to fetch all the gslbsite resources that are configured on netscaler.",
"Set the DPI value for GeoServer if there are already FORMAT_OPTIONS.",
"Creates a new Table instance from data extracted from an MPP file.\n\n@param file parent project file\n@param data fixed data\n@param varMeta var meta\n@param varData var data\n@return Table instance",
"Get a timer of the given string name and todos for the current thread. If\nno such timer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@return timer",
"Converts the string representation of a Planner duration into\nan MPXJ Duration instance.\n\nPlanner represents durations as a number of seconds in its\nfile format, however it displays durations as days and hours,\nand seems to assume that a working day is 8 hours.\n\n@param value string representation of a duration\n@return Duration instance",
"Create a new DirectByteBuffer from a given address and size.\nThe returned DirectByteBuffer does not release the memory by itself.\n\n@param addr\n@param size\n@param att object holding the underlying memory to attach to the buffer.\nThis will prevent the garbage collection of the memory area that's\nassociated with the new <code>DirectByteBuffer</code>\n@return",
"Create a FreeMarkerOperation with the provided furnace instance template path, and varNames.\n\nThe variables in varNames will be provided to the template, and a new ReportModel will be created with these variables attached.",
"Returns true if this Bytes object equals another. This method doesn't check it's arguments.\n\n@since 1.2.0",
"Set the visibility of the object.\n\n@see Visibility\n@param visibility\nThe visibility of the object.\n@return {@code true} if the visibility was changed, {@code false} if it\nwasn't."
] |
private void initManagementPart() {
m_manageExceptionsButton.setText(Messages.get().key(Messages.GUI_SERIALDATE_BUTTON_MANAGE_EXCEPTIONS_0));
m_manageExceptionsButton.getElement().getStyle().setFloat(Style.Float.RIGHT);
} | [
"Initialize the ui elements for the management part."
] | [
"Merge the two maps.\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<p>\nIf a key exists in the left and right operands, the value in the right operand is preferred.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@throws IllegalArgumentException - when a right operand key exists in the left operand.\n@since 2.15",
"Classify stdin by documents seperated by 3 blank line\n@param readerWriter\n@return boolean reached end of IO\n@throws IOException",
"Select this tab item.",
"Return a vector of values corresponding to a given vector of times.\n@param times A given vector of times.\n@return A vector of values corresponding to the given vector of times.",
"This method returns the value of the product under the specified model and other information in a key-value map.\n\n@param evaluationTime The time on which this products value should be observed.\n@param model A model used to evaluate the product.\n@return The values of the product.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method.",
"Serialize a parameterized object to a JSON String.\n\n@param object The object to serialize.\n@param parameterizedType The ParameterizedType describing the object. Ex: LoganSquare.serialize(object, new ParameterizedType<MyModel<OtherModel>>() { });",
"Recursively scan the provided path and return a list of all Java packages contained therein.",
"Get http response",
"Returns the ordered Map value of the field.\n\n@return the ordered Map value of the field. It returns a reference of the value.\n@throws IllegalArgumentException if the value cannot be converted to ordered Map."
] |
public static nsrpcnode get(nitro_service service, String ipaddress) throws Exception{
nsrpcnode obj = new nsrpcnode();
obj.set_ipaddress(ipaddress);
nsrpcnode response = (nsrpcnode) obj.get_resource(service);
return response;
} | [
"Use this API to fetch nsrpcnode resource of given name ."
] | [
"Creates a Set out of the given keys\n\n@param <K> the key type\n@param keys\nthe keys\n@return a Set containing the given keys",
"Creates a slice for directly a raw memory address. This is\ninherently unsafe as it may be used to access arbitrary memory.\nThe slice will hold the specified object reference to prevent the\ngarbage collector from freeing it while it is in use by the slice.\n\n@param address the raw memory address base\n@param size the size of the slice\n@param reference the object reference\n@return the unsafe slice",
"Removes a named property from the object.\n\nIf the property is not found, no action is taken.\n\n@param name the name of the property",
"Adds an additional interface that the proxy should implement. The default\nimplementation will be to forward invocations to the bean instance.\n\n@param newInterface an interface",
"Returns the artifact available versions\n\n@param gavc String\n@return List<String>",
"Encodes the given URI path segment with the given encoding.\n@param segment the segment to be encoded\n@param encoding the character encoding to encode to\n@return the encoded segment\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Writes this address as a single hexadecimal value with always the exact same number of characters, with or without a preceding 0x prefix.",
"Converts an object to an object, with squiggly filters applied.\n\n@param mapper the object mapper\n@param source the source to convert\n@return target instance\n@see SquigglyUtils#objectify(ObjectMapper, Object, Class)",
"Send a packet to the target player telling it to load the specified track from the specified source player.\n\n@param targetPlayer the device number of the player that you want to have load a track\n@param rekordboxId the identifier of a track within the source player's rekordbox database\n@param sourcePlayer the device number of the player from which the track should be loaded\n@param sourceSlot the media slot from which the track should be loaded\n@param sourceType the type of track to be loaded\n\n@throws IOException if there is a problem sending the command\n@throws IllegalStateException if the {@code VirtualCdj} is not active or the target device cannot be found"
] |
public void write(WritableByteChannel channel) throws IOException {
logger.debug("Writing> {}", this);
for (Field field : fields) {
field.write(channel);
}
} | [
"Writes the message to the specified channel, for example when creating metadata cache files.\n\n@param channel the channel to which it should be written\n\n@throws IOException if there is a problem writing to the channel"
] | [
"Returns true if the given document should be included in the\nserialization.\n\n@param itemDocument\nthe document to check\n@return true if the document should be serialized",
"Set the offsets in the compressed data area for each mip-map level.\n@param offsets array of offsets",
"Provide Jersey client for the targeted Grapes server\n\n@return webResource",
"Returns a SimpleConfiguration clientConfig with properties set from this configuration\n\n@return SimpleConfiguration",
"Use this API to delete nsip6 resources.",
"Not exposed directly - the Query object passed as parameter actually contains results...",
"Obtain host header value for a hostname\n\n@param hostName\n@return",
"Sets left and right padding for all cells in the row.\n@param padding new padding for left and right, ignored if smaller than 0\n@return this to allow chaining",
"Gets the Symmetric Kullback-Leibler distance.\nThis metric is valid only for real and positive P and Q.\n\n@param p P vector.\n@param q Q vector.\n@return The Symmetric Kullback Leibler distance between p and q."
] |
public Operation.Info create( char op , Variable input ) {
switch( op ) {
case '\'':
return Operation.transpose(input, managerTemp);
default:
throw new RuntimeException("Unknown operation " + op);
}
} | [
"Create a new instance of a single input function from an operator character\n@param op Which operation\n@param input Input variable\n@return Resulting operation"
] | [
"Provides a type-specific Meta class for the given TinyType.\n\n@param <T> the TinyType class type\n@param candidate the TinyType class to obtain a Meta for\n@return a Meta implementation suitable for the candidate\n@throws IllegalArgumentException for null or a non-TinyType",
"Close all HTTP clients created by this factory\n@throws IOException if an I/O error occurs",
"Find the current active layout.\n\n@param phoenixProject phoenix project data\n@return current active layout",
"Get a new token.\n\n@return 14 character String",
"Adds new holes to the polygon.\n\n@param holes holes, must be contained in the exterior ring and must not overlap or\nintersect another hole\n@return this for chaining",
"Read activities.",
"Reads the integer representation of calendar hours for a given\nday and populates the calendar.\n\n@param calendar parent calendar\n@param day target day\n@param hours working hours",
"Sends the error to responder.",
"Execute pull docker image on agent\n\n@param launcher\n@param imageTag\n@param username\n@param password\n@param host\n@return\n@throws IOException\n@throws InterruptedException"
] |
private static JsonNode findNestedNode(JsonNode jsonNode, String composedKey) {
String[] jsonNodeKeys = splitKeyByFlatteningDots(composedKey);
for (String jsonNodeKey : jsonNodeKeys) {
jsonNode = jsonNode.get(unescapeEscapedDots(jsonNodeKey));
if (jsonNode == null) {
return null;
}
}
return jsonNode;
} | [
"Given a json node, find a nested node using given composed key.\n\n@param jsonNode the parent json node\n@param composedKey a key combines multiple keys using flattening dots.\nFlattening dots are dot character '.' those are not preceded by slash '\\'\nEach flattening dot represents a level with following key as field key in that level\n@return nested json node located using given composed key"
] | [
"Uploads chunk of a stream to an open upload session.\n@param stream the stream that is used to read the chunck using the offset and part size.\n@param offset the byte position where the chunk begins in the file.\n@param partSize the part size returned as part of the upload session instance creation.\nOnly the last chunk can have a lesser value.\n@param totalSizeOfFile The total size of the file being uploaded.\n@return the part instance that contains the part id, offset and part size.",
"Gets a string attribute from a json object given a path to traverse.\n\n@param record a JSONObject to traverse.\n@param path the json path to follow.\n@return the attribute as a {@link String}, or null if it was not found.",
"Returns a flag, indicating if the current event is a multi-day event.\nThe method is only called if the single event has an explicitely set end date\nor an explicitely changed whole day option.\n\n@return a flag, indicating if the current event takes lasts over more than one day.",
"adds the qualified names to the export-package attribute, if not already\npresent.\n\n@param packages - passing parameterized packages is not supported",
"validates operation against the definition and sets model for the parameters passed.\n\n@param operationObject model node of type {@link ModelType#OBJECT}, typically representing an operation request\n@param model model node in which the value should be stored\n@throws OperationFailedException if the value is not valid\n\n@deprecated Not used by the WildFly management kernel; will be removed in a future release",
"Checks if the given project exists or not.\n\n@param name project name\n@return true/false\n@throws IllegalArgumentException",
"Calculates the squared curvature of the LIBOR instantaneous variance.\n\n@param evaluationTime Time at which the product is evaluated.\n@param model A model implementing the LIBORModelMonteCarloSimulationModel\n@return The squared curvature of the LIBOR instantaneous variance (reduced a possible tolerance). The return value is ≥ 0.",
"public because it's used by other packages that use Duke",
"Scans a single class for Swagger annotations - does not invoke ReaderListeners"
] |
private String getLogRequestIdentifier() {
if (logIdentifier == null) {
logIdentifier = String.format("%s-%s %s %s", Integer.toHexString(hashCode()),
numberOfRetries, connection.getRequestMethod(), connection.getURL());
}
return logIdentifier;
} | [
"Get a prefix for the log message to help identify which request is which and which responses\nbelong to which requests."
] | [
"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",
"Write entries into the storage.\nOverriding methods should first delegate to super before adding their own entries.",
"Seeks forward or backwards to a particular season based on the current date\n\n@param seasonString The season to seek to\n@param direction The direction to seek\n@param seekAmount The number of years to seek",
"Create a host target.\n\n@param hostName the host name\n@param client the connected controller client to the master host.\n@return the remote target",
"Helper method for formatting connection termination messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@param terminationReason\nThe reason for terminating the connection\n@return A formatted message in the format:\n\"[<connectionName>] remote host[<host>] <connectionReason> - <terminationReason>\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG -\nterminated by remote host.",
"Use this API to count sslvserver_sslciphersuite_binding resources configued on NetScaler.",
"This produces a string with no compressed segments and all segments of full length,\nwhich is 4 characters for IPv6 segments and 3 characters for IPv4 segments.",
"Retrieve and validate the key from the REST request.\n\n@return true if present, false if missing",
"Use this API to add nspbr6 resources."
] |
private void initFieldFactories() {
if (m_model.hasMasterMode()) {
TranslateTableFieldFactory masterFieldFactory = new CmsMessageBundleEditorTypes.TranslateTableFieldFactory(
m_table,
m_model.getEditableColumns(CmsMessageBundleEditorTypes.EditMode.MASTER));
masterFieldFactory.registerKeyChangeListener(this);
m_fieldFactories.put(CmsMessageBundleEditorTypes.EditMode.MASTER, masterFieldFactory);
}
TranslateTableFieldFactory defaultFieldFactory = new CmsMessageBundleEditorTypes.TranslateTableFieldFactory(
m_table,
m_model.getEditableColumns(CmsMessageBundleEditorTypes.EditMode.DEFAULT));
defaultFieldFactory.registerKeyChangeListener(this);
m_fieldFactories.put(CmsMessageBundleEditorTypes.EditMode.DEFAULT, defaultFieldFactory);
} | [
"Initialize the field factories for the messages table."
] | [
"Convert a name into initials.\n\n@param name source name\n@return initials",
"Reset autoCommit state.",
"Read exceptions for a calendar.\n\n@param table calendar exception data\n@param calendar calendar\n@param exceptionID first exception ID",
"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",
"I KNOW WHAT I AM DOING",
"Returns the JSON String representation of the payload\naccording to Apple APNS specification\n\n@return the String representation as expected by Apple",
"Get a compatible constructor\n\n@param type\nClass to look for constructor in\n@param argumentType\nArgument type for constructor\n@return the compatible constructor or null if none found",
"Set new list data set\n@param list new data set",
"Convert the MSPDI representation of a UUID into a Java UUID instance.\n\n@param value MSPDI UUID\n@return Java UUID instance"
] |
@Override
protected void doLinking() {
IParseResult parseResult = getParseResult();
if (parseResult == null || parseResult.getRootASTElement() == null)
return;
XtextLinker castedLinker = (XtextLinker) getLinker();
castedLinker.discardGeneratedPackages(parseResult.getRootASTElement());
} | [
"Overridden to do only the clean-part of the linking but not\nthe actual linking. This is deferred until someone wants to access\nthe content of the resource."
] | [
"Computes either the vector p-norm or the induced matrix p-norm depending on A\nbeing a vector or a matrix respectively.\n\n@param A Vector or matrix whose norm is to be computed.\n@param p The p value of the p-norm.\n@return The computed norm.",
"Remove the realm name block.\n\n@see PropertiesFileLoader#addLineContent(java.io.BufferedReader, java.util.List, String)",
"Used to populate Map with given annotations\n\n@param annotations initial value for annotations",
"Enable clipping for the Widget. Widget content including its children will be clipped by a\nrectangular View Port. By default clipping is disabled.",
"Enables lifecycle callbacks for Android devices\n@param application App's Application object",
"Cancel request and workers.",
"Pop the record number from the front of the list, and parse it to ensure that\nit is a valid integer.\n\n@param list MPX record",
"Checks to see if all the provided matrices are the expected size for an SVD. If an error is encountered\nthen an exception is thrown. This automatically handles compact and non-compact formats",
"Associate a name with an object and make it persistent.\nAn object instance may be bound to more than one name.\nBinding a previously transient object to a name makes that object persistent.\n@param object The object to be named.\n@param name The name to be given to the object.\n@exception org.odmg.ObjectNameNotUniqueException\nIf an attempt is made to bind a name to an object and that name is already bound\nto an object."
] |
@UiHandler("m_wholeDayCheckBox")
void onWholeDayChange(ValueChangeEvent<Boolean> event) {
//TODO: Improve - adjust time selections?
if (handleChange()) {
m_controller.setWholeDay(event.getValue());
}
} | [
"Handle a whole day change event.\n@param event the change event."
] | [
"Get the last non-white X point\n@param img Image in memory\n@return the trimmed width",
"other static handlers",
"Remove a child view of Android hierarchy view .\n\n@param view View to be removed.",
"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",
"convolution data type",
"Increases the maximum number of columns in the matrix.\n@param desiredColumns Desired number of columns.\n@param preserveValue If the array needs to be expanded should it copy the previous values?",
"Adds the List of Lists of CRFDatums to the data and labels arrays, treating\neach datum as if it were its own document. Adds context labels in addition\nto the target label for each datum, meaning that for a particular document,\nthe number of labels will be windowSize-1 greater than the number of\ndatums.\n\n@param processedData\na List of Lists of CRFDatums",
"Create and return a SelectIterator for the class using the default mapped query for all statement.",
"Issue the database statements to drop the table associated with a class.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param dataClass\nThe class for which a table will be dropped.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so."
] |
@Pure
public static <T> List<T> reverseView(List<T> list) {
return Lists.reverse(list);
} | [
"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"
] | [
"Get a property as a boolean or default value.\n\n@param key the property name\n@param defaultValue the default",
"Set new list data set\n@param list new data set",
"Loads the script from a text string.\n@param scriptText text string containing script to execute.\n@param language language (\"js\" or \"lua\")",
"Gets the default options to be passed when no custom properties are given.\n\n@return properties with formatter options",
"Get image parent ID from imageID on the current agent.\n\n@param imageID\n@return",
"Returns the field with the specified value properly formatted. Multiline\nvalues are automatically indented, and dots are added on the empty lines.\n\n<pre>\nField-Name: value\n</pre>",
"Calculates the squared curvature of the LIBOR instantaneous variance.\n\n@param evaluationTime Time at which the product is evaluated.\n@param model A model implementing the LIBORModelMonteCarloSimulationModel\n@return The squared curvature of the LIBOR instantaneous variance (reduced a possible tolerance). The return value is ≥ 0.",
"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",
"returns an Array with an Objects NON-PK VALUES\n@throws PersistenceBrokerException if there is an erros accessing o field values"
] |
public static String getImageIdFromAgent(Launcher launcher, final String imageTag, final String host) throws IOException, InterruptedException {
return launcher.getChannel().call(new MasterToSlaveCallable<String, IOException>() {
public String call() throws IOException {
return DockerUtils.getImageIdFromTag(imageTag, host);
}
});
} | [
"Get image ID from imageTag on the current agent.\n\n@param imageTag\n@return"
] | [
"Use this API to update responderpolicy.",
"Generates a Map of query parameters for Module regarding the filters\n\n@return Map<String, Object>",
"Use this API to fetch all the nsrollbackcmd resources that are configured on netscaler.",
"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",
"Serializes the timing data to a \"~\" delimited file at outputPath.",
"Removes the given key with its associated element from the receiver, if present.\n\n@param key the key to be removed from the receiver.\n@return <tt>true</tt> if the receiver contained the specified key, <tt>false</tt> otherwise.",
"Convert the MSPDI representation of a UUID into a Java UUID instance.\n\n@param value MSPDI UUID\n@return Java UUID instance",
"Use this API to clear bridgetable.",
"Validates given external observer method.\n\n@param observerMethod the given observer method\n@param beanManager\n@param originalObserverMethod observer method replaced by given observer method (this parameter is optional)"
] |
private static void addCacheDetailsEntry(SlotReference slot, ZipOutputStream zos, WritableByteChannel channel) throws IOException {
// Record the details of the media being cached, to make it easier to recognize now that we can.
MediaDetails details = MetadataFinder.getInstance().getMediaDetailsFor(slot);
if (details != null) {
zos.putNextEntry(new ZipEntry(CACHE_DETAILS_ENTRY));
Util.writeFully(details.getRawBytes(), channel);
}
} | [
"Record the details of the media being cached, to make it easier to recognize, now that we have access to that\ninformation.\n\n@param slot the slot from which a metadata cache is being created\n@param zos the stream to which the ZipFile is being written\n@param channel the low-level channel to which the cache is being written\n\n@throws IOException if there is a problem writing the media details entry"
] | [
"Write throwable as attachment.\n\n@param throwable to write\n@param title title of attachment\n@return Created {@link ru.yandex.qatools.allure.model.Attachment}",
"Notifies all registered BufferChangeLogger instances of a change.\n\n@param newData the buffer that contains the new data being added\n@param numChars the number of valid characters in the buffer",
"Starts a background thread which calls the controller every\ncheck_interval milliseconds. Returns immediately, leaving the\nbackground thread running.",
"Recursively searches for formatting annotations.\n\n@param visitedTypes used to prevent an endless loop\n@param parameterName",
"Assigns one variable to one value\n\n@param action an Assign Action\n@param possibleStateList a current list of possible states produced so far from expanding a model state\n\n@return the same list, with every possible state augmented with an assigned variable, defined by action",
"Static factory method.\n\n@param targetVariable\nthe variable to find the effective {@code putfield} or\n{@code putstatic} instruction for.\n@param controlFlowBlocks\nall control flow blocks of an initialising constructor or\nmethod.\n@return a new instance of this class.",
"Get a TokenizerFactory that does Penn Treebank tokenization.\nThis is now the recommended factory method to use.\n\n@param factory A TokenFactory that determines what form of token is returned by the Tokenizer\n@param options A String specifying options (see the class javadoc for details)\n@param <T> The type of the tokens built by the LexedTokenFactory\n@return A TokenizerFactory that does Penn Treebank tokenization",
"Casts a ray into the scene graph, and returns the objects it intersects.\n\nThe ray is defined by its origin {@code [ox, oy, oz]} and its direction\n{@code [dx, dy, dz]}.\n\n<p>\nThe ray origin may be [0, 0, 0] and the direction components should be\nnormalized from -1 to 1: Note that the y direction runs from -1 at the\nbottom to 1 at the top. To construct a picking ray originating at the\nuser's head and pointing into the scene along the camera lookat vector,\npass in 0, 0, 0 for the origin and 0, 0, -1 for the direction.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is doing a ray cast into a particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n<p>\nDepending on the type of collider, that the hit location may not be exactly\nwhere the ray would intersect the scene object itself. Rather, it is\nwhere the ray intersects the collision geometry associated with the collider.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@param ox\nThe x coordinate of the ray origin.\n\n@param oy\nThe y coordinate of the ray origin.\n\n@param oz\nThe z coordinate of the ray origin.\n\n@param dx\nThe x vector of the ray direction.\n\n@param dy\nThe y vector of the ray direction.\n\n@param dz\nThe z vector of the ray direction.\n@return A list of {@link GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6",
"Log a fatal message with a throwable."
] |
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"
] | [
"once animation is setup, start the animation record the beginning and\nending time for the animation",
"Run a task periodically, for a set number of times.\n\n@param task\nTask to run.\n@param delay\nThe first execution will happen in {@code delay} seconds.\n@param period\nSubsequent executions will happen every {@code period} seconds\nafter the first.\n@param repetitions\nRepeat count\n@return {@code null} if {@code repetitions < 1}; otherwise, an interface\nthat lets you query the status; cancel; or reschedule the event.",
"Runs a Story with the given configuration and steps, applying the given\nmeta filter, and staring from given state.\n\n@param configuration the Configuration used to run story\n@param candidateSteps the List of CandidateSteps containing the candidate\nsteps methods\n@param story the Story to run\n@param filter the Filter to apply to the story Meta\n@param beforeStories the State before running any of the stories, if not\n<code>null</code>\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.",
"Record a Screen View event\n@param screenName String, the name of the screen",
"Updates a path table value for column columnName\n\n@param columnName name of the column to update\n@param newData new content to set\n@param path_id ID of the path to update",
"Creates a new Box Developer Edition connection with App User token levaraging BoxConfig.\n@param userId the user ID to use for an App User.\n@param boxConfig box configuration settings object\n@return a new instance of BoxAPIConnection.",
"Call rollback on the underlying connection.",
"Extracts out a matrix from source given a sub matrix with arbitrary rows and columns specified in\ntwo array lists\n\n@param src Source matrix. Not modified.\n@param rows array of row indexes\n@param rowsSize maximum element in row array\n@param cols array of column indexes\n@param colsSize maximum element in column array\n@param dst output matrix. Must be correct shape.",
"Use this API to clear route6."
] |
public static final String getString(byte[] data, int offset)
{
return getString(data, offset, data.length - offset);
} | [
"Retrieve a string value.\n\n@param data byte array\n@param offset offset into byte array\n@return string value"
] | [
"Retrieves the column title for the given locale.\n\n@param locale required locale for the default column title\n@return column title",
"Plots the MSD curve with the trajectory t and adds the fitted model for directed motion above.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param diffusionCoefficient Diffusion coefficient\n@param velocity velocity of the active transport",
"Use this API to add sslaction.",
"This produces a string with no compressed segments and all segments of full length,\nwhich is 3 characters for IPv4 segments.",
"Adds a new Pie Slice to the PieChart. After inserting and calculation of the highlighting color\na complete recalculation is initiated.\n\n@param _Slice The newly added PieSlice.",
"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 FieldDescriptor from joined superclass.",
"Remove a notification message. Recursive until all pending removals have been completed.",
"Set child components.\n\n@param children\nchildren"
] |
public void bindSelect(PreparedStatement stmt, Identity oid, ClassDescriptor cld, boolean callableStmt) throws SQLException
{
ValueContainer[] values = null;
int i = 0;
int j = 0;
if (cld == null)
{
cld = m_broker.getClassDescriptor(oid.getObjectsRealClass());
}
try
{
if(callableStmt)
{
// First argument is the result set
m_platform.registerOutResultSet((CallableStatement) stmt, 1);
j++;
}
values = getKeyValues(m_broker, cld, oid);
for (/*void*/; i < values.length; i++, j++)
{
setObjectForStatement(stmt, j + 1, values[i].getValue(), values[i].getJdbcType().getType());
}
}
catch (SQLException e)
{
m_log.error("bindSelect failed for: " + oid.toString() + ", PK: " + i + ", value: " + values[i]);
throw e;
}
} | [
"Binds the Identities Primary key values to the statement."
] | [
"Get the cached entry or null if no valid cached entry is found.",
"Reflection API to find the method corresponding to the default implementation of a trait, given a bridge method.\n@param someMethod a method node\n@return null if it is not a method implemented in a trait. If it is, returns the method from the trait class.",
"Use this API to fetch dnsview resource of given name .",
"Use this API to clear bridgetable resources.",
"Add a given factory to the list of factories at the BEGINNING.\n\n@param factory The factory to be added.\n@return Cascade with amended factory list.",
"Changes to cluster OR store definition metadata results in routing\nstrategies changing. These changes need to be propagated to all the\nlisteners.\n\n@param cluster The updated cluster metadata\n@param storeDefs The updated list of store definition",
"Watches specified IDs in a collection.\n@param ids the ids to watch.\n@return the stream of change events.",
"Creates an operations that targets this handler.\n@param operationToValidate the operation that this handler will validate\n@return the validation operation",
"Set all unknown fields\n@param unknownFields the new unknown fields"
] |
public ItemRequest<Section> delete(String section) {
String path = String.format("/sections/%s", section);
return new ItemRequest<Section>(this, Section.class, path, "DELETE");
} | [
"A specific, existing section can be deleted by making a DELETE request\non the URL for that section.\n\nNote that sections must be empty to be deleted.\n\nThe last remaining section in a board view cannot be deleted.\n\nReturns an empty data block.\n\n@param section The section to delete.\n@return Request object"
] | [
"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",
"Use this API to change responderhtmlpage.",
"Make a WMS getLayer request and return the image read from the server.\n\n@param wmsLayerParam the wms request parameters\n@param commonURI the uri to use for the requests (excepting parameters of course.)\n@param imageSize the size of the image to request\n@param dpi the dpi of the image to request\n@param angle the angle of the image to request\n@param bounds the area and projection of the request on the world.",
"Stores the gathered usage statistics about property uses to a CSV file.\n\n@param usageStatistics\nthe statistics to store\n@param fileName\nthe name of the file to use",
"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",
"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",
"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",
"Sets the submatrix of W up give Y is already configured and if it is being cached or not.",
"Get a list of people in a given photo.\n\n@param photoId\n@throws FlickrException"
] |
public Date getTimestamp(FastTrackField dateName, FastTrackField timeName)
{
Date result = null;
Date date = getDate(dateName);
if (date != null)
{
Calendar dateCal = DateHelper.popCalendar(date);
Date time = getDate(timeName);
if (time != null)
{
Calendar timeCal = DateHelper.popCalendar(time);
dateCal.set(Calendar.HOUR_OF_DAY, timeCal.get(Calendar.HOUR_OF_DAY));
dateCal.set(Calendar.MINUTE, timeCal.get(Calendar.MINUTE));
dateCal.set(Calendar.SECOND, timeCal.get(Calendar.SECOND));
dateCal.set(Calendar.MILLISECOND, timeCal.get(Calendar.MILLISECOND));
DateHelper.pushCalendar(timeCal);
}
result = dateCal.getTime();
DateHelper.pushCalendar(dateCal);
}
return result;
} | [
"Retrieve a timestamp field.\n\n@param dateName field containing the date component\n@param timeName field containing the time component\n@return Date instance"
] | [
"End the script block, adding a return value statement\n@param value the value to return\n@return the new {@link LuaScriptBlock} instance",
"Process an individual UDF.\n\n@param udf UDF definition",
"Write the domain controller data to an S3 file.\n\n@param data the domain controller data\n@param domainName the name of the directory in the bucket to write the S3 file to\n@throws IOException",
"Sets the target hosts from line by line text.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the parallel task builder\n@throws TargetHostsLoadException\nthe target hosts load exception",
"init database with demo data",
"Use this API to fetch the statistics of all protocolip_stats resources that are configured on netscaler.",
"Get a property as a float or Default value.\n\n@param key the property name\n@param defaultValue default value",
"Returns the text for the JSONObject of Link provided\nThe JSONObject of Link provided should be of the type \"copy\"\n@param jsonObject of Link\n@return String",
"Extract a list of work pattern assignments.\n\n@param workPatterns string representation of work pattern assignments\n@return list of work pattern assignment rows"
] |
public void applyToPrimaryClassNodes(PrimaryClassNodeOperation body) throws CompilationFailedException {
Iterator classNodes = getPrimaryClassNodes(body.needSortedInput()).iterator();
while (classNodes.hasNext()) {
SourceUnit context = null;
try {
ClassNode classNode = (ClassNode) classNodes.next();
context = classNode.getModule().getContext();
if (context == null || context.phase < phase || (context.phase == phase && !context.phaseComplete)) {
int offset = 1;
Iterator<InnerClassNode> iterator = classNode.getInnerClasses();
while (iterator.hasNext()) {
iterator.next();
offset++;
}
body.call(context, new GeneratorContext(this.ast, offset), classNode);
}
} catch (CompilationFailedException e) {
// fall through, getErrorReporter().failIfErrors() will trigger
} catch (NullPointerException npe) {
GroovyBugError gbe = new GroovyBugError("unexpected NullpointerException", npe);
changeBugText(gbe, context);
throw gbe;
} catch (GroovyBugError e) {
changeBugText(e, context);
throw e;
} catch (NoClassDefFoundError e) {
// effort to get more logging in case a dependency of a class is loaded
// although it shouldn't have
convertUncaughtExceptionToCompilationError(e);
} catch (Exception e) {
convertUncaughtExceptionToCompilationError(e);
}
}
getErrorCollector().failIfErrors();
} | [
"A loop driver for applying operations to all primary ClassNodes in\nour AST. Automatically skips units that have already been processed\nthrough the current phase."
] | [
"Mark for creation all objects that were included into dependent collections.\nMark for deletion all objects that were excluded from dependent collections.",
"Check if the provided manifestPath is correct.\nSet the manifest and imagePath in case of the correct manifest.\n@param manifestPath\n@param candidateImagePath\n@param dependenciesClient\n@param listener\n@return true if found the correct manifest\n@throws IOException",
"LRN cross-channel backward computation. Double parameters cast to tensor data type",
"Use this API to restore appfwprofile resources.",
"In-place scaling of a column in A\n\n@param alpha scale factor\n@param A matrix\n@param col which row in A",
"One of DEFAULT, or LARGE.",
"Use this API to fetch the statistics of all nspbr6_stats resources that are configured on netscaler.",
"This method uses the configured git credentials and repo, to test its validity.\nIn addition, in case the user requested creation of a new tag, it checks that\nanother tag with the same name doesn't exist",
"Computes FPS average"
] |
public String getLinkUrl(JSONObject jsonObject){
if(jsonObject == null) return null;
try {
JSONObject urlObject = jsonObject.has("url") ? jsonObject.getJSONObject("url") : null;
if(urlObject == null) return null;
JSONObject androidObject = urlObject.has("android") ? urlObject.getJSONObject("android") : null;
if(androidObject != null){
return androidObject.has("text") ? androidObject.getString("text") : "";
}else{
return "";
}
} catch (JSONException e) {
Logger.v("Unable to get Link URL with JSON - "+e.getLocalizedMessage());
return null;
}
} | [
"Returns the text for the JSONObject of Link provided\nThe JSONObject of Link provided should be of the type \"url\"\n@param jsonObject of Link\n@return String"
] | [
"Method used to instantiate the appropriate input stream reader,\na standard one, or one which can deal with \"encrypted\" data.\n\n@param directory directory entry\n@param name file name\n@return new input stream\n@throws IOException",
"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.",
"common utility method for adding a statement to a record",
"Remove a role from the list of defined roles.\n\n@param roleName - The name of the role to be removed.\n@return A key that can be used to undo the removal.",
"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.",
"Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for",
"Iterate through dependencies",
"Finishes the current box - empties the text line buffer and creates a DOM element from it.",
"adds the qualified names to the require-bundle attribute, if not already\npresent.\n\n@param bundles - passing parameterized bundled (e.g. versions, etc.) is\nnot supported"
] |
@Override
public Map<String, String> values() {
Map<String, String> values = new LinkedHashMap<>();
for (Row each : delegates) {
for (Entry<String, String> entry : each.values().entrySet()) {
String name = entry.getKey();
if (!values.containsKey(name)) {
values.put(name, entry.getValue());
}
}
}
return values;
} | [
"Returns values aggregated from all the delegates, without overriding\nvalues that already exist.\n\n@return The Map of aggregated values"
] | [
"Use this API to unset the properties of inatparam resource.\nProperties that need to be unset are specified in args array.",
"Return a new instance of the BufferedImage\n\n@return BufferedImage",
"Assign FK values and store entries in indirection table\nfor all objects referenced by given object.\n\n@param obj real object with 1:n reference\n@param cod {@link CollectionDescriptor} of referenced 1:n objects\n@param insert flag signal insert operation, false signals update operation",
"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.",
"Enables a custom response\n\n@param model\n@param custom\n@param path_id\n@param clientUUID\n@return\n@throws Exception",
"Throws an IllegalStateException when the given value is not true.",
"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 update ntpserver.",
"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."
] |
public synchronized void addShutdownListener(ShutdownListener listener) {
if (state == CLOSED) {
listener.handleCompleted();
} else {
listeners.add(listener);
}
} | [
"Add a shutdown listener, which gets called when all requests completed on shutdown.\n\n@param listener the shutdown listener"
] | [
"To read an object in a quick & dirty way. Prepare to handle failures when object serialization changes!",
"Processes the template for all column definitions of the current table.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Deletes a FilePath file.\n\n@param workspace The build workspace.\n@param path The path in the workspace.\n@throws IOException In case of missing file.",
"Disassociate a name with an object\n@param name The name of an object.\n@exception ObjectNameNotFoundException No object exists in the database with that name.",
"Resize picture to desired size.\n\n@param width Desired width.\n@param height Desired height.\n@throws IllegalArgumentException if {@code width} or {@code height} is less than 0 or both are\n0.",
"Check if the the nodeId is present in the cluster managed by the metadata store\nor throw an exception.\n\n@param nodeId The nodeId to check existence of",
"Generates the InputValue for the form input by inspecting the current\nvalue of the corresponding WebElement on the DOM.\n\n@return The current InputValue for the element on the DOM.",
"Gets the index to use in the search.\n\n@return the index to use in the search",
"Calculate the Hamming distance between two hashes\n\n@param h1\n@param h2\n@return"
] |
private void getWeeklyDates(Calendar calendar, int frequency, List<Date> dates)
{
int currentDay = calendar.get(Calendar.DAY_OF_WEEK);
while (moreDates(calendar, dates))
{
int offset = 0;
for (int dayIndex = 0; dayIndex < 7; dayIndex++)
{
if (getWeeklyDay(Day.getInstance(currentDay)))
{
if (offset != 0)
{
calendar.add(Calendar.DAY_OF_YEAR, offset);
offset = 0;
}
if (!moreDates(calendar, dates))
{
break;
}
dates.add(calendar.getTime());
}
++offset;
++currentDay;
if (currentDay > 7)
{
currentDay = 1;
}
}
if (frequency > 1)
{
offset += (7 * (frequency - 1));
}
calendar.add(Calendar.DAY_OF_YEAR, offset);
}
} | [
"Calculate start dates for a weekly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates"
] | [
"Convert from Hadoop Text to Bytes",
"Simple info message for status\n\n@param tag Message to print out at start of info message",
"Replaces current Collection mapped to key with the specified Collection.\nUse carefully!",
"Search down all extent classes and return max of all found\nPK values.",
"Obtains a local date in Discordian calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Discordian era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Discordian local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code DiscordianEra}",
"Uploads bytes to an open upload session.\n@param data data\n@param offset the byte position where the chunk begins in the file.\n@param partSize the part size returned as part of the upload session instance creation.\nOnly the last chunk can have a lesser value.\n@param totalSizeOfFile The total size of the file being uploaded.\n@return the part instance that contains the part id, offset and part size.",
"Registers the resource to the parent deployment resource. The model returned is that of the resource parameter.\n\n@param subsystemName the subsystem name\n@param resource the resource to be used for the subsystem on the deployment\n\n@return the model\n\n@throws java.lang.IllegalStateException if the subsystem resource already exists",
"Specify the artifact configuration to be searched for\n@param artifact configured artifact object\n@return",
"This method is used to initiate a release staging process using the Artifactory Release Staging API."
] |
public ItemRequest<CustomField> update(String customField) {
String path = String.format("/custom_fields/%s", customField);
return new ItemRequest<CustomField>(this, CustomField.class, path, "PUT");
} | [
"A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged\n\nWhen using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field.\n\nA custom field's `type` cannot be updated.\n\nAn enum custom field's `enum_options` cannot be updated with this endpoint. Instead see \"Work With Enum Options\" for information on how to update `enum_options`.\n\nReturns the complete updated custom field record.\n\n@param customField Globally unique identifier for the custom field.\n@return Request object"
] | [
"Inserts the specified objects at the specified index in the array.\n\n@param items The objects to insert into the array.\n@param index The index at which the object must be inserted.",
"Given a DocumentVersionInfo, returns a BSON document representing the next version. This means\nand incremented version count for a non-empty version, or a fresh version document for an\nempty version.\n@return a BsonDocument representing a synchronization version",
"Sets maintenance mode for the given app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param enable true to enable; false to disable",
"This method is called to format a percentage value.\n\n@param value numeric value\n@return percentage value",
"this method is not intended to be called by clients\n@since 2.12",
"Method used to write the name of the scenarios\n\n@param word\n@return the same word starting with capital letter",
"Get an CollectionDescriptor by name BRJ\n@param name\n@return CollectionDescriptor or null",
"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",
"add a converted object to the pool\n\n@param converter\nthe converter that made the conversion\n@param sourceObject\nthe source object that has been converted\n@param destinationType\nthe destination type\n@param convertedObject\nthe converted object"
] |
public static int hoursDiff(Date earlierDate, Date laterDate) {
if (earlierDate == null || laterDate == null) {
return 0;
}
return (int) ((laterDate.getTime() / HOUR_MILLIS) - (earlierDate.getTime() / HOUR_MILLIS));
} | [
"Get the hours difference"
] | [
"Rotate list of String. Used for randomize selection of received endpoints\n\n@param strings\nlist of Strings\n@return the same list in random order",
"Stop a managed server.",
"Authenticate with the target database using OAuth.\n\n@param consumerSecret consumer secret\n@param consumerKey consumer key\n@param tokenSecret token secret\n@param token token\n@return this Replication instance to set more options\n@deprecated OAuth 1.0 implementation has been <a href=\"http://docs.couchdb.org/en/stable/whatsnew/2.1.html?highlight=oauth#upgrade-notes\"\ntarget=\"_blank\">removed in CouchDB 2.1</a>",
"Returns current selenium version from JAR set in classpath.\n\n@return Version of Selenium.",
"Parses the result and returns the failure description.\n\n@param result the result of executing an operation\n\n@return the failure description if defined, otherwise a new undefined model node\n\n@throws IllegalArgumentException if the outcome of the operation was successful",
"This handler will be triggered when there's no search result",
"Gets the task from in progress map.\n\n@param jobId\nthe job id\n@return the task from in progress map",
"Create an element that represents a horizntal or vertical line.\n@param x1\n@param y1\n@param x2\n@param y2\n@return the created DOM element",
"Instantiates an instance of input Java shader class,\nwhich must be derived from GVRShader or GVRShaderTemplate.\n@param id Java class which implements shaders of this type.\n@param ctx GVRContext shader belongs to\n@return GVRShader subclass which implements this shader type"
] |
public static boolean pullImage(Launcher launcher, final String imageTag, final String username, final String password, final String host)
throws IOException, InterruptedException {
return launcher.getChannel().call(new MasterToSlaveCallable<Boolean, IOException>() {
public Boolean call() throws IOException {
DockerUtils.pullImage(imageTag, username, password, host);
return true;
}
});
} | [
"Execute pull docker image on agent\n\n@param launcher\n@param imageTag\n@param username\n@param password\n@param host\n@return\n@throws IOException\n@throws InterruptedException"
] | [
"Check the variable name and if not set, set it with the singleton variable name being on the top of the stack.",
"Prepare a parallel HTTP GET 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",
"Counts the number of elements in A which are true\n@param A input matrix\n@return number of true elements",
"This method allows nested tasks to be added, with the WBS being\ncompleted automatically.\n\n@return new task",
"Use this API to clear bridgetable.",
"The primary run loop of the event processor.",
"Use this API to fetch snmpuser resource of given name .",
"Closes a Closeable and swallows any exceptions that might occur in the\nprocess.\n\n@param closeable",
"Allows direct access to the Undertow.Builder for custom configuration\n\n@param serverConfigurationFunction the serverConfigurationFunction"
] |
public B importContext(AbstractContext context, boolean overwriteDuplicates){
for (Map.Entry<String, Object> en : context.data.entrySet()) {
if (overwriteDuplicates) {
this.data.put(en.getKey(), en.getValue());
}else{
this.data.putIfAbsent(en.getKey(), en.getValue());
}
}
return (B) this;
} | [
"Apply all attributes on the given context.\n\n@param context the context to be applied, not null.\n@param overwriteDuplicates flag, if existing entries should be overwritten.\n@return this Builder, for chaining"
] | [
"Traverses the test case annotations. Will inject a HiveShell in the test case that envelopes the HiveServer.",
"Returns the text content to any HTML.\n\n@param html the HTML\n\n@return the text content",
"Executes all event manipulating handler and writes the event with persist\nhandler.\n\n@param events the events",
"Given a String the method uses Regex to check if the String only contains punctuation characters\n\n@param s a String to check using regex\n@return true if the String is valid",
"Log a byte array.\n\n@param label label text\n@param data byte array",
"For a given set of calendar data, this method sets the working\nday status for each day, and if present, sets the hours for that\nday.\n\nNOTE: MPP14 defines the concept of working weeks. MPXJ does not\ncurrently support this, and thus we only read the working hours\nfor the default working week.\n\n@param data calendar data block\n@param defaultCalendar calendar to use for default values\n@param cal calendar instance\n@param isBaseCalendar true if this is a base calendar",
"Adds a property to report design, this properties are mostly used by\nexporters to know if any specific configuration is needed\n\n@param name\n@param value\n@return A Dynamic Report Builder",
"seeks to a specified day of the week in the past or future.\n\n@param direction the direction to seek: two possibilities\n'<' go backward\n'>' go forward\n\n@param seekType the type of seek to perform (by_day or by_week)\nby_day means we seek to the very next occurrence of the given day\nby_week means we seek to the first occurrence of the given day week in the\nnext (or previous,) week (or multiple of next or previous week depending\non the seek amount.)\n\n@param seekAmount the amount to seek. Must be guaranteed to parse as an integer\n\n@param dayOfWeek the day of the week to seek to, represented as an integer from\n1 to 7 (1 being Sunday, 7 being Saturday.) Must be guaranteed to parse as an Integer",
"Turns a series of strings into their corresponding license entities\nby using regular expressions\n\n@param licStrings The list of license strings\n@return A set of license entities"
] |
public static DataPersister lookupForField(Field field) {
// see if the any of the registered persisters are valid first
if (registeredPersisters != null) {
for (DataPersister persister : registeredPersisters) {
if (persister.isValidForField(field)) {
return persister;
}
// check the classes instead
for (Class<?> clazz : persister.getAssociatedClasses()) {
if (field.getType() == clazz) {
return persister;
}
}
}
}
// look it up in our built-in map by class
DataPersister dataPersister = builtInMap.get(field.getType().getName());
if (dataPersister != null) {
return dataPersister;
}
/*
* Special case for enum types. We can't put this in the registered persisters because we want people to be able
* to override it.
*/
if (field.getType().isEnum()) {
return DEFAULT_ENUM_PERSISTER;
} else {
/*
* Serializable classes return null here because we don't want them to be automatically configured for
* forwards compatibility with future field types that happen to be Serializable.
*/
return null;
}
} | [
"Lookup the data-type associated with the class.\n\n@return The associated data-type interface or null if none found."
] | [
"Redirect standard streams so that the output can be passed to listeners.",
"Create new logging action\nThis method check if there is an old instance for this thread-local\nIf not - Initialize new instance and set it as this thread-local's instance\n@param logger\n@param auditor\n@param instance\n@return whether new instance was set to thread-local",
"Gets the path used for the results of XSLT Transforms.",
"Start timing an operation with the given identifier.",
"Registers a new site for specific data collection. If null is used as a\nsite key, then all data is collected.\n\n@param siteKey\nthe site to collect geo data for",
"Removes the duplicate node list.\n\n@param list\nthe list\n@return the int",
"test, how many times the group was present in the list of groups.",
"Process any StepEvent. You can change last added to stepStorage\nstep using this method.\n\n@param event to process",
"Checks the id value.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated"
] |
public static base_response unset(nitro_service client, rnatparam resource, String[] args) throws Exception{
rnatparam unsetresource = new rnatparam();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of rnatparam resource.\nProperties that need to be unset are specified in args array."
] | [
"Log a warning message with a throwable.",
"Set an enterprise number value.\n\n@param index number index (1-40)\n@param value number value",
"Read the given number of bytes into a long\n\n@param bytes The byte array to read from\n@param offset The offset at which to begin reading\n@param numBytes The number of bytes to read\n@return The long value read",
"Sets the baseline start text value.\n\n@param baselineNumber baseline number\n@param value baseline start text value",
"Set the repeat type.\n\nIn the default {@linkplain GVRRepeatMode#ONCE run-once} mode, animations\nrun once, ignoring the {@linkplain #getRepeatCount() repeat count.} In\n{@linkplain GVRRepeatMode#PINGPONG ping pong} and\n{@linkplain GVRRepeatMode#REPEATED repeated} modes, animations do honor\nthe repeat count, which {@linkplain #DEFAULT_REPEAT_COUNT defaults} to 2.\n\n@param repeatMode\nOne of the {@link GVRRepeatMode} constants\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgumentException\nIf {@code repetitionType} is not one of the\n{@link GVRRepeatMode} constants",
"Lookup the username for the specified User URL.\n\n@param url\nThe user profile URL\n@return The username\n@throws FlickrException",
"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.",
"Add a \"post-run\" dependent for this model.\n\n@param dependent the \"post-run\" dependent.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependent task group",
"Returns a client model from a ResultSet\n\n@param result resultset containing client information\n@return Client or null\n@throws Exception exception"
] |
public static String format(String format) {
if (format == null) {
format = DEFAULT_FORMAT;
} else {
if (format.contains("M")) {
format = format.replace("M", "m");
}
if (format.contains("Y")) {
format = format.replace("Y", "y");
}
if (format.contains("D")) {
format = format.replace("D", "d");
}
}
return format;
} | [
"Will auto format the given string to provide support for pickadate.js formats."
] | [
"Create a HttpComponents HttpUriRequest object for the given HTTP method and URI specification.\n\n@param httpMethod the HTTP method\n@param uri the URI\n@return the HttpComponents HttpUriRequest object",
"Parses an item id\n\n@param id\nthe identifier of the entity, such as \"Q42\"\n@param siteIri\nthe siteIRI that this value refers to\n@throws IllegalArgumentException\nif the id is invalid",
"Return total number of connections created in all partitions.\n\n@return number of created connections",
"Publish finish events for each of the specified query types\n\n<pre>\n{@code\nRequestEvents.start(\"get\", 1l, bus, \"typeA\", \"custom\");\ntry {\nreturn \"ok\";\n} finally {\nRequestEvents.finish(\"get\", 1l, bus, \"typeA\", \"custom\");\n}\n\n}\n</pre>\n\n\n@param query Completed query\n@param correlationId Identifier\n@param bus EventBus to post events to\n@param types Query types to post to event bus",
"Create a Css Selector Transform",
"Initializes the queue that tracks the next set of nodes with no dependencies or\nwhose dependencies are resolved.",
"converts a java.net.URI into a string representation with empty authority, if absent and has file scheme.",
"Checks the second, hour, month, day, month and year are equal.",
"Attempts to revert the working copy. In case of failure it just logs the error."
] |
void recordOperationPrepareTimeout(final BlockingQueueOperationListener.FailedOperation<ServerOperation> failedOperation) {
recordPreparedTask(new ServerTaskExecutor.ServerPreparedResponse(failedOperation));
// Swap out the submitted task so we don't wait for the final result. Use a future the returns
// prepared response
ServerIdentity identity = failedOperation.getOperation().getIdentity();
AsyncFuture<OperationResponse> finalResult = failedOperation.getFinalResult();
synchronized (submittedTasks) {
submittedTasks.put(identity, new ServerTaskExecutor.ExecutedServerRequest(identity, finalResult));
}
} | [
"Record a prepare operation timeout.\n\n@param failedOperation the prepared operation"
] | [
"Use this API to update nd6ravariables.",
"get string from post stream\n\n@param is\n@param encoding\n@return",
"Join the Collection of Strings using the specified delimter and optionally quoting each\n\n@param s\nThe String collection\n@param delimiter\nthe delimiter String\n@param doQuote\nwhether or not to quote the Strings\n@return The joined String",
"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",
"Write an integer field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Always returns the original proxy object that was serialized.\n\n@return the proxy object\n@throws java.io.ObjectStreamException",
"Scans a set of classes for both ReaderListeners and Swagger annotations. All found listeners will\nbe instantiated before any of the classes are scanned for Swagger annotations - so they can be invoked\naccordingly.\n\n@param classes a set of classes to scan\n@return the generated Swagger definition",
"Function to clear all the metadata related to the given store\ndefinitions. This is needed when a put on 'stores.xml' is called, thus\nreplacing the existing state.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will handle concurrency related issues.\n\n@param storeNamesToDelete",
"This method writes assignment data to a Planner file."
] |
private void processCalendarHours(ProjectCalendar calendar, Record dayRecord)
{
// ... for each day of the week
Day day = Day.getInstance(Integer.parseInt(dayRecord.getField()));
// Get hours
List<Record> recHours = dayRecord.getChildren();
if (recHours.size() == 0)
{
// No data -> not working
calendar.setWorkingDay(day, false);
}
else
{
calendar.setWorkingDay(day, true);
// Read hours
ProjectCalendarHours hours = calendar.addCalendarHours(day);
for (Record recWorkingHours : recHours)
{
addHours(hours, recWorkingHours);
}
}
} | [
"Process hours in a working day.\n\n@param calendar project calendar\n@param dayRecord working day data"
] | [
"Finish the initialization.\n\n@param container\n@param isShutdownHookEnabled",
"Attempts to locate the activity type value extracted from an existing P6 schedule.\nIf necessary converts to the form which can be used in the PMXML file.\nReturns \"Resource Dependent\" as the default value.\n\n@param task parent task\n@return activity type",
"Compares two avro strings which contains multiple store configs\n\n@param configAvro1\n@param configAvro2\n@return true if two config avro strings have same content",
"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",
"Gets the type to use for the Vaadin table column corresponding to the c-th column in this result.\n\n@param c the column index\n@return the class to use for the c-th Vaadin table column",
"Returns a persistence strategy based on the passed configuration.\n\n@param cacheMapping the selected {@link org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType}\n@param externalCacheManager the infinispan cache manager\n@param configurationUrl the location of the configuration file\n@param jtaPlatform the {@link JtaPlatform}\n@param entityTypes the meta-data of the entities\n@param associationTypes the meta-data of the associations\n@param idSourceTypes the meta-data of the id generators\n@return the persistence strategy",
"Marks a given list of statements for insertion into the current document.\nInserted statements can have an id if they should update an existing\nstatement, or use an empty string as id if they should be added. The\nmethod removes duplicates and avoids unnecessary modifications by\nchecking the current content of the given document before marking\nstatements for being written.\n\n@param currentDocument\nthe document with the current statements\n@param addStatements\nthe list of new statements to be added",
"Unmarshals the descriptor content.\n\n@throws CmsXmlException thrown if the XML structure of the descriptor is wrong.\n@throws CmsException thrown if reading the descriptor file fails.",
"Use this API to update appfwlearningsettings resources."
] |
public Object getColumnValue(String columnName) {
for ( int j = 0; j < columnNames.length; j++ ) {
if ( columnNames[j].equals( columnName ) ) {
return columnValues[j];
}
}
return null;
} | [
"Get the value of the specified column.\n\n@param columnName the name of the column\n@return the corresponding value of the column, {@code null} if the column does not exist in the row key"
] | [
"Facade method facilitating the creation of subshell.\nSubshell is created and run inside Command method and shares the same IO and naming strtategy.\n\nRun the obtained Shell with commandLoop().\n\n@param pathElement sub-prompt\n@param parent Shell to be subshell'd\n@param appName The app name string\n@param mainHandler Command handler\n@return subshell",
"The sniffing Loggers are some special Loggers, whose level will be set to TRACE forcedly.\n@param logger",
"Checks the given model.\n\n@param modelDef The model\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"Creates an operation to deploy existing deployment content to the runtime.\n\n@param deployment the deployment to deploy\n\n@return the deploy operation",
"Get distance between geographical coordinates\n@param point1 Point1\n@param point2 Point2\n@return Distance (double)",
"Adds a clause that checks whether ANY set bits in a bitmask are present\nin a numeric expression.\n\n@param expr\nSQL numeric expression to check.\n@param bits\nInteger containing the bits for which to check.",
"Checks that given directory if readable & writable and prints a warning if the check fails. Warning is only\nprinted once and is not repeated until the condition is fixed and broken again.\n\n@param directory deployment directory\n@return does given directory exist and is readable and writable?",
"Loads the SPI backing bean.\n\n@return the instance of MonetaryFormatsSingletonSpi to be used by this singleton.",
"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"
] |
public void deployApplication(String applicationName, String... classpathLocations) throws IOException {
final List<URL> classpathElements = Arrays.stream(classpathLocations)
.map(classpath -> Thread.currentThread().getContextClassLoader().getResource(classpath))
.collect(Collectors.toList());
deployApplication(applicationName, classpathElements.toArray(new URL[classpathElements.size()]));
} | [
"Deploys application reading resources from specified classpath location\n\n@param applicationName to configure in cluster\n@param classpathLocations where resources are read\n@throws IOException"
] | [
"Get an extent aware RsIterator based on the Query\n\n@param query\n@param cld\n@param factory the Factory for the RsIterator\n@return OJBIterator",
"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",
"Method to service public recording APIs\n\n@param op Operation being tracked\n@param timeNS Duration of operation\n@param numEmptyResponses Number of empty responses being sent back,\ni.e.: requested keys for which there were no values (GET and GET_ALL only)\n@param valueSize Size in bytes of the value\n@param keySize Size in bytes of the key\n@param getAllAggregateRequests Total of amount of keys requested in the operation (GET_ALL only)",
"Determine if a job name and job type are valid.\n@param jobName the name of the job\n@param jobType the class of the job\n@throws IllegalArgumentException if the name or type are invalid",
"Remove a DAO from the cache. This is necessary if we've registered it already but it throws an exception during\nconfiguration.",
"Use this API to fetch sslcipher resource of given name .",
"Sets the specified many-to-one attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Returns the given dialect, narrowed down to the given dialect facet in case it is implemented by the dialect.\n\n@param gridDialect the dialect of interest\n@param facetType the dialect facet type of interest\n@return the given dialect, narrowed down to the given dialect facet or {@code null} in case the given dialect\ndoes not implement the given facet",
"Set the menu's width in pixels."
] |
public String addExtent(Properties attributes) throws XDocletException
{
String name = attributes.getProperty(ATTRIBUTE_NAME);
if (!_model.hasClass(name))
{
throw new XDocletException(Translator.getString(XDocletModulesOjbMessages.class,
XDocletModulesOjbMessages.COULD_NOT_FIND_TYPE,
new String[]{name}));
}
_curClassDef.addExtentClass(_model.getClass(name));
return "";
} | [
"Adds an extent relation to the current class definition.\n\n@param attributes The attributes of the tag\n@return An empty string\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"name\" optional=\"false\" description=\"The fully qualified name of the extending\nclass\""
] | [
"Generate the next combination and return an array containing\nthe appropriate elements.\n@see #nextCombinationAsArray(Object[])\n@see #nextCombinationAsList()\n@return An array containing the elements that make up the next combination.",
"Get a System property by its name.\n\n@param name the name of the wanted System property.\n@return the System property value - null if it is not defined.",
"Set work connection.\n\n@param db the db setup bean",
"Parse parameters from this request using HTTP.\n\n@param req The ServletRequest containing all request parameters.\n@param cms The OpenCms object.\n@return CmsSpellcheckingRequest object that contains parsed parameters.",
"Use this API to add nsip6 resources.",
"Given a list of partition plans and a set of stores, copies the store\nnames to every individual plan and creates a new list\n\n@param existingPlanList Existing partition plan list\n@param storeDefs List of store names we are rebalancing\n@return List of updated partition plan",
"Constructs a new ClientBuilder for building a CloudantClient instance to connect to the\nCloudant server with the specified account.\n\n@param account the Cloudant account name to connect to e.g. \"example\" is the account name\nfor the \"example.cloudant.com\" endpoint\n@return a new ClientBuilder for the account\n@throws IllegalArgumentException if the specified account name forms an invalid endpoint URL",
"Load a cube map texture asynchronously.\n\nThis is the implementation of\n{@link GVRAssetLoader#loadCubemapTexture(GVRAndroidResource)} - it will\nusually be more convenient (and more efficient) to call that directly.\n\n@param gvrContext\nThe GVRF context\n@param textureCache\nTexture cache - may be {@code null}\n@param resource\nA steam containing a zip file which contains six bitmaps. The\nsix bitmaps correspond to +x, -x, +y, -y, +z, and -z faces of\nthe cube map texture respectively. The default names of the\nsix images are \"posx.png\", \"negx.png\", \"posy.png\", \"negx.png\",\n\"posz.png\", and \"negz.png\", which can be changed by calling\n{@link GVRCubemapImage#setFaceNames(String[])}.\n@param priority\nThis request's priority. Please see the notes on asynchronous\npriorities in the <a href=\"package-summary.html#async\">package\ndescription</a>.\n@return A {@link Future} that you can pass to methods like\n{@link GVRShaderData#setMainTexture(Future)}",
"Unchecks 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 unchecked; {@code false} otherwise."
] |
public final void printClientConfig(final JSONWriter json) throws JSONException {
json.key("layouts");
json.array();
final Map<String, Template> accessibleTemplates = getTemplates();
accessibleTemplates.entrySet().stream().sorted(Comparator.comparing(Map.Entry::getKey))
.forEach(entry -> {
json.object();
json.key("name").value(entry.getKey());
entry.getValue().printClientConfig(json);
json.endObject();
});
json.endArray();
json.key("smtp").object();
json.key("enabled").value(smtp != null);
if (smtp != null) {
json.key("storage").object();
json.key("enabled").value(smtp.getStorage() != null);
json.endObject();
}
json.endObject();
} | [
"Print out the configuration that the client needs to make a request.\n\n@param json the output writer.\n@throws JSONException"
] | [
"Determines whether or not two axially aligned bounding boxes in\nthe same coordinate space intersect.\n@param bv1 first bounding volume to test.\n@param bv2 second bounding volume to test.\n@return true if the boxes intersect, false if not.",
"Use this API to delete linkset of given name.",
"Derive a calendar for a resource.\n\n@param parentCalendarID calendar from which resource calendar is derived\n@return new calendar for a resource",
"Disable certificate verification.\n\n@throws KeyManagementException\nthe key management exception\n@throws NoSuchAlgorithmException\nthe no such algorithm exception",
"Lookup the username for the specified User URL.\n\n@param url\nThe user profile URL\n@return The username\n@throws FlickrException",
"Returns the yield value such that the sum of cash flows of the bond discounted with the yield curve\ncoincides with a given price.\n\n@param bondPrice The target price as double.\n@param model The model under which the product is valued.\n@return The optimal yield value.",
"Get a compatible constructor\n\n@param type\nClass to look for constructor in\n@param argumentType\nArgument type for constructor\n@return the compatible constructor or null if none found",
"Update an existing feature. Made package private for testing purposes.\n\n@param feature feature to update\n@throws LayerException oops",
"Support the range subscript operator for GString\n\n@param text a GString\n@param range a Range\n@return the String of characters corresponding to the provided range\n@since 2.3.7"
] |
public static void main(String[] args) throws IOException, ClassNotFoundException {
CoNLLDocumentReaderAndWriter f = new CoNLLDocumentReaderAndWriter();
f.init(new SeqClassifierFlags());
int numDocs = 0;
int numTokens = 0;
int numEntities = 0;
String lastAnsBase = "";
for (Iterator<List<CoreLabel>> it = f.getIterator(new FileReader(args[0])); it.hasNext(); ) {
List<CoreLabel> doc = it.next();
numDocs++;
for (CoreLabel fl : doc) {
// System.out.println("FL " + (++i) + " was " + fl);
if (fl.word().equals(BOUNDARY)) {
continue;
}
String ans = fl.get(AnswerAnnotation.class);
String ansBase;
String ansPrefix;
String[] bits = ans.split("-");
if (bits.length == 1) {
ansBase = bits[0];
ansPrefix = "";
} else {
ansBase = bits[1];
ansPrefix = bits[0];
}
numTokens++;
if (ansBase.equals("O")) {
} else if (ansBase.equals(lastAnsBase)) {
if (ansPrefix.equals("B")) {
numEntities++;
}
} else {
numEntities++;
}
}
}
System.out.println("File " + args[0] + " has " + numDocs + " documents, " +
numTokens + " (non-blank line) tokens and " +
numEntities + " entities.");
} | [
"Count some stats on what occurs in a file."
] | [
"AND operation which takes the previous clause and the next clause and AND's them together.",
"Creates the project used to import module resources and sets it on the CmsObject.\n\n@param cms the CmsObject to set the project on\n@param module the module\n@return the created project\n@throws CmsException if something goes wrong",
"Get an integer property override value.\n@param name the {@link CircuitBreaker} name.\n@param key the property override key.\n@return the property override value, or null if it is not found.",
"Set a range of the colormap to a single color.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color the color",
"create a broker with given broker info\n\n@param id broker id\n@param brokerInfoString broker info format: <b>creatorId:host:port:autocreated</b>\n@return broker instance with connection config\n@see #getZKString()",
"Adds a new step to the list of steps.\n\n@param name Name of the step to add.\n@param robot The name of the robot ot use with the step.\n@param options extra options required for the step.",
"Reads filter parameters.\n\n@param params the params\n@return the criterias",
"Convenience method that returns the attribute value for the specified attribute name.\n\n@param attributeName the name of the attribute\n@return the value of the attribute or null if no such attribute exists\n@since 1.9.0",
"Wait for exclusive permit during a timeout in milliseconds.\n\n@return number of acquired permits if > 0"
] |
@SuppressWarnings("unchecked")
public Map<BsonValue, ChangeEvent<BsonDocument>> getEvents() {
nsLock.readLock().lock();
final Map<BsonValue, ChangeEvent<BsonDocument>> events;
try {
events = new HashMap<>(this.events);
} finally {
nsLock.readLock().unlock();
}
nsLock.writeLock().lock();
try {
this.events.clear();
return events;
} finally {
nsLock.writeLock().unlock();
}
} | [
"Returns the latest change events, and clears them from the change stream listener.\n\n@return the latest change events."
] | [
"Create a Css Selector Transform",
"Use this API to fetch statistics of nslimitidentifier_stats resource of given name .",
"Allows testsuites to shorten the domain timeout adder",
"Returns all base types.\n\n@return An iterator of the base types",
"Use this API to unset the properties of gslbsite resource.\nProperties that need to be unset are specified in args array.",
"Retrieves and validates the content length from the REST request.\n\n@return true if has content length",
"Deletes a redirect by id\n\n@param id redirect ID",
"Iterates through the given CharSequence line by line, splitting each line using\nthe given separator Pattern. The list of tokens for each line is then passed to\nthe given closure.\n\n@param self a CharSequence\n@param pattern the regular expression Pattern for the delimiter\n@param closure a closure\n@return the last value returned by the closure\n@throws java.io.IOException if an error occurs\n@since 1.8.2",
"Converts a vector from sample space into eigen space.\n\n@param sampleData Sample space data.\n@return Eigen space projection."
] |
public static InetAddress getLocalHost() throws UnknownHostException {
InetAddress addr;
try {
addr = InetAddress.getLocalHost();
} catch (ArrayIndexOutOfBoundsException e) { //this is workaround for mac osx bug see AS7-3223 and JGRP-1404
addr = InetAddress.getByName(null);
}
return addr;
} | [
"Methods returns InetAddress for localhost\n\n@return InetAddress of the localhost\n@throws UnknownHostException if localhost could not be resolved"
] | [
"The user to remove can be referenced by their globally unique user ID or their email address.\nRemoves the user from the specified team. Returns an empty data record.\n\n@param team Globally unique identifier for the team.\n@return Request object",
"Generates a torque schema for the model.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\"",
"Get the property of the given object.\n\n@param object which to be got\n@return the property of the given object\n@throws RuntimeException if the property could not be evaluated",
"Get the subsystem deployment model root.\n\n<p>\nIf the subsystem resource does not exist one will be created.\n</p>\n\n@param subsystemName the subsystem name.\n\n@return the model",
"Read a single calendar exception.\n\n@param bc parent calendar\n@param exception exception data",
"Login for a specific authentication, creating a specific token if given.\n\n@param token token to use\n@param authentication authentication to assign to token\n@return token",
"This method writes project extended attribute data into an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Parse representations from a file object response.\n@param jsonObject representations json object in get response for /files/file-id?fields=representations\n@return list of representations",
"Start listening for device announcements and keeping track of the DJ Link devices visible on the network.\nIf already listening, has no effect.\n\n@throws SocketException if the socket to listen on port 50000 cannot be created"
] |
protected void onNewParentObject(GVRSceneObject parent) {
for (GVRComponent comp : mComponents.values()) {
comp.onNewOwnersParent(parent);
}
} | [
"Called when the scene object gets a new parent.\n\n@param parent New parent of this scene object."
] | [
"Adds all pairs from 'fromMap' to 'toMap' excluding once that matching the pattern",
"Removes the specified object in index from the array.\n\n@param index The index to remove.",
"Extract and return the table name for a class.",
"Evict cached object\n\n@param key\nthe key indexed the cached object to be evicted",
"End building the script\n@param config the configuration for the script to build\n@return the new {@link LuaScript} instance",
"Gets fully-qualified name of a table or sequence.\n\n@param localName local table name.\n@param params params.\n@return fully-qualified table name.",
"Use this API to fetch vpnsessionaction resource of given name .",
"Use this API to fetch all the sslcertlink resources that are configured on netscaler.",
"Add query part for the facet, without filters.\n@param query The query part that is extended for the facet"
] |
public static void convolveHV(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, int edgeAction) {
int index = 0;
float[] matrix = kernel.getKernelData( null );
int rows = kernel.getHeight();
int cols = kernel.getWidth();
int rows2 = rows/2;
int cols2 = cols/2;
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
float r = 0, g = 0, b = 0, a = 0;
for (int row = -rows2; row <= rows2; row++) {
int iy = y+row;
int ioffset;
if (0 <= iy && iy < height)
ioffset = iy*width;
else if ( edgeAction == CLAMP_EDGES )
ioffset = y*width;
else if ( edgeAction == WRAP_EDGES )
ioffset = ((iy+height) % height) * width;
else
continue;
int moffset = cols*(row+rows2)+cols2;
for (int col = -cols2; col <= cols2; col++) {
float f = matrix[moffset+col];
if (f != 0) {
int ix = x+col;
if (!(0 <= ix && ix < width)) {
if ( edgeAction == CLAMP_EDGES )
ix = x;
else if ( edgeAction == WRAP_EDGES )
ix = (x+width) % width;
else
continue;
}
int rgb = inPixels[ioffset+ix];
a += f * ((rgb >> 24) & 0xff);
r += f * ((rgb >> 16) & 0xff);
g += f * ((rgb >> 8) & 0xff);
b += f * (rgb & 0xff);
}
}
}
int ia = alpha ? PixelUtils.clamp((int)(a+0.5)) : 0xff;
int ir = PixelUtils.clamp((int)(r+0.5));
int ig = PixelUtils.clamp((int)(g+0.5));
int ib = PixelUtils.clamp((int)(b+0.5));
outPixels[index++] = (ia << 24) | (ir << 16) | (ig << 8) | ib;
}
}
} | [
"Convolve with a 2D kernel.\n@param kernel the kernel\n@param inPixels the input pixels\n@param outPixels the output pixels\n@param width the width\n@param height the height\n@param alpha include alpha channel\n@param edgeAction what to do at the edges"
] | [
"Runs the given xpath and returns a boolean result.",
"1-D Gabor function.\n\n@param x Value.\n@param mean Mean.\n@param amplitude Amplitude.\n@param position Position.\n@param width Width.\n@param phase Phase.\n@param frequency Frequency.\n@return Gabor response.",
"Extracts the column from a matrix.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column.",
"Returns the rank of the decomposed matrix.\n\n@see SingularOps_DDRM#rank(SingularValueDecomposition_F64, double)\n\n@return The matrix's rank",
"Use this API to update dbdbprofile.",
"Populates a calendar exception instance.\n\n@param record MPX record\n@param calendar calendar to which the exception will be added\n@throws MPXJException",
"Returns the classDescriptor.\n\n@return ClassDescriptor",
"Add a module.\n\n@param moduleName the module name\n@param slot the module slot\n@param newHash the new hash of the added content\n@return the builder",
"Retrieve a UUID in the form required by Primavera PMXML.\n\n@param guid UUID instance\n@return formatted UUID"
] |
public Model interpolateModel(Model model, File projectDir, ModelBuildingRequest config,
ModelProblemCollector problems) {
interpolateObject(model, model, projectDir, config, problems);
return model;
} | [
"Empirical data from 3.x, actual =40"
] | [
"Merges this with the list of sections to produce the smallest array of sequential block subnets, going from smallest to largest\n\n@param sections the sections to merge with this\n@return",
"Search for rectangles which have the same width and x position, and\nwhich join together vertically and merge them together to reduce the\nnumber of rectangles needed to describe a symbol.",
"given the groupName, it returns the groupId\n\n@param groupName name of group\n@return ID of group",
"Sets the replace var map to single target.\n\n@param replacementVarMapList\nthe replacement var map list\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder",
"This method is used by JNI, do not call or modify.\n\n@param type the type\n@param number the number",
"Sets the name of the attribute group with which this attribute is associated.\n\n@param attributeGroup the attribute group name. Cannot be an empty string but can be {@code null}\nif the attribute is not associated with a group.\n@return a builder that can be used to continue building the attribute definition",
"Calculates the legend bounds for a custom list of legends.",
"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",
"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"
] |
static Project convert(
String name, com.linecorp.centraldogma.server.storage.project.Project project) {
return new Project(name);
} | [
"The parameter 'project' is not used at the moment, but will be used once schema and plugin support lands."
] | [
"Locate a child block by byte pattern and validate by\nchecking the length of the string we are expecting\nto follow the pattern.\n\n@param bufferIndex start index\n@return true if a child block starts at this point",
"Plots the MSD curve with the trajectory t and adds the fitted model for anomalous diffusion above.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param a Exponent alpha of power law function\n@param D Diffusion coeffcient",
"Returns an array of the names of all atributes of this descriptor.\n\n@return The list of attribute names (will not be <code>null</code>)",
"Checks to see if a handler is disabled\n\n@param handlerName the name of the handler to enable.",
"Use this API to fetch transformpolicy resource of given name .",
"Checks if the given group of statements contains the given value as the\nvalue of a main snak of some statement.\n\n@param statementGroup\nthe statement group to scan\n@param value\nthe value to scan for\n@return true if value was found",
"Get a list of people in a given photo.\n\n@param photoId\n@throws FlickrException",
"Adds one statement to the list of statements to be kept, possibly merging\nit with other statements to be kept if possible. When two existing\nstatements are merged, one of them will be updated and the other will be\nmarked for deletion.\n\n@param statement\nstatement to add\n@param isNew\nif true, the statement should be marked for writing; if false,\nthe statement already exists in the current data and is only\nadded to remove duplicates and avoid unnecessary writes",
"The only properties added to a relationship are the columns representing the index of the association."
] |
public URL getDownloadURL() {
URL url = CONTENT_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
request.setFollowRedirects(false);
BoxRedirectResponse response = (BoxRedirectResponse) request.send();
return response.getRedirectURL();
} | [
"Gets an expiring URL for downloading a file directly from Box. This can be user,\nfor example, for sending as a redirect to a browser to cause the browser\nto download the file directly from Box.\n\n@return the temporary download URL"
] | [
"Return the map bounds rotated with the set rotation. The bounds are adapted to rounding changes of the\nsize of the paint area.\n\n@param paintAreaPrecise The exact size of the paint area.\n@param paintArea The rounded size of the paint area.\n@return Rotated bounds.",
"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",
"characters callback.",
"Use this API to fetch statistics of cmppolicy_stats resource of given name .",
"Performs a request against a Stitch app server determined by the deployment model\nof the underlying app. Throws a Stitch specific exception if the request fails.\n\n@param stitchReq the request to perform.\n@return a {@link Response} to the request.",
"Sets the drawable used as the drawer indicator.\n\n@param drawable The drawable used as the drawer indicator.",
"Start timing an operation with the given identifier.",
"Displays text which shows the valid command line parameters, and then exits.",
"Returns the connection count in this registry.\n\nNote it might count connections that are closed but not removed from registry yet\n\n@return the connection count"
] |
public static Class<?> loadClass(String classname, DataFormat<?> dataFormat) {
// first try context classoader
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if(cl != null) {
LOG.tryLoadingClass(classname, cl);
try {
return cl.loadClass(classname);
}
catch(Exception e) {
// ignore
}
}
// else try the classloader which loaded the dataformat
cl = dataFormat.getClass().getClassLoader();
try {
LOG.tryLoadingClass(classname, cl);
return cl.loadClass(classname);
}
catch (ClassNotFoundException e) {
throw LOG.classNotFound(classname, e);
}
} | [
"Used by dataformats if they need to load a class\n\n@param classname the name of the\n@param dataFormat\n@return"
] | [
"Adds one statement to the list of statements to be kept, possibly merging\nit with other statements to be kept if possible. When two existing\nstatements are merged, one of them will be updated and the other will be\nmarked for deletion.\n\n@param statement\nstatement to add\n@param isNew\nif true, the statement should be marked for writing; if false,\nthe statement already exists in the current data and is only\nadded to remove duplicates and avoid unnecessary writes",
"Internal method used to locate an remove an item from a list Relations.\n\n@param relationList list of Relation instances\n@param targetTask target relationship task\n@param type target relationship type\n@param lag target relationship lag\n@return true if a relationship was removed",
"A simple convinience function that decomposes the matrix but automatically checks the input ti make\nsure is not being modified.\n\n@param decomp Decomposition which is being wrapped\n@param M THe matrix being decomposed.\n@param <T> Matrix type.\n@return If the decomposition was successful or not.",
"Verify store definitions are congruent with cluster definition.\n\n@param cluster\n@param storeDefs",
"Create a Vendor from a Callable",
"Gets the data handler from event.\n\n@param event the event\n@return the data handler",
"Creates an association row representing the given entry and adds it to the association managed by the given\npersister.",
"Gets the Hamming distance between two strings.\n\n@param first First string.\n@param second Second string.\n@return The Hamming distance between p and q.",
"Writes image files for all data that was collected and the statistics\nfile for all sites."
] |
public static boolean isRowsLinearIndependent( DMatrixRMaj A )
{
// LU decomposition
LUDecomposition<DMatrixRMaj> lu = DecompositionFactory_DDRM.lu(A.numRows,A.numCols);
if( lu.inputModified() )
A = A.copy();
if( !lu.decompose(A))
throw new RuntimeException("Decompositon failed?");
// if they are linearly independent it should not be singular
return !lu.isSingular();
} | [
"Checks to see if the rows of the provided matrix are linearly independent.\n\n@param A Matrix whose rows are being tested for linear independence.\n@return true if linearly independent and false otherwise."
] | [
"Sets the specified date attribute to the specified value.\n\n@param name name of the attribute\n@param value value of the attribute\n@since 1.9.0",
"Use this API to add cachepolicylabel resources.",
"Use this API to fetch all the responderpolicy resources that are configured on netscaler.",
"Called just before the thread finishes, regardless of status, to take any necessary action on\nthe downloaded file with mDownloadedCacheSize file.\n\n@param forceClean - It will delete downloaded cache, Even streaming is enabled, If user intentionally cancelled.",
"For creating expression columns\n@return",
"Returns the precedence of the specified operator. Non-operator's will\nreceive -1 or a GroovyBugError, depending on your preference.",
"Returns the number of days from the given weekday to the next weekday the event should occur.\n@param weekDay the current weekday.\n@return the number of days to the next weekday an event could occur.",
"Prepares all files added for tus uploads.\n\n@param assemblyUrl the assembly url affiliated with the tus upload.\n@throws IOException when there's a failure with file retrieval.\n@throws ProtocolException when there's a failure with tus upload.",
"Main file parser. Reads GIF content blocks. Stops after reading maxFrames"
] |
public static base_response add(nitro_service client, dnssuffix resource) throws Exception {
dnssuffix addresource = new dnssuffix();
addresource.Dnssuffix = resource.Dnssuffix;
return addresource.add_resource(client);
} | [
"Use this API to add dnssuffix."
] | [
"Use this API to add vlan.",
"Copy the contents of this buffer begginning from the srcOffset to a destination byte array\n@param srcOffset\n@param destArray\n@param destOffset\n@param size",
"Updates the template with the specified id.\n\n@param id id of the template to update\n@param options a Map of options to update/add.\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 appfwwsdl resource of given name .",
"Remove all of the audio sources from the audio manager.\nThis will stop all sound from playing.",
"Retrieve the start slack.\n\n@return start slack",
"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.",
"Returns the ReportModel with given name.",
"Add raw SQL \"ORDER BY\" clause to the SQL query statement.\n\n@param rawSql\nThe raw SQL order by clause. This should not include the \"ORDER BY\"."
] |
public static int getId(Context context, String id) {
final String defType;
if (id.startsWith("R.")) {
int dot = id.indexOf('.', 2);
defType = id.substring(2, dot);
} else {
defType = "drawable";
}
Log.d(TAG, "getId(): id: %s, extracted type: %s", id, defType);
return getId(context, id, defType);
} | [
"Parses the resource String id and get back the int res id\n@param context\n@param id String resource id\n@return int resource id"
] | [
"Build a valid datastore URL.",
"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",
"Analyzes a failure thrown connecting to the master for causes that indicate\nsome problem not likely to be resolved by immediately retrying. If found,\nthrows an exception highlighting the underlying cause. If the cause is not\none of the ones understood by this method, the method returns normally.\n\n@throws org.jboss.as.domain.controller.SlaveRegistrationException if the remote HC rejected the request\n@throws IllegalStateException for other failures understood by this method",
"Plots the MSD curve for trajectory t.\n@param t List of trajectories\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",
"Discard the changes.",
"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",
"Loads the rules from files in the class loader, often jar files.\n\n@return the list of loaded rules, not null\n@throws Exception if an error occurs",
"Gets the Json Array representation of the given list of strings.\n@param keys List of strings\n@return the JsonArray represents the list of keys",
"Finds or creates a ResourceStorageLoadable for the given resource.\nClients should first call shouldLoadFromStorage to check whether there exists a storage version\nof the given resource.\n\n@return an IResourceStorageLoadable"
] |
private AssignmentField selectField(AssignmentField[] fields, int index)
{
if (index < 1 || index > fields.length)
{
throw new IllegalArgumentException(index + " is not a valid field index");
}
return (fields[index - 1]);
} | [
"Maps a field index to an AssignmentField instance.\n\n@param fields array of fields used as the basis for the mapping.\n@param index required field index\n@return AssignmnetField instance"
] | [
"This method writes resource data to a JSON file.",
"Returns the y-coordinate of a vertex tangent.\n\n@param vertex the vertex index\n@return the y coordinate",
"Get the spatial object from the cache.\n\n@param key key to get object for\n@param type type of object which should be returned\n@return object for key or null if object does not exist or is a different type",
"Use this API to clear route6.",
"Log an audit record of this operation.",
"Converts the text stream data to HTML form.\n\n@param content the content to convert\n@return the HTML version of the content",
"Use this API to add nsacl6 resources.",
"Initializes context size.\n\n@param rectangle rectangle",
"Creates a status instance from the given serviceReferences.\nThe given list is copied to a new set made immutable.\n\n@param serviceReferencesBound the set of ServiceReference which are bound to the declaration.\n@param serviceReferencesHandled the set of ServiceReference which are handling the declaration.\n@return the new instance of status"
] |
private void handleUpdate(final int player) {
final TrackMetadata metadata = MetadataFinder.getInstance().getLatestMetadataFor(player);
final WaveformDetail waveformDetail = WaveformFinder.getInstance().getLatestDetailFor(player);
final BeatGrid beatGrid = BeatGridFinder.getInstance().getLatestBeatGridFor(player);
if (metadata != null && waveformDetail != null && beatGrid != null) {
final String signature = computeTrackSignature(metadata.getTitle(), metadata.getArtist(),
metadata.getDuration(), waveformDetail, beatGrid);
if (signature != null) {
signatures.put(player, signature);
deliverSignatureUpdate(player, signature);
}
}
} | [
"We have reason to believe we might have enough information to calculate a signature for the track loaded on a\nplayer. Verify that, and if so, perform the computation and record and report the new signature."
] | [
"Given a list of store definitions, find out and return a map of similar\nstore definitions + count of them\n\n@param storeDefs All store definitions\n@return Map of a unique store definition + counts",
"Callback for constant meta class update change",
"Override for customizing XmlMapper and ObjectMapper",
"Checks if provided class package is on the exclude list\n\n@param classPackageName\nname of class package\n@return false if class package is on the {@link #excludePackages} list",
"Deletes the disabled marker file in the directory of the specified version.\n\n@param version to enable\n@throws PersistenceFailureException if the marker file could not be deleted (can happen if\nthe storage system has become read-only or is otherwise\ninaccessible).",
"Use this API to update dbdbprofile.",
"Use this API to fetch all the filterhtmlinjectionparameter resources that are configured on netscaler.",
"Multiplies all positions with a factor v\n@param v Multiplication factor",
"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"
] |
public void checkpoint(ObjectEnvelope mod) throws PersistenceBrokerException
{
mod.doInsert();
mod.setModificationState(StateOldClean.getInstance());
} | [
"checkpoint the ObjectModification"
] | [
"To be called at node startup - it purges all job instances associated to this node.\n\n@param cnx\n@param node",
"Copy the given Collection into a Class array.\nThe Collection must contain Class elements only.\n@param collection the Collection to copy\n@return the Class array ({@code null} if the passed-in\nCollection was {@code null})",
"Returns true if the default profile for the specified uuid is active\n\n@return true if active, otherwise false",
"return request is success by JsonRtn object\n\n@param jsonRtn\n@return",
"A convenience method for creating an immutable list.\n\n@param self a Set\n@return an immutable Set\n@see java.util.Collections#unmodifiableSet(java.util.Set)\n@since 1.0",
"For running queries embebed in the report design\n\n@param dr\n@param layoutManager\n@param con\n@param _parameters\n@return\n@throws JRException",
"Convenience method for retrieving a char resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value",
"generate a prepared SELECT-Statement for the Class\ndescribed by cld\n@param cld the ClassDescriptor",
"Create a text message that will be stored in the database. Must be called inside a transaction."
] |
private List<String> parseRssFeedForeCast(String feed) {
String[] result = feed.split("<br />");
List<String> returnList = new ArrayList<String>();
String[] result2 = result[2].split("<BR />");
returnList.add(result2[3] + "\n");
returnList.add(result[3] + "\n");
returnList.add(result[4] + "\n");
returnList.add(result[5] + "\n");
returnList.add(result[6] + "\n");
return returnList;
} | [
"Parser for forecast\n\n@param feed\n@return"
] | [
"Check if number is valid\n\n@return boolean",
"Configures a RequestBuilder to send an RPC request.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@param callback callback handler\n\n@return a RequestBuilder object that is ready to have its\n{@link RequestBuilder#send()} method invoked.",
"Retrieve a single value property.\n\n@param method method definition\n@param object target object\n@param map parameter values",
"Get top deployment unit.\n\n@param unit the current deployment unit\n@return top deployment unit",
"Returns the master mode's editor state for editing a bundle with descriptor.\n@return the master mode's editor state for editing a bundle with descriptor.",
"returns a sorted array of nested classes and interfaces",
"The normalized string returned by this method is consistent with java.net.Inet6address.\n\nIPs are not compressed nor mixed in this representation. If this has a prefix length, that will be included in the string.",
"Print a percent complete value.\n\n@param value Double instance\n@return percent complete value",
"Use this API to update systemuser."
] |
public static base_response update(nitro_service client, transformpolicy resource) throws Exception {
transformpolicy updateresource = new transformpolicy();
updateresource.name = resource.name;
updateresource.rule = resource.rule;
updateresource.profilename = resource.profilename;
updateresource.comment = resource.comment;
updateresource.logaction = resource.logaction;
return updateresource.update_resource(client);
} | [
"Use this API to update transformpolicy."
] | [
"Serialize a parameterized object to a JSON String.\n\n@param object The object to serialize.\n@param parameterizedType The ParameterizedType describing the object. Ex: LoganSquare.serialize(object, new ParameterizedType<MyModel<OtherModel>>() { });",
"Update properties for a specific client id\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@param active - true false depending on if the client should be active\n@param reset - true to reset the state of a client(clears settings for all paths and disables the client)\n@return\n@throws Exception",
"Use this API to fetch vpnsessionaction resource of given name .",
"Log original incoming request\n\n@param requestType\n@param request\n@param history",
"Convert a layer type to a geometry class.\n\n@param layerType\nlayer type\n@return JTS class",
"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",
"Generates new individual particle radius based on min and max radius setting.\n\n@return new particle radius",
"Returns the compact records for all users that are members of the team.\n\n@param team Globally unique identifier for the team.\n@return Request object",
"Adds an extent relation to the current class definition.\n\n@param attributes The attributes of the tag\n@return An empty string\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"name\" optional=\"false\" description=\"The fully qualified name of the extending\nclass\""
] |
public static appqoepolicy[] get(nitro_service service) throws Exception{
appqoepolicy obj = new appqoepolicy();
appqoepolicy[] response = (appqoepolicy[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the appqoepolicy resources that are configured on netscaler."
] | [
"Start a server.\n\n@return the http server\n@throws Exception the exception",
"<<<<<< measureUntilFull helper methods",
"Destroys an instance of the bean\n\n@param instance The instance",
"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.",
"for testing purpose",
"Parse a macro defintion.\n\n\"macro NAME( var0 , var1 ) = 5+var0+var1'",
"Pass a model object and return a SoyMapData if a model object happens\nto be a SoyMapData.\n\nAn implementation will also check if a passed in object is a Map and return\na SoyMapData wrapping that map",
"Returns the bundle jar classpath element.",
"Add the string representation of the given object to this sequence immediately. That is, all the trailing\nwhitespace of this sequence will be ignored and the string is appended directly after the last segment that\ncontains something besides whitespace. The given indentation will be prepended to each line except the first one\nif the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>."
] |
public ThumborUrlBuilder trim(TrimPixelColor value, int colorTolerance) {
if (colorTolerance < 0 || colorTolerance > 442) {
throw new IllegalArgumentException("Color tolerance must be between 0 and 442.");
}
if (colorTolerance > 0 && value == null) {
throw new IllegalArgumentException("Trim pixel color value must not be null.");
}
isTrim = true;
trimPixelColor = value;
trimColorTolerance = colorTolerance;
return this;
} | [
"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."
] | [
"Add a date with a certain check state.\n@param date the date to add.\n@param checkState the check state.",
"Returns an integer array that contains the default values for all the\ntexture parameters.\n\n@return an integer array that contains the default values for all the\ntexture parameters.",
"Sets the HTML entity translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator",
"Get CorrelationId from message.\n\n@param message the message\n@return correlationId or null if not set",
"Generate JSON format as result of the scan.\n\n@since 1.2",
"Used to create a new indefinite retention policy.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@return the created retention policy's info.",
"Execute pull docker image on agent\n\n@param launcher\n@param imageTag\n@param username\n@param password\n@param host\n@return\n@throws IOException\n@throws InterruptedException",
"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",
"Use this API to fetch filtered set of sslcipher_individualcipher_binding resources.\nset the filter parameter values in filtervalue object."
] |
protected void registerUnregisterJMX(boolean doRegister) {
if (this.mbs == null ){ // this way makes it easier for mocking.
this.mbs = ManagementFactory.getPlatformMBeanServer();
}
try {
String suffix = "";
if (this.config.getPoolName()!=null){
suffix="-"+this.config.getPoolName();
}
ObjectName name = new ObjectName(MBEAN_BONECP +suffix);
ObjectName configname = new ObjectName(MBEAN_CONFIG + suffix);
if (doRegister){
if (!this.mbs.isRegistered(name)){
this.mbs.registerMBean(this.statistics, name);
}
if (!this.mbs.isRegistered(configname)){
this.mbs.registerMBean(this.config, configname);
}
} else {
if (this.mbs.isRegistered(name)){
this.mbs.unregisterMBean(name);
}
if (this.mbs.isRegistered(configname)){
this.mbs.unregisterMBean(configname);
}
}
} catch (Exception e) {
logger.error("Unable to start/stop JMX", e);
}
} | [
"Initialises JMX stuff.\n@param doRegister if true, perform registration, if false unregister"
] | [
"The normalized string returned by this method is consistent with java.net.Inet6address.\nIPs are not compressed nor mixed in this representation.",
"Remove a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@return the builder",
"Get a list of referring domains for a collection.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param collectionId\n(Optional) The id of the collection to get stats for. If not provided, stats for all collections will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionDomains.html\"",
"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",
"Return true if the DeclarationExpression represents a 'final' variable declaration.\n\nNOTE: THIS IS A WORKAROUND.\n\nThere does not seem to be an easy way to determine whether the 'final' modifier has been\nspecified for a variable declaration. Return true if the 'final' is present before the variable name.",
"2-D Gaussian function.\n\n@param x value.\n@param y value.\n@return Function's value at point (x,y).",
"Use this API to delete nsacl6 of given name.",
"Merge this ExecutionStatistics with all the statistics created within the child threads. All the child threads had to be created using Windup-specific\nThreadFactory in order to contain a reference to the parent thread.",
"Must be called before any other functions. Declares and sets up internal data structures.\n\n@param numSamples Number of samples that will be processed.\n@param sampleSize Number of elements in each sample."
] |
public static int cudnnPoolingBackward(
cudnnHandle handle,
cudnnPoolingDescriptor poolingDesc,
Pointer alpha,
cudnnTensorDescriptor yDesc,
Pointer y,
cudnnTensorDescriptor dyDesc,
Pointer dy,
cudnnTensorDescriptor xDesc,
Pointer x,
Pointer beta,
cudnnTensorDescriptor dxDesc,
Pointer dx)
{
return checkResult(cudnnPoolingBackwardNative(handle, poolingDesc, alpha, yDesc, y, dyDesc, dy, xDesc, x, beta, dxDesc, dx));
} | [
"Function to perform backward pooling"
] | [
"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",
"Load the given class using a specific class loader.\n\n@param className The name of the class\n@param cl The Class Loader to be used for finding the class.\n@return The class object",
"Returns the ReportModel with given name.",
"Get the group URL for the specified group ID\n\n@param groupId\nThe group ID\n@return The group URL\n@throws FlickrException",
"Confirms that both clusters have the same number of total partitions.\n\n@param lhs\n@param rhs",
"Print an earned value method.\n\n@param value EarnedValueMethod instance\n@return earned value method value",
"Writes no-value restriction.\n\n@param rdfWriter\nthe writer to write the restrictions to\n@param propertyUri\nURI of the property to which the restriction applies\n@param rangeUri\nURI of the class or datatype to which the restriction applies\n@param subject\nnode representing the restriction\n@throws RDFHandlerException\nif there was a problem writing the RDF triples",
"Prepare our statement for the subclasses.\n\n@param limit\nLimit for queries. Can be null if none.",
"Main entry point used to determine the format used to write\ncalendar exceptions.\n\n@param calendar parent calendar\n@param dayList list of calendar days\n@param exceptions list of exceptions"
] |
public ItemRequest<Project> addFollowers(String project) {
String path = String.format("/projects/%s/addFollowers", project);
return new ItemRequest<Project>(this, Project.class, path, "POST");
} | [
"Adds the specified list of users as followers to the project. Followers are a subset of members, therefore if\nthe users are not already members of the project they will also become members as a result of this operation.\nReturns the updated project record.\n\n@param project The project to add followers to.\n@return Request object"
] | [
"Determine the enum value corresponding to the first play state found in the packet.\n\n@return the proper value",
"Swap the current version folder for a new one\n\n@param newStoreDirectory The path to the new version directory",
"Obtains a local date in Symmetry010 calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Symmetry010 era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code IsoEra}",
"Upgrades a read transaction to a write transaction, executes the work then downgrades to a read transaction\nagain.\n\n@since 2.4\n@noreference",
"Use this API to unset the properties of bridgetable resources.\nProperties that need to be unset are specified in args array.",
"Installs a path service.\n\n@param name the name to use for the service\n@param path the relative portion of the path\n@param possiblyAbsolute {@code true} if {@code path} may be an {@link #isAbsoluteUnixOrWindowsPath(String) absolute path}\nand should be {@link AbsolutePathService installed as such} if it is, with any\n{@code relativeTo} parameter ignored\n@param relativeTo the name of the path that {@code path} may be relative to\n@param serviceTarget the {@link ServiceTarget} to use to install the service\n@return the ServiceController for the path service",
"Sets an element in at the specified index.",
"Retrieve the var data key for a specific field.\n\n@param type field type\n@return var data key",
"Sets the value of a UDF.\n\n@param udf user defined field\n@param dataType MPXJ data type\n@param value field value"
] |
public static SQLService getInstance() throws Exception {
if (_instance == null) {
_instance = new SQLService();
_instance.startServer();
// default pool size is 20
// can be overriden by env variable
int dbPool = 20;
if (Utils.getEnvironmentOptionValue(Constants.SYS_DATABASE_POOL_SIZE) != null) {
dbPool = Integer.valueOf(Utils.getEnvironmentOptionValue(Constants.SYS_DATABASE_POOL_SIZE));
}
// initialize connection pool
PoolProperties p = new PoolProperties();
String connectString = "jdbc:h2:tcp://" + _instance.databaseHost + ":" + String.valueOf(_instance.port) + "/" +
_instance.databaseName + "/proxydb;MULTI_THREADED=true;AUTO_RECONNECT=TRUE;AUTOCOMMIT=ON";
p.setUrl(connectString);
p.setDriverClassName("org.h2.Driver");
p.setUsername("sa");
p.setJmxEnabled(true);
p.setTestWhileIdle(false);
p.setTestOnBorrow(true);
p.setValidationQuery("SELECT 1");
p.setTestOnReturn(false);
p.setValidationInterval(5000);
p.setTimeBetweenEvictionRunsMillis(30000);
p.setMaxActive(dbPool);
p.setInitialSize(5);
p.setMaxWait(30000);
p.setRemoveAbandonedTimeout(60);
p.setMinEvictableIdleTimeMillis(30000);
p.setMinIdle(10);
p.setLogAbandoned(true);
p.setRemoveAbandoned(true);
_instance.datasource = new DataSource();
_instance.datasource.setPoolProperties(p);
}
return _instance;
} | [
"Obtain instance of the SQL Service\n\n@return instance of SQLService\n@throws Exception exception"
] | [
"Removes the specified list of users from following the project, this will not affect project membership status.\nReturns the updated project record.\n\n@param project The project to remove followers from.\n@return Request object",
"Add properties to 'properties' map on transaction start\n@param type - of transaction",
"create an instance from the className\n@param <E> class of object\n@param className full class name\n@return an object or null if className is null",
"Get global hotkey provider for current platform\n\n@param useSwingEventQueue whether the provider should be using Swing Event queue or a regular thread\n@return new instance of Provider, or null if platform is not supported\n@see X11Provider\n@see WindowsProvider\n@see CarbonProvider",
"Retrieve a string value.\n\n@param data byte array\n@param offset offset into byte array\n@return string value",
"Update a variable name with a date if the variable is detected as being a date.\n\n@param variableName the variable name.\n@param date the date to replace the value with if the variable is a date variable.",
"This method retrieves a byte array containing the data at the\ngiven offset in the block. If no data is found at the given offset\nthis method returns null.\n\n@param offset offset of required data\n@return byte array containing required data",
"Use this API to fetch vpnclientlessaccesspolicy_binding resource of given name .",
"Start pushing the element off to the right."
] |
public static void paintCheckedBackground(Component c, Graphics g, int x, int y, int width, int height) {
if ( backgroundImage == null ) {
backgroundImage = new BufferedImage( 64, 64, BufferedImage.TYPE_INT_ARGB );
Graphics bg = backgroundImage.createGraphics();
for ( int by = 0; by < 64; by += 8 ) {
for ( int bx = 0; bx < 64; bx += 8 ) {
bg.setColor( ((bx^by) & 8) != 0 ? Color.lightGray : Color.white );
bg.fillRect( bx, by, 8, 8 );
}
}
bg.dispose();
}
if ( backgroundImage != null ) {
Shape saveClip = g.getClip();
Rectangle r = g.getClipBounds();
if (r == null)
r = new Rectangle(c.getSize());
r = r.intersection(new Rectangle(x, y, width, height));
g.setClip(r);
int w = backgroundImage.getWidth();
int h = backgroundImage.getHeight();
if (w != -1 && h != -1) {
int x1 = (r.x / w) * w;
int y1 = (r.y / h) * h;
int x2 = ((r.x + r.width + w - 1) / w) * w;
int y2 = ((r.y + r.height + h - 1) / h) * h;
for (y = y1; y < y2; y += h)
for (x = x1; x < x2; x += w)
g.drawImage(backgroundImage, x, y, c);
}
g.setClip(saveClip);
}
} | [
"Paint a check pattern, used for a background to indicate image transparency.\n@param c the component to draw into\n@param g the Graphics objects\n@param x the x position\n@param y the y position\n@param width the width\n@param height the height"
] | [
"Retrieve the request History based on the specified filters.\nIf no filter is specified, return the default size history.\n\n@param filters filters to be applied\n@return array of History items\n@throws Exception exception",
"Sets the response context.\n\n@param responseContext\nthe response context\n@return the parallel task builder",
"Set the name of the schema containing the Primavera tables.\n\n@param schema schema name.",
"Searches the model for all variable assignments and makes a default map of those variables, setting them to \"\"\n\n@return the default variable assignment map",
"Reads an HTML snippet with the given name.\n\n@return the HTML data",
"Extract WOEID after XML loads",
"Called by spring on initialization.",
"Updates the backing render texture. This method should not\nbe called when capturing is in progress.\n\n@param width The width of the backing texture in pixels.\n@param height The height of the backing texture in pixels.\n@param sampleCount The MSAA sample count.",
"Decrements the client's use count, and makes it eligible for closing if it is no longer in use.\n\n@param client the dbserver connection client which is no longer being used for a task"
] |
public int updateRaw(DatabaseConnection connection, String statement, String[] arguments) throws SQLException {
logger.debug("running raw update statement: {}", statement);
if (arguments.length > 0) {
// need to do the (Object) cast to force args to be a single object
logger.trace("update arguments: {}", (Object) arguments);
}
CompiledStatement compiledStatement = connection.compileStatement(statement, StatementType.UPDATE, noFieldTypes,
DatabaseConnection.DEFAULT_RESULT_FLAGS, false);
try {
assignStatementArguments(compiledStatement, arguments);
return compiledStatement.runUpdate();
} finally {
IOUtils.closeThrowSqlException(compiledStatement, "compiled statement");
}
} | [
"Return the number of rows affected."
] | [
"Remove a DAO from the cache. This is necessary if we've registered it already but it throws an exception during\nconfiguration.",
"This method reads a two byte integer from the input stream.\n\n@param is the input stream\n@return integer value\n@throws IOException on file read error or EOF",
"Convert an array of column definitions into a map keyed by column name.\n\n@param columns array of column definitions\n@return map of column definitions",
"Sets the transformations to be applied to the shape before indexing it.\n\n@param transformations the sequence of transformations\n@return this with the specified sequence of transformations",
"Get a sub-list of this list\n@param fromIndex index of the first element in the sub-list (inclusive)\n@param toIndex index of the last element in the sub-list (inclusive)\n@return the sub-list",
"Create parameter converters from methods annotated with @AsParameterConverter\n@see {@link AbstractStepsFactory}",
"Sobel method to generate bump map from a height map\n\n@param input - A height map\n@return bump map",
"Creates Accumulo connector given FluoConfiguration",
"Given the key, figures out which partition on the local node hosts the key.\n\n@param key\n@return"
] |
private Point parsePoint(String point) {
int comma = point.indexOf(',');
if (comma == -1)
return null;
float lat = Float.valueOf(point.substring(0, comma));
float lng = Float.valueOf(point.substring(comma + 1));
return spatialctx.makePoint(lng, lat);
} | [
"Parses coordinates into a Spatial4j point shape."
] | [
"Submits the configured template to Transloadit.\n\n@return {@link Response}\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"Tests the string edit distance function.",
"Removes the supplied marker from the map.\n\n@param marker",
"Request a scoped transactional token.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@return a BoxAPIConnection which can be used to perform transactional requests.",
"Gets the publisher wrapped by the specofoed FlexiblePublisher.\n@param publisher The FlexiblePublisher wrapping the publisher.\n@param type The type of the publisher wrapped by the FlexiblePublisher.\n@return The publisher object wrapped by the FlexiblePublisher.\nNull is returned if the FlexiblePublisher does not wrap a publisher of the specified type.\n@throws IllegalArgumentException In case publisher is not of type\n{@link org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher}",
"Sets the position vector of the keyframe.",
"Parses an RgbaColor from a hexadecimal, rgb, rgba, hsl, or hsla\nvalue.\n\n@return returns the parsed color",
"Sets the top and bottom frame margin.\n@param frameTop margin\n@param frameBottom margin\n@return this to allow chaining",
"Gets a list of any tasks on this file with requested fields.\n\n@param fields optional fields to retrieve for this task.\n@return a list of tasks on this file."
] |
public double getValue(int[] batch) {
double value = 0.0;
for (int i=0; i<batch.length; i++) {
value += getValue(i);
}
return value;
} | [
"Gets value of this function at the current point, computed on the given batch of examples.\n@param batch A set of indices indicating the examples over which the gradient should be computed.\n@return The value of the function at the point."
] | [
"Checks that arguments and parameter types match.\n@param params method parameters\n@param args type arguments\n@return -1 if arguments do not match, 0 if arguments are of the exact type and >0 when one or more argument is\nnot of the exact type but still match",
"Returns the temporary directory used by java.\n\n@return The temporary directory\n@throws IOException If an io error occurred",
"Use this API to fetch filtered set of lbvserver resources.\nset the filter parameter values in filtervalue object.",
"Waits for a job V3 to complete\n\n@param cloudFoundryClient the client to use to request job status\n@param completionTimeout the amount of time to wait for the job to complete.\n@param jobId the id of the job\n@return {@code onComplete} once job has completed",
"Create a polygon that represents in world space the exact area that will be visible on the printed\nmap.\n\n@param context map context",
"Disallow the job type from being executed.\n@param jobType the job type to disallow",
"Returns the configuration value with the specified name.",
"Checks the given model.\n\n@param modelDef The model\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"Returns the names of the involved fields when post processing.\n\n@return the names of the involved fields"
] |
private String formatDateTimeNull(Date value)
{
return (value == null ? m_formats.getNullText() : m_formats.getDateTimeFormat().format(value));
} | [
"This method is called to format a date. It will return the null text\nif a null value is supplied.\n\n@param value date value\n@return formatted date value"
] | [
"Remove any protocol-level headers from the remote server's response that\ndo not apply to the new response we are sending.\n\n@param response",
"Roll the java.util.Time forward or backward.\n\n@param startDate - The start date\n@param period Calendar.YEAR etc\n@param amount - Negative to rollbackwards.",
"Connect sync.\n\n@param configuration the protocol configuration\n@return the connection\n@throws IOException",
"Set the configuration property.\n\n@param key\n@param value\n@return self\n@see #ARCHIVE_ISOLATION_SYSTEM_PROPERTY\n@see #SHUTDOWN_HOOK_SYSTEM_PROPERTY\n@see #DEV_MODE_SYSTEM_PROPERTY\n@see ConfigurationKey",
"Adjusts the day in the provided month, that it fits the specified week day.\nIf there's no match for that provided month, the next possible month is checked.\n\n@param date the date to adjust, with the correct year and month already set.",
"Use this API to update nstimeout.",
"Returns the index of each elem in a List.\n@param elems The list of items\n@return An array of indices",
"Use this API to disable Interface resources of given names.",
"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)"
] |
private void sort()
{
DefaultDirectedWeightedGraph<RuleProvider, DefaultEdge> graph = new DefaultDirectedWeightedGraph<>(
DefaultEdge.class);
for (RuleProvider provider : providers)
{
graph.addVertex(provider);
}
addProviderRelationships(graph);
checkForCycles(graph);
List<RuleProvider> result = new ArrayList<>(this.providers.size());
TopologicalOrderIterator<RuleProvider, DefaultEdge> iterator = new TopologicalOrderIterator<>(graph);
while (iterator.hasNext())
{
RuleProvider provider = iterator.next();
result.add(provider);
}
this.providers = Collections.unmodifiableList(result);
int index = 0;
for (RuleProvider provider : this.providers)
{
if (provider instanceof AbstractRuleProvider)
((AbstractRuleProvider) provider).setExecutionIndex(index++);
}
} | [
"Perform the entire sort operation"
] | [
"Given a list of keys and a number of splits find the keys to split on.\n\n@param keys the list of keys.\n@param numSplits the number of splits.",
"Print a timestamp value.\n\n@param value time value\n@return time value",
"This method retrieves a byte array containing the data at the\ngiven offset in the block. If no data is found at the given offset\nthis method returns null.\n\n@param offset offset of required data\n@return byte array containing required data",
"Reads Netscape extension to obtain iteration count.",
"This method takes an integer enumeration of a priority\nand returns an appropriate instance of this class. Note that unrecognised\nvalues are treated as medium priority.\n\n@param priority int version of the priority\n@return Priority class instance",
"Write a new line and indent.",
"Use this API to fetch all the dnspolicylabel resources that are configured on netscaler.",
"Gets an expiring URL for downloading a file directly from Box. This can be user,\nfor example, for sending as a redirect to a browser to cause the browser\nto download the file directly from Box.\n\n@return the temporary download URL",
"Set the model used by the left table.\n\n@param model table model"
] |
public static SpinJsonNode JSON(Object input) {
return SpinFactory.INSTANCE.createSpin(input, DataFormats.json());
} | [
"Creates a spin wrapper for a data input. The data format of the\ninput is assumed to be JSON.\n\n@param input the input to wrap\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')"
] | [
"Suite prologue.",
"Gets a SerialMessage with the BASIC SET command\n@param the level to set.\n@return the serial message",
"Given a DocumentVersionInfo, returns a BSON document representing the next version. This means\nand incremented version count for a non-empty version, or a fresh version document for an\nempty version.\n@return a BsonDocument representing a synchronization version",
"Prints to a file. If the file does not exist, rewrites the file;\ndoes not append.",
"Convert element to another object given a parameterized type signature\n\n@param context\n@param destinationType\nthe destination type\n@param source\nthe source object\n\n@return the converted object\n@throws ConverterException\nif conversion failed",
"Get the value of the specified column.\n\n@param columnName the name of the column\n@return the corresponding value of the column, {@code null} if the column does not exist in the row key",
"Finds or opens a client to talk to the dbserver on the specified player, incrementing its use count.\n\n@param targetPlayer the player number whose database needs to be interacted with\n@param description a short description of the task being performed for error reporting if it fails,\nshould be a verb phrase like \"requesting track metadata\"\n\n@return the communication client for talking to that player, or {@code null} if the player could not be found\n\n@throws IllegalStateException if we can't find the target player or there is no suitable player number for us\nto pretend to be\n@throws IOException if there is a problem communicating",
"Updates the database. Never call this during normal operations, upgrade is a user-controlled operation.",
"dispatch to gravity state"
] |
@JmxOperation
public String stopAsyncOperation(int requestId) {
try {
stopOperation(requestId);
} catch(VoldemortException e) {
return e.getMessage();
}
return "Stopping operation " + requestId;
} | [
"Wrapper to avoid throwing an exception over JMX"
] | [
"Return the entity of a resource\n\n@param resource the resource\n@param <T> the type of the resource's entity\n@param <R> the resource type\n@return the resource's entity",
"Convert a Java date into a Planner date-time string.\n\n20070222T080000Z\n\n@param value Java date\n@return Planner date-time string",
"Use this API to expire cacheobject.",
"For creating expression columns\n@return",
"Get the days difference",
"add a join between two aliases\n\nTODO BRJ : This needs refactoring, it looks kind of weird\n\nno extents\nA1 -> A2\n\nextents on the right\nA1 -> A2\nA1 -> A2E0\n\nextents on the left : copy alias on right, extents point to copies\nA1 -> A2\nA1E0 -> A2C0\n\nextents on the left and right\nA1 -> A2\nA1 -> A2E0\nA1E0 -> A2C0\nA1E0 -> A2E0C0\n\n@param left\n@param leftKeys\n@param right\n@param rightKeys\n@param outer\n@param name",
"This method retrieves an int value from a String instance.\nIt returns zero by default if a null value or an empty string is supplied.\n\n@param value string representation of an integer\n@return int value",
"Use this API to add gslbservice resources.",
"a simple contains helper method, checks if array contains a numToCheck\n\n@param array array of ints\n@param numToCheck value to find\n@return True if found, false otherwise"
] |
@Override
public ImageSource apply(ImageSource input) {
int w = input.getWidth();
int h = input.getHeight();
MatrixSource output = new MatrixSource(input);
Vector3 n = new Vector3(0, 0, 1);
for (int y = 0; y < h; y++) {
for (int x = 0; x < w; x++) {
if (x < border || x == w - border || y < border || y == h - border) {
output.setRGB(x, y, VectorHelper.Z_NORMAL);
continue;
}
float s0 = input.getR(x - 1, y + 1);
float s1 = input.getR(x, y + 1);
float s2 = input.getR(x + 1, y + 1);
float s3 = input.getR(x - 1, y);
float s5 = input.getR(x + 1, y);
float s6 = input.getR(x - 1, y - 1);
float s7 = input.getR(x, y - 1);
float s8 = input.getR(x + 1, y - 1);
float nx = -(s2 - s0 + 2 * (s5 - s3) + s8 - s6);
float ny = -(s6 - s0 + 2 * (s7 - s1) + s8 - s2);
n.set(nx, ny, scale);
n.nor();
int rgb = VectorHelper.vectorToColor(n);
output.setRGB(x, y, rgb);
}
}
return new MatrixSource(output);
} | [
"Sobel method to generate bump map from a height map\n\n@param input - A height map\n@return bump map"
] | [
"Extract a list of exception assignments.\n\n@param exceptionData string representation of exception assignments\n@return list of exception assignment rows",
"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.",
"Answers the ClassDescriptor referenced by 'super' ReferenceDescriptor.\n@return ClassDescriptor or null",
"Read all task relationships from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file",
"Retrieves an object that has been attached to this context.\n\n@param key the key to the attachment.\n@param <V> the value type of the attachment.\n\n@return the attachment if found otherwise {@code null}.",
"Generates a comment regarding the parameters.\n\n@param entityId - id of the commented entity\n@param entityType - type of the entity\n@param action - the action performed by the user\n@param commentedText - comment text\n@param user - comment left by\n@param date - date comment was created\n@return - comment entity",
"Cancel the pause operation",
"Record a device announcement in the devices map, so we know whe saw it.\n\n@param announcement the announcement to be recorded",
"Remove a descriptor.\n@param validKey This could be the {@link JdbcConnectionDescriptor}\nitself, or the associated {@link JdbcConnectionDescriptor#getPBKey PBKey}."
] |
public static <T, R extends Resource<T>> T getEntity(R resource) {
return resource.getEntity();
} | [
"Return the entity of a resource\n\n@param resource the resource\n@param <T> the type of the resource's entity\n@param <R> the resource type\n@return the resource's entity"
] | [
"Finish configuration.",
"Unlink the specified reference object.\nMore info see OJB doc.\n@param source The source object with the specified reference field.\n@param attributeName The field name of the reference to unlink.\n@param target The referenced object to unlink.",
"Stops the processing and prints the final time.",
"compute Sinh using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.",
"Read a two byte integer from the data.\n\n@param offset current offset into data block\n@param data data block\n@return int value",
"Inserts a String array value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a String array object, or null\n@return this bundler instance to chain method calls",
"Handle a simple ping request.\n\n@param channel the channel\n@param header the protocol header\n@throws IOException for any error",
"handle white spaces.",
"Use this API to add authenticationradiusaction resources."
] |
Subsets and Splits