query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public static void writeShort(byte[] bytes, short value, int offset) {
bytes[offset] = (byte) (0xFF & (value >> 8));
bytes[offset + 1] = (byte) (0xFF & value);
} | [
"Write a short to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The short to write\n@param offset The offset to begin writing at"
] | [
"Get the target file for misc items.\n\n@param item the misc item\n@return the target location",
"Check if the path to the property correspond to an association.\n\n@param targetTypeName the name of the entity containing the property\n@param pathWithoutAlias the path to the property WITHOUT aliases\n@return {@code true} if the property is an association or {@code false} otherwise",
"Adds a Statement.\n\n@param rank\nrank of the statement\n@param subject\nrdf resource that refers to the statement",
"Extracts a house holder vector from the rows of A and stores it in u\n@param A Complex matrix with householder vectors stored in the upper right triangle\n@param row Row in A\n@param col0 first row in A (implicitly assumed to be r + i0)\n@param col1 last row +1 in A\n@param u Output array storage\n@param offsetU first index in U",
"Find out which method to call on the service bean.",
"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",
"Determine which field the Activity ID has been mapped to.\n\n@param map field map\n@return field",
"Remove any overrides for an endpoint\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@return true if success, false otherwise",
"A regular embedded is an element that it is embedded but it is not a key or a collection.\n\n@param keyColumnNames the column names representing the identifier of the entity\n@param column the column we want to check\n@return {@code true} if the column represent an attribute of a regular embedded element, {@code false} otherwise"
] |
private GVRCursorController getUniqueControllerId(int deviceId) {
GVRCursorController controller = controllerIds.get(deviceId);
if (controller != null) {
return controller;
}
return null;
} | [
"returns null if no device is found."
] | [
"Write exceptions into the format used by MSPDI files from\nProject 2007 onwards.\n\n@param calendar parent calendar\n@param exceptions list of exceptions",
"Rename an existing app.\n@param appName Existing app name. See {@link #listApps()} for names that can be used.\n@param newName New name to give the existing app.\n@return the new name of the object",
"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.",
"Use this API to fetch nssimpleacl resource of given name .",
"Reads any exceptions present in the file. This is only used in MSPDI\nfile versions saved by Project 2007 and later.\n\n@param calendar XML calendar\n@param bc MPXJ calendar",
"Should be called each frame.",
"Record the duration of a get_all operation, along with how many values\nwere requested, how may were actually returned and the size of the values\nreturned.",
"Returns the start position of the indicator.\n\n@return The start position of the indicator.",
"Ensures that the foreign keys required by the given collection are present in the element class.\n\n@param modelDef The model\n@param collDef The collection\n@throws ConstraintException If there is a problem with the foreign keys"
] |
public final List<MtasSolrStatus> checkForExceptions() {
List<MtasSolrStatus> statusWithException = null;
for (MtasSolrStatus item : data) {
if (item.checkResponseForException()) {
if (statusWithException == null) {
statusWithException = new ArrayList<>();
}
statusWithException.add(item);
}
}
return statusWithException;
} | [
"Check for exceptions.\n\n@return the list"
] | [
"Creates a window visually showing the matrix's state. Block means an element is zero.\nRed positive and blue negative. More intense the color larger the element's absolute value\nis.\n\n@param A A matrix.\n@param title Name of the window.",
"Select a List of values from a Matcher using a Collection\nto identify the indices to be selected.\n\n@param self a Matcher\n@param indices a Collection of indices\n@return a String of the values at the given indices\n@since 1.6.0",
"Obtain instance of the SQL Service\n\n@return instance of SQLService\n@throws Exception exception",
"Merge the given maps.\n\n<p>\nThe replied map is a view on the given two maps.\nIf a key exists in the two maps, the replied value is the value of the right operand.\n</p>\n\n<p>\nEven if the key of the right operand exists in the left operand, the value in the right operand is preferred.\n</p>\n\n<p>\nThe replied map is unmodifiable.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the left map.\n@param right the right map.\n@return a map with the merged contents from the two maps.\n@since 2.15",
"Print the parameters of the parameterized type t",
"Removes all the given tags from the document.\n\n@param dom the document object.\n@param tagName the tag name, examples: script, style, meta\n@return the changed dom.",
"Used to NOT the argument clause specified.",
"Propagate onEnter events to listeners\n@param hit collision object",
"This filter permit to return an image sized exactly as requested wherever is its ratio by\nfilling with chosen color the missing parts. Usually used with \"fit-in\" or \"adaptive-fit-in\"\n\n@param color integer representation of color."
] |
public void setTargetTranslator(TargetTranslator targetTranslator) {
if(targetTranslator!=null){
this.targetTranslator = targetTranslator;
this.charTranslator = null;
this.htmlElementTranslator = null;
}
} | [
"Sets the target translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator"
] | [
"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",
"Get a collection of all of the user's groups.\n\n@return A Collection of Group objects\n@throws FlickrException",
"Return the hostname of this address such as \"MYCOMPUTER\".",
"Method to initialize the list.\n\n@param resList a given instance or null\n@return an instance",
"Use this API to enable Interface resources of given names.",
"Runs the shell script for committing and optionally pushing the changes in the module.\n@return exit code of the script.",
"Set the classpath for loading the driver using the classpath reference.\n\n@param r reference to the classpath",
"Attempts shared acquisition with a max wait time.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the time value to wait for acquiring the lock\n@param unit - See {@code TimeUnit} for valid values\n@return {@code boolean} true on success.",
"Open the store with the version directory specified. If null is specified\nwe open the directory with the maximum version\n\n@param versionDir Version Directory to open. If null, we open the max\nversioned / latest directory"
] |
public String[] getMethods(String pluginClass) throws Exception {
ArrayList<String> methodNames = new ArrayList<String>();
Method[] methods = getClass(pluginClass).getDeclaredMethods();
for (Method method : methods) {
logger.info("Checking {}", method.getName());
com.groupon.odo.proxylib.models.Method methodInfo = this.getMethod(pluginClass, method.getName());
if (methodInfo == null) {
continue;
}
// check annotations
Boolean matchesAnnotation = false;
if (methodInfo.getMethodType().endsWith(Constants.PLUGIN_RESPONSE_OVERRIDE_CLASS) ||
methodInfo.getMethodType().endsWith(Constants.PLUGIN_RESPONSE_OVERRIDE_V2_CLASS)) {
matchesAnnotation = true;
}
if (!methodNames.contains(method.getName()) && matchesAnnotation) {
methodNames.add(method.getName());
}
}
return methodNames.toArray(new String[0]);
} | [
"Returns a string array of the methods loaded for a class\n\n@param pluginClass name of class\n@return string array of the methods loaded for the class\n@throws Exception exception"
] | [
"Check that the parameter array has at least as many elements as it\nshould.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param actualLength\nThe actual array length\n@param minimumLength\nThe minimum array length",
"Extract the generic type from the given Class object.\n@param clazz the Class to check\n@param source the expected raw source type (can be {@code null})\n@param typeIndex the index of the actual type argument\n@param nestingLevel the nesting level of the target type\n@param currentLevel the current nested level\n@return the generic type as Class, or {@code null} if none",
"Extract predecessor data.",
"Write the summary file, if requested.",
"Sets either the upper or low triangle of a matrix to zero",
"Record the resource request queue length\n\n@param dest Destination of the socket for which resource request is\nenqueued. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param queueLength The number of entries in the \"asynchronous\" resource\nrequest queue.",
"Gets an iterable of all the assignments of this task.\n@param fields the fields to retrieve.\n@return an iterable containing info about all the assignments.",
"Get the collection of untagged photos.\n\nThis method requires authentication with 'read' permission.\n\n@param perPage\n@param page\n@return A Collection of Photos\n@throws FlickrException",
"Validate ipv4 address with regular expression\n\n@param ip\naddress for validation\n\n@return true valid ip address, false invalid ip address"
] |
private void processColumns()
{
int fieldID = MPPUtility.getInt(m_data, m_headerOffset);
m_headerOffset += 4;
m_dataOffset = MPPUtility.getInt(m_data, m_headerOffset);
m_headerOffset += 4;
FieldType type = FieldTypeHelper.getInstance(fieldID);
if (type.getDataType() != null)
{
processKnownType(type);
}
} | [
"Processes graphical indicator definitions for each column."
] | [
"Adds the position.\n\n@param position the position",
"capture center eye",
"Rename with retry.\n\n@param from\n@param to\n@return <tt>true</tt> if the file was successfully renamed.",
"Use this API to add gslbsite.",
"Searches for brackets which are only used to construct new matrices by concatenating\n1 or more matrices together",
"Returns the classpath for executable jar.",
"Str map to str.\n\n@param map\nthe map\n@return the string",
"Toggles a style name on a ui object\n\n@param uiObject Object to toggle style on\n@param toggleStyle whether or not to toggle the style name on the object\n@param styleName Style name",
"Adds a new Site matcher object to the map of server names.\n\n@param matcher the SiteMatcher of the server\n@param site the site to add"
] |
private static Map<String, Set<String>> expand(Map<String, Set<String>> viewToPropNames) {
Set<String> baseProps = viewToPropNames.get(PropertyView.BASE_VIEW);
if (baseProps == null) {
baseProps = ImmutableSet.of();
}
if (!SquigglyConfig.isFilterImplicitlyIncludeBaseFieldsInView()) {
// make an exception for full view
Set<String> fullView = viewToPropNames.get(PropertyView.FULL_VIEW);
if (fullView != null) {
fullView.addAll(baseProps);
}
return viewToPropNames;
}
for (Map.Entry<String, Set<String>> entry : viewToPropNames.entrySet()) {
String viewName = entry.getKey();
Set<String> propNames = entry.getValue();
if (!PropertyView.BASE_VIEW.equals(viewName)) {
propNames.addAll(baseProps);
}
}
return viewToPropNames;
} | [
"apply the base fields to other views if configured to do so."
] | [
"Convert a wavelength to an RGB value.\n@param wavelength wavelength in nanometres\n@return the RGB value",
"Triggers expansion of the parent.",
"Create a JavadocComment, by formatting the text of the Javadoc using the given indentation.",
"Notifies that multiple header items are changed.\n\n@param positionStart the position.\n@param itemCount the item count.",
"Function to serialize the given Vector clock into a string. If something\ngoes wrong, it returns an empty string.\n\n@param vc The Vector clock to serialize\n@return The string (JSON) version of the specified Vector clock",
"Save page to log\n\n@return address of this page after save",
"Factory method to create EnumStringConverter\n\n@param <E>\nenum type inferred from enumType parameter\n@param enumType\nparticular enum class\n@return instance of EnumConverter",
"Initialize the pattern controllers.",
"Performs a partial BFS on model until the search frontier reaches the desired bootstrap size\n\n@param min the desired bootstrap size\n@return a list of found PossibleState\n@throws ModelException if the desired bootstrap can not be reached"
] |
public Token add( Function function ) {
Token t = new Token(function);
push( t );
return t;
} | [
"Adds a function to the end of the token list\n@param function Function which is to be added\n@return The new Token created around function"
] | [
"Auto re-initialize external resourced\nif resources have been already released.",
"Removes double-quotes from around a string\n@param str\n@return",
"Handles an initial response from a PUT or PATCH operation response by polling the status of the operation\nasynchronously, once the operation finishes emits the final response.\n\n@param observable the initial observable from the PUT or PATCH operation.\n@param resourceType the java.lang.reflect.Type of the resource.\n@param <T> the return type of the caller.\n@return the observable of which a subscription will lead to a final response.",
"Creates a Blob holding a single-sheet spreadsheet with a pivot of the domain objects. The sheet name is derived from the\nclass name.\n\n<p>\nMinimal requirements for the domain object are:\n</p>\n<ul>\n<li>\nOne property has annotation {@link PivotRow} and will be used as row identifier in left column of pivot.\nEmpty values are supported.\n</li>\n<li>\nAt least one property has annotation {@link PivotColumn}. Its values will be used in columns of pivot.\nEmpty values are supported.\n</li>\n<li>\nAt least one property has annotation {@link PivotValue}. Its values will be distributed in the pivot.\n</li>\n</ul>",
"TestNG returns a compound thread ID that includes the thread name and its numeric ID,\nseparated by an 'at' sign. We only want to use the thread name as the ID is mostly\nunimportant and it takes up too much space in the generated report.\n@param threadId The compound thread ID.\n@return The thread name.",
"Set the named roles which may be defined.\n\n@param roles map with roles, keys are the values for {@link #rolesAttribute}, probably DN values\n@since 1.10.0",
"Get the context for the specified photo.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo ID\n@return The PhotoContext\n@throws FlickrException",
"Count the number of queued resource requests for a specific pool.\n\n@param key The key\n@return The count of queued resource requests. Returns 0 if no queue\nexists for given key.",
"Set a Java classname path to ignore when printing stack traces\n@param classToIgnoreInTraces The class name (with packages, etc) to ignore.\n@return this"
] |
private void validateAttributesToCreateANewRendererViewHolder() {
if (viewType == null) {
throw new NullContentException(
"RendererBuilder needs a view type to create a RendererViewHolder");
}
if (layoutInflater == null) {
throw new NullLayoutInflaterException(
"RendererBuilder needs a LayoutInflater to create a RendererViewHolder");
}
if (parent == null) {
throw new NullParentException(
"RendererBuilder needs a parent to create a RendererViewHolder");
}
} | [
"Throws one RendererException if the viewType, layoutInflater or parent are null."
] | [
"Lookup an object via its name.\n@param name The name of an object.\n@return The object with that name.\n@exception ObjectNameNotFoundException There is no object with the specified name.\nObjectNameNotFoundException",
"Convert subQuery to SQL\n@param subQuery the subQuery value of SelectionCriteria",
"Returns the available module names regarding the filters\n\n@param name String\n@param filters FiltersHolder\n@return List<String>",
"Wrap an operation's parameters in a simple encapsulating object\n@param operation the operation\n@param messageHandler the message handler\n@param attachments the attachments\n@return the encapsulating object",
"decides which icon to apply or hide this view\n\n@param imageHolder\n@param imageView\n@param iconColor\n@param tint",
"a small static helper to set the color to a GradientDrawable null save\n\n@param colorHolder\n@param ctx\n@param gradientDrawable",
"If the specified value is not greater than or equal to the specified minimum and\nless than or equal to the specified maximum, adjust it so that it is.\n@param value The value to check.\n@param min The minimum permitted value.\n@param max The maximum permitted value.\n@return {@code value} if it is between the specified limits, {@code min} if the value\nis too low, or {@code max} if the value is too high.\n@since 1.2",
"If this node represents a bean property this method returns all annotations of its getter.\n\n@return A set of annotations of this nodes property getter or an empty set.",
"Look up record by identity."
] |
public int checkIn() {
try {
synchronized (STATIC_LOCK) {
m_logStream = new PrintStream(new FileOutputStream(DEFAULT_LOGFILE_PATH, false));
CmsObject cms = getCmsObject();
if (cms != null) {
return checkInInternal();
} else {
m_logStream.println("No CmsObject given. Did you call init() first?");
return -1;
}
}
} catch (FileNotFoundException e) {
e.printStackTrace();
return -2;
}
} | [
"Start export and check in of the selected modules.\n@return The exit code of the check in procedure (like a script's exit code)."
] | [
"The fields returned by default. Typically the output is done via display formatters and hence nearly no\nfield is necessary. Returning all fields might cause performance problems.\n\n@return the default return fields.",
"replace the counter for K1-index o by new counter c",
"Record a prepared operation.\n\n@param identity the server identity\n@param prepared the prepared operation",
"Calculate the child size along the axis and measure the offset inside the\nlayout container\n@param dataIndex of child in Container\n@return true item fits the container, false - otherwise",
"Returns the number of history entries for a client\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param searchFilter unused\n@return number of history entries",
"Logic for timestamp\n@param time Epoch date of creation\n@return String timestamp",
"return a prepared DELETE Statement fitting for the given ClassDescriptor",
"Write a size prefixed string where the size is stored as a 2 byte\nshort\n\n@param buffer The buffer to write to\n@param s The string to write",
"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"
] |
public void setFrustum(float[] frustum)
{
Matrix4f projMatrix = new Matrix4f();
projMatrix.setFrustum(frustum[0], frustum[3], frustum[1], frustum[4], frustum[2], frustum[5]);
setFrustum(projMatrix);
} | [
"Set the view frustum to pick against from the minimum and maximum corners.\nThe viewpoint of the frustum is the center of the scene object\nthe picker is attached to. The view direction is the forward\ndirection of that scene object. The frustum will pick what a camera\nattached to the scene object with that view frustum would see.\nIf the frustum is not attached to a scene object, it defaults to\nthe view frustum of the main camera of the scene.\n\n@param frustum array of 6 floats as follows:\nfrustum[0] = left corner of frustum\nfrustum[1] = bottom corner of frustum\nfrustum[2] = front corner of frustum (near plane)\nfrustum[3] = right corner of frustum\nfrustum[4] = top corner of frustum\nfrustum[5 = back corner of frustum (far plane)"
] | [
"Creates an internal project and repositories such as a token storage.",
"Adds a member to this group with the specified role.\n@param user the member to be added to this group.\n@param role the role of the user in this group. Can be null to assign the default role.\n@return info about the new group membership.",
"Removes a tag from the task. Returns an empty data block.\n\n@param task The task to remove a tag from.\n@return Request object",
"Return the index associated to the Renderer.\n\n@param renderer used to search in the prototypes collection.\n@return the prototype index associated to the renderer passed as argument.",
"Returns the URL of a classpath resource.\n\n@param resourceName\nThe name of the resource.\n\n@return The URL.",
"Returns a prefix length for which the range of this segment grouping matches the the block of addresses for that prefix.\n\nIf no such prefix exists, returns null\n\nIf this segment grouping represents a single value, returns the bit length\n\n@return the prefix length or null",
"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",
"Picks out a File from `thriftFiles` corresponding to a given artifact ID\nand file name. Returns null if `artifactId` and `fileName` do not map to a\nthrift file path.\n\n@parameter artifactId The artifact ID of which to look up the path\n@parameter fileName the name of the thrift file for which to extract a path\n@parameter thriftFiles The set of Thrift files in which to lookup the\nartifact ID.\n@return The path of the directory containing Thrift files for the given\nartifact ID. null if artifact ID not found.",
"Updates metadata versions on stores.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param oldStoreDefs List of old store definitions\n@param newStoreDefs List of new store definitions"
] |
private void processResourceAssignments(Task task, List<MapRow> assignments)
{
for (MapRow row : assignments)
{
processResourceAssignment(task, row);
}
} | [
"Extract resource assignments for a task.\n\n@param task parent task\n@param assignments list of Synchro resource assignment data"
] | [
"Add new control at the end of control bar with specified touch listener, control label and resource.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param label the control label\n@param listener touch listener",
"Do not call this method outside of activity!!!",
"Read data for an individual task from the tables in a PEP file.\n\n@param parent parent task\n@param id task ID\n@return task instance",
"Returns the number of key-value mappings in this map for the second key.\n\n@param firstKey\nthe first key\n@return Returns the number of key-value mappings in this map for the second key.",
"Queues a Runnable to be run on the main thread on the next iteration of\nthe messaging loop. This is handy when code running on the main thread\nneeds to run something else on the main thread, but only after the\ncurrent code has finished executing.\n\n@param r\nThe {@link Runnable} to run on the main thread.\n@return Returns {@code true} if the Runnable was successfully placed in\nthe Looper's message queue.",
"Returns a matrix of StatisticsMatrix type so that SimpleMatrix functions create matrices\nof the correct type.",
"Converts the Conditionals into real headers.\n@return real headers.",
"Parse a parameterized object from an InputStream.\n\n@param is The InputStream, most likely from your networking library.\n@param jsonObjectType The ParameterizedType describing the object. Ex: LoganSquare.parse(is, new ParameterizedType<MyModel<OtherModel>>() { });",
"Read an individual Phoenix task relationship.\n\n@param relation Phoenix task relationship"
] |
private List<Row> createExceptionAssignmentRowList(String exceptionData)
{
List<Row> list = new ArrayList<Row>();
String[] exceptions = exceptionData.split(",|:");
int index = 1;
while (index < exceptions.length)
{
Date startDate = DatatypeConverter.parseEpochTimestamp(exceptions[index + 0]);
Date endDate = DatatypeConverter.parseEpochTimestamp(exceptions[index + 1]);
//Integer exceptionTypeID = Integer.valueOf(exceptions[index + 2]);
Map<String, Object> map = new HashMap<String, Object>();
map.put("STARU_DATE", startDate);
map.put("ENE_DATE", endDate);
list.add(new MapRow(map));
index += 3;
}
return list;
} | [
"Extract a list of exception assignments.\n\n@param exceptionData string representation of exception assignments\n@return list of exception assignment rows"
] | [
"Check if a given string is a template path or template content\n\nIf the string contains anyone the following characters then we assume it\nis content, otherwise it is path:\n\n* space characters\n* non numeric-alphabetic characters except:\n** dot \".\"\n** dollar: \"$\"\n\n@param string\nthe string to be tested\n@return `true` if the string literal is template content or `false` otherwise",
"Setter for the file format.\n@param fileFormat File format the configuration file is in.",
"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",
"Returns with a view of all scopes known by this manager.",
"not start with another option name",
"Returns a SimpleConfiguration clientConfig with properties set from this configuration\n\n@return SimpleConfiguration",
"Return the available format ids.",
"Populates a relation list.\n\n@param task parent task\n@param field target task field\n@param data MPX relation list data",
"Computes the p=1 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm."
] |
public static String getColumnSharedPrefix(String[] associationKeyColumns) {
String prefix = null;
for ( String column : associationKeyColumns ) {
String newPrefix = getPrefix( column );
if ( prefix == null ) { // first iteration
prefix = newPrefix;
if ( prefix == null ) { // no prefix, quit
break;
}
}
else { // subsequent iterations
if ( ! equals( prefix, newPrefix ) ) { // different prefixes
prefix = null;
break;
}
}
}
return prefix;
} | [
"Returns the shared prefix of these columns. Null otherwise.\n\n@param associationKeyColumns the columns sharing a prefix\n@return the shared prefix of these columns. {@code null} otherwise."
] | [
"URLEncode a string\n@param s\n@return",
"Use this API to add sslocspresponder resources.",
"replaces the old with the new item. The new item will not be added when the old one is not\nfound.\n\n@param oldObject will be removed\n@param newObject is added only when hte old item is removed",
"Connects to the comm port and starts send and receive threads.\n@param serialPortName the port name to open\n@throws SerialInterfaceException when a connection error occurs.",
"Extracts the elements from the source matrix by their 1D index.\n\n@param src Source matrix. Not modified.\n@param indexes array of row indexes\n@param length maximum element in row array\n@param dst output matrix. Must be a vector of the correct length.",
"Mbeans for UPDATE_ENTRIES",
"Take a string and make it an iterable ContentStream",
"Validate that the configuration is valid.\n\n@return any validation errors.",
"Set the degrees of rotation. Value will be set to -1, if not available.\n\n@param rotation"
] |
@Override
public final Optional<Boolean> tryOverrideValidation(final MatchInfo matchInfo) throws SocketException,
UnknownHostException, MalformedURLException {
for (AddressHostMatcher addressHostMatcher: this.matchersForHost) {
if (addressHostMatcher.matches(matchInfo)) {
return Optional.empty();
}
}
return Optional.of(false);
} | [
"Check the given URI to see if it matches.\n\n@param matchInfo the matchInfo to validate.\n@return True if it matches."
] | [
"Find and return the appropriate getter method for field.\n\n@return Get method or null (or throws IllegalArgumentException) if none found.",
"This method is called to alert project listeners to the fact that\na calendar has been written to a project file.\n\n@param calendar calendar instance",
"Use this API to fetch the statistics of all vpath_stats resources that are configured on netscaler.",
"Process the response by reporting proper log and feeding failure\ndetectors\n\n@param response\n@param pipeline",
"Get the names of all current registered providers.\n\n@return the names of all current registered providers, never null.",
"Triggers a replication request.",
"Read the top level tasks from GanttProject.\n\n@param gpProject GanttProject project",
"Returns a map from a category path to the wrapper of all the sub-categories of the category with the path given as key.\n\n@return a map from a category path to all sub-categories of the path's category.",
"Bessel function of order n.\n\n@param n Order.\n@param x Value.\n@return J value."
] |
public static BoxAPIConnection getTransactionConnection(String accessToken, String scope) {
return BoxTransactionalAPIConnection.getTransactionConnection(accessToken, scope, null);
} | [
"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."
] | [
"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)",
"This produces a shorter string for the address that uses the canonical representation but not using leading zeroes.\n\nEach address has a unique compressed string.",
"Moves to the step with the given number.\n\n<p>The step number is only updated if no exceptions are thrown when instantiating/displaying the given step\n\n@param stepNo the step number to move to",
"Count the number of queued resource requests for a specific pool.\n\n@param key The key\n@return The count of queued resource requests. Returns 0 if no queue\nexists for given key.",
"Retrieves the cost rate table entry active on a given date.\n\n@param date target date\n@return cost rate table entry",
"Append Join for SQL92 Syntax without parentheses",
"If the \"org.talend.esb.sam.agent.log.messageContent\" property value is \"true\" then log the message content\nIf it is \"false\" then skip the message content logging\nElse fall back to global property \"log.messageContent\"\n\n@param message\n@param logMessageContent\n@param logMessageContentOverride\n@return",
"See if a simple sequence can be used to extract the array. A simple extent is a continuous block from\na min to max index\n\n@return true if it is a simple range or false if not",
"Returns the steps instances associated to CandidateSteps\n\n@param candidateSteps\nthe List of CandidateSteps\n@return The List of steps instances"
] |
private void populateResourceAssignment(Record record, ResourceAssignment assignment) throws MPXJException
{
//
// Handle malformed MPX files - ensure that we can locate the resource
// using either the Unique ID attribute or the ID attribute.
//
Resource resource = m_projectFile.getResourceByUniqueID(record.getInteger(12));
if (resource == null)
{
resource = m_projectFile.getResourceByID(record.getInteger(0));
}
assignment.setUnits(record.getUnits(1));
assignment.setWork(record.getDuration(2));
assignment.setBaselineWork(record.getDuration(3));
assignment.setActualWork(record.getDuration(4));
assignment.setOvertimeWork(record.getDuration(5));
assignment.setCost(record.getCurrency(6));
assignment.setBaselineCost(record.getCurrency(7));
assignment.setActualCost(record.getCurrency(8));
assignment.setStart(record.getDateTime(9));
assignment.setFinish(record.getDateTime(10));
assignment.setDelay(record.getDuration(11));
//
// Calculate the remaining work
//
Duration work = assignment.getWork();
Duration actualWork = assignment.getActualWork();
if (work != null && actualWork != null)
{
if (work.getUnits() != actualWork.getUnits())
{
actualWork = actualWork.convertUnits(work.getUnits(), m_projectFile.getProjectProperties());
}
assignment.setRemainingWork(Duration.getInstance(work.getDuration() - actualWork.getDuration(), work.getUnits()));
}
if (resource != null)
{
assignment.setResourceUniqueID(resource.getUniqueID());
resource.addResourceAssignment(assignment);
}
m_eventManager.fireAssignmentReadEvent(assignment);
} | [
"Populate a resource assignment.\n\n@param record MPX record\n@param assignment resource assignment\n@throws MPXJException"
] | [
"Exports a single queue to an XML file.",
"Parse a string representation of password spec.\n\nA password spec string should be `<trait spec><length spec>`.\n\nWhere \"trait spec\" should be a composition of\n\n* `a` - indicate lowercase letter required\n* `A` - indicate uppercase letter required\n* `0` - indicate digit letter required\n* `#` - indicate special character required\n\n\"length spec\" should be `[min,max]` where `max` can be omitted.\n\nHere are examples of valid \"length spec\":\n\n* `[6,20]` // min length: 6, max length: 20\n* `[8,]` // min length: 8, max length: unlimited\n\nAnd examples of invalid \"length spec\":\n\n* `[8]` // \",\" required after min part\n* `[a,f]` // min and max part needs to be decimal digit(s)\n* `[3,9)` // length spec must be started with `[` and end with `]`\n\n@param spec a string representation of password spec\n@return a {@link PasswordSpec} instance",
"Derives the OJB platform to use for a database that is connected via a url using the specified\nsubprotocol, and where the specified jdbc driver is used.\n\n@param jdbcSubProtocol The JDBC subprotocol used to connect to the database\n@param jdbcDriver The JDBC driver used to connect to the database\n@return The platform identifier or <code>null</code> if no platform could be found",
"Update the server group's name\n\n@param serverGroupId ID of server group\n@param name new name of server group\n@return updated ServerGroup",
"Sets a new value for a given key. an older value is overwritten.\n@param key a non null key\n@param value the new value",
"Generic string joining function.\n@param strings Strings to be joined\n@param fixCase does it need to fix word case\n@param withChar char to join strings with.\n@return joined-string",
"Reconstructs a number that is represented by more than one byte in a network packet in big-endian order.\n\n@param buffer the byte array containing the packet data\n@param start the index of the first byte containing a numeric value\n@param length the number of bytes making up the value\n@return the reconstructed number",
"Use this API to flush cacheobject.",
"Add the buildInfo to step variables if missing and set its cps script.\n\n@param cpsScript the cps script\n@param stepVariables step variables map\n@return the build info"
] |
public Iterator<K> tailIterator(@NotNull final K key) {
return new Iterator<K>() {
private Stack<TreePos<K>> stack;
private boolean hasNext;
private boolean hasNextValid;
@Override
public boolean hasNext() {
if (hasNextValid) {
return hasNext;
}
hasNextValid = true;
if (stack == null) {
Node<K> root = getRoot();
if (root == null) {
hasNext = false;
return hasNext;
}
stack = new Stack<>();
if (!root.getLess(key, stack)) {
stack.push(new TreePos<>(root));
}
}
TreePos<K> treePos = stack.peek();
if (treePos.node.isLeaf()) {
while (treePos.pos >= (treePos.node.isTernary() ? 2 : 1)) {
stack.pop();
if (stack.isEmpty()) {
hasNext = false;
return hasNext;
}
treePos = stack.peek();
}
} else {
if (treePos.pos == 0) {
treePos = new TreePos<>(treePos.node.getFirstChild());
} else if (treePos.pos == 1) {
treePos = new TreePos<>(treePos.node.getSecondChild());
} else {
treePos = new TreePos<>(treePos.node.getThirdChild());
}
stack.push(treePos);
while (!treePos.node.isLeaf()) {
treePos = new TreePos<>(treePos.node.getFirstChild());
stack.push(treePos);
}
}
treePos.pos++;
hasNext = true;
return hasNext;
}
@Override
public K next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
hasNextValid = false;
TreePos<K> treePos = stack.peek();
// treePos.pos must be 1 or 2 here
return treePos.pos == 1 ? treePos.node.getFirstKey() : treePos.node.getSecondKey();
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
} | [
"Returns an iterator that iterates over all elements greater or equal to key in ascending order\n\n@param key key\n@return iterator"
] | [
"Adds an item to the list box, specifying an initial value for the item.\n\n@param value the item's value, to be submitted if it is part of a\n{@link FormPanel}; cannot be <code>null</code>\n@param text the text of the item to be added\n@param reload perform a 'material select' reload to update the DOM.",
"Retrieves a string value from the extended data.\n\n@param type Type identifier\n@return string value",
"Deletes all outgoing links of specified entity.\n\n@param entity the entity.",
"Checks the preconditions for creating a new ParseDateTimeAbstract processor with date format and locale.\n\n@param dateFormat\nthe date format to use\n@param locale\nthe Locale used to parse the date\n@throws NullPointerException\nif dateFormat or locale is null",
"Polls from the location header and updates the polling state with the\npolling response for a PUT operation.\n\n@param pollingState the polling state for the current operation.\n@param <T> the return type of the caller.",
"Put object to session cache.\n\n@param oid The {@link org.apache.ojb.broker.Identity} of the object to cache\n@param entry The {@link org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.CacheEntry} of the object\n@param onlyIfNew Flag, if set <em>true</em> only new objects (not already in session cache) be cached.",
"2-D Forward Discrete Hartley Transform.\n\n@param data Data.",
"Main method of this class related to ListView widget. This method is the responsible of\nrecycle or create a new Renderer instance with all the needed information to implement the\nrendering. This method will validate all the attributes passed in the builder constructor and\nwill check if can recycle or has to create a new Renderer instance.\n\nThis method is used with ListView because the view recycling mechanism is implemented in this\nclass. RecyclerView widget will use buildRendererViewHolder method.\n\n@return ready to use Renderer instance.",
"Use this API to fetch a sslglobal_sslpolicy_binding resources."
] |
public void ifMemberTagValueEquals(String template, Properties attributes) throws XDocletException
{
if (getCurrentField() != null) {
if (isTagValueEqual(attributes, FOR_FIELD)) {
generate(template);
}
}
else if (getCurrentMethod() != null) {
if (isTagValueEqual(attributes, FOR_METHOD)) {
generate(template);
}
}
} | [
"Evaluates the body if value for the member tag equals the specified value.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" description=\"The parameter name. If not specified, then the raw\ncontent of the tag is returned.\"\[email protected] name=\"paramNum\" description=\"The zero-based parameter number. It's used if the user\nused the space-separated format for specifying parameters.\"\[email protected] name=\"value\" optional=\"false\" description=\"The expected value.\""
] | [
"Processes the template for the object cache of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Sets the replace var map to single target single var.\n\n@param variable\nthe variable\n@param replaceList\n: the list of strings that will replace the variable\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder",
"Send Identify Node message to the controller.\n@param nodeId the nodeId of the node to identify\n@throws SerialInterfaceException when timing out or getting an invalid response.",
"Validate that the configuration is valid.\n\n@return any validation errors.",
"Parser for actual conditions\n\n@param feed\n@return",
"Adds api doc roots from a link. The folder reffered by the link should contain a package-list\nfile that will be parsed in order to add api doc roots to this configuration\n@param packageListUrl",
"Calculate Median value.\n@param values Values.\n@return Median.",
"Get the max extent as a envelop object.",
"Compares current cluster with final cluster. Uses pertinent store defs\nfor each cluster to determine if a node that hosts a zone-primary in the\ncurrent cluster will no longer host any zone-nary in the final cluster.\nThis check is the precondition for a server returning an invalid metadata\nexception to a client on a normal-case put or get. Normal-case being that\nthe zone-primary receives the pseudo-master put or the get operation.\n\n@param currentCluster\n@param currentStoreDefs\n@param finalCluster\n@param finalStoreDefs\n@return pretty-printed string documenting invalid metadata rates for each\nzone."
] |
void resolveBootUpdates(final ModelController controller, final ActiveOperation.CompletedCallback<ModelNode> callback) throws Exception {
connection.openConnection(controller, callback);
// Keep a reference to the the controller
this.controller = controller;
} | [
"Resolve the boot updates and register at the local HC.\n\n@param controller the model controller\n@param callback the completed callback\n@throws Exception for any error"
] | [
"Delivers the correct JSON Object for the target\n\n@param target\n@throws org.json.JSONException",
"Converts an object into a tab delimited string with given fields\nRequires the object has public access for the specified fields\n\n@param object Object to convert\n@param delimiter delimiter\n@param fieldNames fieldnames\n@return String representing object",
"Use this API to fetch filtered set of appfwlearningsettings resources.\nset the filter parameter values in filtervalue object.",
"Creates a descriptor for the bundle in the same folder where the bundle files are located.\n@throws CmsException thrown if creation fails.",
"A map of the header key value pairs. Keys are strings and values are either list of strings or a\nstring.\n\n@param headers the header map",
"Used for DI frameworks to inject values into stages.",
"This is a method to stream slops to \"slop\" store when a node is detected\nfaulty in a streaming session\n\n@param key -- original key\n@param value -- original value\n@param storeName -- the store for which we are registering the slop\n@param failedNodeId -- the faulty node ID for which we register a slop\n@throws IOException",
"Creates a non-binary media type with the given type, subtype, and charSet\n@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null}",
"Map the Primavera UDF to a custom field.\n\n@param fieldType parent object type\n@param dataType UDF data type\n@param name UDF name\n@return FieldType instance"
] |
public SimpleFeatureCollection areaToFeatureCollection(
@Nonnull final MapAttribute.MapAttributeValues mapAttributes) {
Assert.isTrue(mapAttributes.areaOfInterest == this,
"map attributes passed in does not contain this area of interest object");
final SimpleFeatureTypeBuilder typeBuilder = new SimpleFeatureTypeBuilder();
typeBuilder.setName("aoi");
CoordinateReferenceSystem crs = mapAttributes.getMapBounds().getProjection();
typeBuilder.add("geom", this.polygon.getClass(), crs);
final SimpleFeature feature =
SimpleFeatureBuilder.build(typeBuilder.buildFeatureType(), new Object[]{this.polygon}, "aoi");
final DefaultFeatureCollection features = new DefaultFeatureCollection();
features.add(feature);
return features;
} | [
"Return the area polygon as the only feature in the feature collection.\n\n@param mapAttributes the attributes that this aoi is part of."
] | [
"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).",
"Decode the String from Base64 into a byte array.\n\n@param value the string to be decoded\n@return the decoded bytes as an array\n@since 1.0",
"Gets the health memory.\n\n@return the health memory",
"Remove a part of a CharSequence. This replaces the first occurrence\nof the pattern within self with '' and returns the result.\n\n@param self a String\n@param pattern a Pattern representing the part to remove\n@return a String minus the part to be removed\n@since 2.2.0",
"Parse a macro defintion.\n\n\"macro NAME( var0 , var1 ) = 5+var0+var1'",
"Determine which field the Activity ID has been mapped to.\n\n@param map field map\n@return field",
"Executes a API query action to get a new token.\nThe method only executes the action, without doing any\nchecks first. If errors occur, they are logged and null is returned.\n\n@param tokenType The kind of token to retrieve like \"csrf\" or \"login\"\n@return newly retrieved token or null if no token was retrieved",
"Set the duration option.\n@param value the duration option to set ({@link EndType} as string).",
"Stores the gathered usage statistics about term uses by language to a CSV\nfile.\n\n@param usageStatistics\nthe statistics to store\n@param fileName\nthe name of the file to use"
] |
public static base_response update(nitro_service client, aaaparameter resource) throws Exception {
aaaparameter updateresource = new aaaparameter();
updateresource.enablestaticpagecaching = resource.enablestaticpagecaching;
updateresource.enableenhancedauthfeedback = resource.enableenhancedauthfeedback;
updateresource.defaultauthtype = resource.defaultauthtype;
updateresource.maxaaausers = resource.maxaaausers;
updateresource.maxloginattempts = resource.maxloginattempts;
updateresource.failedlogintimeout = resource.failedlogintimeout;
updateresource.aaadnatip = resource.aaadnatip;
return updateresource.update_resource(client);
} | [
"Use this API to update aaaparameter."
] | [
"Add a column to be set to a value for UPDATE statements. This will generate something like 'columnName =\nexpression' where the expression is built by the caller.\n\n<p>\nThe expression should have any strings escaped using the {@link #escapeValue(String)} or\n{@link #escapeValue(StringBuilder, String)} methods and should have any column names escaped using the\n{@link #escapeColumnName(String)} or {@link #escapeColumnName(StringBuilder, String)} methods.\n</p>",
"This method changes the value of an agent's belief through its external\naccess\n\n@param agent_name\nThe name of the agent to change a belief\n@param belief_name\nThe name of the belief to change\n@param new_value\nThe new value of the belief to be changed\n@param connector\nThe connector to get the external access",
"Encodes the given URI user info with the given encoding.\n@param userInfo the user info to be encoded\n@param encoding the character encoding to encode to\n@return the encoded user info\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Gets the value of the resourceRequestCriterion 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 resourceRequestCriterion property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetResourceRequestCriterion().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link ResourceRequestType.ResourceRequestCriterion }",
"Use this API to fetch all the nsspparams resources that are configured on netscaler.",
"Check whether the media seems to have changed since a saved version of it was used. We ignore changes in\nfree space because those probably just reflect history entries being added.\n\n@param originalMedia the media details when information about it was saved\n\n@return true if there have been detectable significant changes to the media since it was saved\n\n@throws IllegalArgumentException if the {@link #hashKey()} values of the media detail objects differ",
"Extract the field types from the fieldConfigs if they have not already been configured.",
"Operates on one dimension at a time.",
"build a complete set of local files, files from referenced projects, and dependencies."
] |
private void processKnownType(FieldType type)
{
//System.out.println("Header: " + type);
//System.out.println(ByteArrayHelper.hexdump(m_data, m_dataOffset, 36, false, 16, ""));
GraphicalIndicator indicator = m_container.getCustomField(type).getGraphicalIndicator();
indicator.setFieldType(type);
int flags = m_data[m_dataOffset];
indicator.setProjectSummaryInheritsFromSummaryRows((flags & 0x08) != 0);
indicator.setSummaryRowsInheritFromNonSummaryRows((flags & 0x04) != 0);
indicator.setDisplayGraphicalIndicators((flags & 0x02) != 0);
indicator.setShowDataValuesInToolTips((flags & 0x01) != 0);
m_dataOffset += 20;
int nonSummaryRowOffset = MPPUtility.getInt(m_data, m_dataOffset) - 36;
m_dataOffset += 4;
int summaryRowOffset = MPPUtility.getInt(m_data, m_dataOffset) - 36;
m_dataOffset += 4;
int projectSummaryOffset = MPPUtility.getInt(m_data, m_dataOffset) - 36;
m_dataOffset += 4;
int dataSize = MPPUtility.getInt(m_data, m_dataOffset) - 36;
m_dataOffset += 4;
//System.out.println("Data");
//System.out.println(ByteArrayHelper.hexdump(m_data, m_dataOffset, dataSize, false, 16, ""));
int maxNonSummaryRowOffset = m_dataOffset + summaryRowOffset;
int maxSummaryRowOffset = m_dataOffset + projectSummaryOffset;
int maxProjectSummaryOffset = m_dataOffset + dataSize;
m_dataOffset += nonSummaryRowOffset;
while (m_dataOffset + 2 < maxNonSummaryRowOffset)
{
indicator.addNonSummaryRowCriteria(processCriteria(type));
}
while (m_dataOffset + 2 < maxSummaryRowOffset)
{
indicator.addSummaryRowCriteria(processCriteria(type));
}
while (m_dataOffset + 2 < maxProjectSummaryOffset)
{
indicator.addProjectSummaryCriteria(processCriteria(type));
}
} | [
"Process a graphical indicator definition for a known type.\n\n@param type field type"
] | [
"Sets the whole day flag.\n@param isWholeDay flag, indicating if the event lasts whole days.",
"Access an attribute.\n\n@param type the attribute's type, not {@code null}\n@param key the attribute's key, not {@code null}\n@return the attribute value, or {@code null}.",
"Builder method for specifying the stack an app should be created on.\n@param stack Stack to create the app on.\n@return A copy of the {@link App}",
"Finish a state transition from a notification.\n\n@param current\n@param next",
"Given a layer ID, search for the WMS layer.\n\n@param layerId layer id\n@return WMS layer or null if layer is not a WMS layer",
"This method inserts a name value pair into internal storage.\n\n@param field task field\n@param value attribute value",
"Sets the target 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 targetTranslator translator\n@return this to allow chaining",
"Divide two complex numbers, in-place\n\n@param c complex number to divide this by\n@param result complex number to hold result\n@return same as result",
"Look-up the results data for a particular test class."
] |
private Properties parseFile(File file) throws InvalidDeclarationFileException {
Properties properties = new Properties();
InputStream is = null;
try {
is = new FileInputStream(file);
properties.load(is);
} catch (Exception e) {
throw new InvalidDeclarationFileException(String.format("Error reading declaration file %s", file.getAbsoluteFile()), e);
} finally {
if (is != null) {
try {
is.close();
} catch (IOException e) {
LOG.error("IOException thrown while trying to close the declaration file.", e);
}
}
}
if (!properties.containsKey(Constants.ID)) {
throw new InvalidDeclarationFileException(String.format("File %s is not a correct declaration, needs to contains an id property", file.getAbsoluteFile()));
}
return properties;
} | [
"Parse the given file to obtains a Properties object.\n\n@param file\n@return a properties object containing all the properties present in the file.\n@throws InvalidDeclarationFileException"
] | [
"Can be overridden if you want to replace or supplement the debug handling for responses.\n\n@param responseCode\n@param inputStream",
"Adds format information to eval.",
"A static method that provides an easy way to create a list of a\ncertain parametric type.\nThis static constructor works better with generics.\n\n@param list The list to pad\n@param padding The padding element (may be null)\n@return The padded list",
"Retrieve the currently cached value for the given document.",
"Log the values for the provided template.\n\n@param templateName the name of the template the values came from\n@param template the template object\n@param values the resultant values",
"Pass the activity you use the drawer in ;)\nThis is required if you want to set any values by resource\n\n@param activity\n@return",
"Helper method to Close all open socket connections and checkin back to\nthe pool\n\n@param storeNamesToCleanUp List of stores to be cleanedup from the current\nstreaming session",
"Convert tenor given as offset in months to year fraction.\n\n@param maturityInMonths The maturity as offset in months.\n@param tenorInMonths The tenor as offset in months.\n@return THe tenor as year fraction.",
"Extent aware Delete by Query\n@param query\n@param cld\n@throws PersistenceBrokerException"
] |
public static Type[] getActualTypeArguments(Type type) {
Type resolvedType = Types.getCanonicalType(type);
if (resolvedType instanceof ParameterizedType) {
return ((ParameterizedType) resolvedType).getActualTypeArguments();
} else {
return EMPTY_TYPES;
}
} | [
"Gets the actual type arguments of a Type\n\n@param type The type to examine\n@return The type arguments"
] | [
"Appends the query part for the facet to the query string.\n@param query The current query string.\n@param name The name of the facet parameter, e.g. \"limit\", \"order\", ....\n@param value The value to set for the parameter specified by name.",
"Extracts the data for a single file from the input stream and writes\nit to a target directory.\n\n@param stream input stream\n@param dir target directory",
"Roll back to the previous configuration.\n\n@throws GeomajasException\nindicates an unlikely problem with the rollback (see cause)",
"Parse a duration in minutes form a number of hours.\n\n@param value String representation\n@return Integer instance",
"Given a symmetric matrix which is represented by a lower triangular matrix convert it back into\na full symmetric matrix.\n\n@param A (Input) Lower triangular matrix (Output) symmetric matrix",
"Extract calendar data from the file.\n\n@throws SQLException",
"Delete a server group by id\n\n@param id server group ID",
"Get top deployment unit.\n\n@param unit the current deployment unit\n@return top deployment unit",
"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."
] |
public TwoDHashMap<K2, K3, V> getAs2d(final K1 firstKey) {
final HashMap<K2, HashMap<K3, V>> innerMap1 = map.get(firstKey);
if( innerMap1 != null ) {
return new TwoDHashMap<K2, K3, V>(innerMap1);
} else {
return new TwoDHashMap<K2, K3, V>();
}
} | [
"Fetch the outermost Hashmap as a TwoDHashMap.\n\n@param firstKey\nfirst key\n@return the the innermost hashmap"
] | [
"Adds the basic sentence.\n\n@param s the s\n@throws ParseException the parse exception",
"Converts Observable of list to Observable of Inner.\n@param innerList list to be converted.\n@param <InnerT> type of inner.\n@return Observable for list of inner.",
"Use this API to fetch auditnslogpolicy_systemglobal_binding resources of given name .",
"Returns the ViewGroup used as a parent for the content view.\n\n@return The content view's parent.",
"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.",
"Called when a previously created loader has finished its load.\n\n@param loader The Loader that has finished.\n@param data The data generated by the Loader.",
"Mark the top level deployment as being a JPA deployment. If the deployment is not a top level deployment the parent is\nmarked instead",
"Adds a resource collection with execution hints.",
"Invokes the method on the class of the passed instance, not the declaring\nclass. Useful with proxies\n\n@param instance The instance to invoke\n@param manager The Bean manager\n@return A reference to the instance"
] |
private String formatRelationList(List<Relation> value)
{
String result = null;
if (value != null && value.size() != 0)
{
StringBuilder sb = new StringBuilder();
for (Relation relation : value)
{
if (sb.length() != 0)
{
sb.append(m_delimiter);
}
sb.append(formatRelation(relation));
}
result = sb.toString();
}
return (result);
} | [
"This method is called to format a relation list.\n\n@param value relation list instance\n@return formatted relation list"
] | [
"Retrieve the currently cached value for the given document.",
"Allows this closeable to be used within the closure, ensuring that it\nis closed once the closure has been executed and before this method returns.\n\n@param self the Closeable\n@param action the closure taking the Closeable as parameter\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 2.4.0",
"Drop down selected view\n\n@param position position of selected item\n@param convertView View of selected item\n@param parent parent of selected view\n@return convertView",
"Helper method to Close all open socket connections and checkin back to\nthe pool\n\n@param storeNamesToCleanUp List of stores to be cleanedup from the current\nstreaming session",
"Append field with quotes and escape characters added, if required.\n\n@return this",
"Specifies an input field to assign a value to. Crawljax first tries to match the found HTML\ninput element's id and then the name attribute.\n\n@param type\nthe type of input field\n@param identification\nthe locator of the input field\n@return an InputField",
"Add \"GROUP BY\" clause to the SQL query statement. This can be called multiple times to add additional \"GROUP BY\"\nclauses.\n\n<p>\nNOTE: Use of this means that the resulting objects may not have a valid ID column value so cannot be deleted or\nupdated.\n</p>",
"Remove pairs with the given keys from the map.\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param keysToRemove the keys of the pairs to remove.\n@since 2.15",
"Method to create a new proxy that wraps the bean instance.\n\n@param beanInstance the bean instance\n@return a new proxy object"
] |
public com.groupon.odo.proxylib.models.Method getMethodForOverrideId(int overrideId) {
com.groupon.odo.proxylib.models.Method method = null;
// special case for IDs < 0
if (overrideId < 0) {
method = new com.groupon.odo.proxylib.models.Method();
method.setId(overrideId);
if (method.getId() == Constants.PLUGIN_RESPONSE_OVERRIDE_CUSTOM ||
method.getId() == Constants.PLUGIN_RESPONSE_HEADER_OVERRIDE_ADD ||
method.getId() == Constants.PLUGIN_RESPONSE_HEADER_OVERRIDE_REMOVE) {
method.setMethodType(Constants.PLUGIN_TYPE_RESPONSE_OVERRIDE);
} else {
method.setMethodType(Constants.PLUGIN_TYPE_REQUEST_OVERRIDE);
}
} else {
// get method information from the database
PreparedStatement queryStatement = null;
ResultSet results = null;
try (Connection sqlConnection = sqlService.getConnection()) {
queryStatement = sqlConnection.prepareStatement(
"SELECT * FROM " + Constants.DB_TABLE_OVERRIDE +
" WHERE " + Constants.GENERIC_ID + " = ?"
);
queryStatement.setInt(1, overrideId);
results = queryStatement.executeQuery();
if (results.next()) {
method = new com.groupon.odo.proxylib.models.Method();
method.setClassName(results.getString(Constants.OVERRIDE_CLASS_NAME));
method.setMethodName(results.getString(Constants.OVERRIDE_METHOD_NAME));
}
} catch (SQLException e) {
e.printStackTrace();
return null;
} finally {
try {
if (results != null) {
results.close();
}
} catch (Exception e) {
}
try {
if (queryStatement != null) {
queryStatement.close();
}
} catch (Exception e) {
}
}
// if method is still null then just return
if (method == null) {
return method;
}
// now get the rest of the data from the plugin manager
// this gets all of the actual method data
try {
method = PluginManager.getInstance().getMethod(method.getClassName(), method.getMethodName());
method.setId(overrideId);
} catch (Exception e) {
// there was some problem.. return null
return null;
}
}
return method;
} | [
"Gets a method based on data in the override_db table\n\n@param overrideId ID of override\n@return Method found"
] | [
"Main method of RendererAdapter. This method has the responsibility of update the\nRendererBuilder values and create or recycle a new Renderer. Once the renderer has been\nobtained the RendereBuilder will call the render method in the renderer and will return the\nRenderer root view to the ListView.\n\nIf rRendererBuilder returns a null Renderer this method will throw a\nNullRendererBuiltException.\n\n@param position to render.\n@param convertView to use to recycle.\n@param parent used to inflate views.\n@return view rendered.",
"Initialize the version properties map from the gradle.properties file, and the additional properties from the\ngradle.properties file.",
"Returns the value of the specified matrix element. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@return The value of the element.",
"Sets the value of the setting with the specified key.\n\n@param key name of the setting\n@param value the setting value\n@return this {@code EnvironmentConfig} instance",
"remove an objects entry from the object registry",
"Use this API to fetch all the sslcipher resources that are configured on netscaler.",
"Use this API to delete gslbsite resources of given names.",
"crates a StencilSet object and add it to the current diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"What is the maximum bounds in screen space? Needed for correct clipping calculation.\n\n@param tile\ntile\n@param panOrigin\npan origin\n@return max screen bbox"
] |
public void process(File file) throws Exception
{
openLogFile();
int blockIndex = 0;
int length = (int) file.length();
m_buffer = new byte[length];
FileInputStream is = new FileInputStream(file);
try
{
int bytesRead = is.read(m_buffer);
if (bytesRead != length)
{
throw new RuntimeException("Read count different");
}
}
finally
{
is.close();
}
List<Integer> blocks = new ArrayList<Integer>();
for (int index = 64; index < m_buffer.length - 11; index++)
{
if (matchPattern(PARENT_BLOCK_PATTERNS, index))
{
blocks.add(Integer.valueOf(index));
}
}
int startIndex = 0;
for (int endIndex : blocks)
{
int blockLength = endIndex - startIndex;
readBlock(blockIndex, startIndex, blockLength);
startIndex = endIndex;
++blockIndex;
}
int blockLength = m_buffer.length - startIndex;
readBlock(blockIndex, startIndex, blockLength);
closeLogFile();
} | [
"Read a FastTrack file.\n\n@param file FastTrack file"
] | [
"Gets a property from system, environment or an external map.\nThe lookup order is system > env > map > defaultValue.\n\n@param name\nThe name of the property.\n@param map\nThe external map.\n@param defaultValue\nThe value that should be used if property is not found.",
"Wrap an existing setter.",
"Get all categories\nGet all tags marked as categories\n@return ApiResponse<TagsEnvelope>\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Retrieve the most recent storepoint.\n\n@param phoenixProject project data\n@return Storepoint instance",
"Use this API to fetch all the sslservice resources that are configured on netscaler.",
"Returns an object which represents the data to be transferred. The class\nof the object returned is defined by the representation class of the flavor.\n\n@param flavor the requested flavor for the data\n@see DataFlavor#getRepresentationClass\n@exception IOException if the data is no longer available\nin the requested flavor.\n@exception UnsupportedFlavorException if the requested data flavor is\nnot supported.",
"Gets an iterable of all the collections for the given user.\n@param api the API connection to be used when retrieving the collections.\n@return an iterable containing info about all the collections.",
"Checks to see if the matrix is symmetric to within tolerance.\n\n@param A Matrix being tested. Not modified.\n@param tol Tolerance that defines how similar two values must be to be considered identical\n@return true if symmetric or false if not",
"Use this API to fetch vpnvserver_auditnslogpolicy_binding resources of given name ."
] |
private Envelope getBoundsLocal(Filter filter) throws LayerException {
try {
Session session = getSessionFactory().getCurrentSession();
Criteria criteria = session.createCriteria(getFeatureInfo().getDataSourceName());
CriteriaVisitor visitor = new CriteriaVisitor((HibernateFeatureModel) getFeatureModel(), dateFormat);
Criterion c = (Criterion) filter.accept(visitor, criteria);
if (c != null) {
criteria.add(c);
}
criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
List<?> features = criteria.list();
Envelope bounds = new Envelope();
for (Object f : features) {
Envelope geomBounds = getFeatureModel().getGeometry(f).getEnvelopeInternal();
if (!geomBounds.isNull()) {
bounds.expandToInclude(geomBounds);
}
}
return bounds;
} catch (HibernateException he) {
throw new HibernateLayerException(he, ExceptionCode.HIBERNATE_LOAD_FILTER_FAIL, getFeatureInfo()
.getDataSourceName(), filter.toString());
}
} | [
"Bounds are calculated locally, can use any filter, but slower than native.\n\n@param filter\nfilter which needs to be applied\n@return the bounds of the specified features\n@throws LayerException\noops"
] | [
"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.",
"Returns the scene graph root.\n\nThis method is part of the wrapped API (see {@link AiWrapperProvider}\nfor details on wrappers).<p>\n\nThe built-in behavior is to return a {@link AiVector}.\n\n@param wrapperProvider the wrapper provider (used for type inference)\n@return the scene graph root",
"Internally undo recorded changes we did so far.\n\n@return whether the state required undo actions",
"Returns the given text with the first letter in upper case.\n\n<h2>Examples:</h2>\n<pre>\ncapitalize(\"hi\") == \"Hi\"\ncapitalize(\"Hi\") == \"Hi\"\ncapitalize(\"hi there\") == \"hi there\"\ncapitalize(\"\") == \"\"\ncapitalize(null) == null\n</pre>\n@param text the text to capitalize\n@return text with the first letter in upper case",
"Returns the active logged in user.",
"Process the next event in a given stream.\n@return the fully processed event\n@throws IOException if a stream is in the wrong state, IO errors can be thrown",
"Returns all the dependencies of a module\n\n@param module Module\n@return List<Dependency>",
"Creates a setter method with the given body.\n\n@param declaringClass the class to which we will add the setter\n@param propertyNode the field to back the setter\n@param setterName the name of the setter\n@param setterBlock the statement representing the setter block",
"If UPDATE, INSERT or DELETE, return BatchPreparedStatement,\notherwise return null."
] |
private static long asciidump(InputStream is, PrintWriter pw) throws Exception
{
byte[] buffer = new byte[BUFFER_SIZE];
long byteCount = 0;
char c;
int loop;
int count;
StringBuilder sb = new StringBuilder();
while (true)
{
count = is.read(buffer);
if (count == -1)
{
break;
}
byteCount += count;
sb.setLength(0);
for (loop = 0; loop < count; loop++)
{
c = (char) buffer[loop];
if (c > 200 || c < 27)
{
c = ' ';
}
sb.append(c);
}
pw.print(sb.toString());
}
return (byteCount);
} | [
"This method dumps the entire contents of a file to an output\nprint writer as ascii data.\n\n@param is Input Stream\n@param pw Output PrintWriter\n@return number of bytes read\n@throws Exception Thrown on file read errors"
] | [
"Send a request that expects a single message as its response, then read and return that response.\n\n@param requestType identifies what kind of request to send\n@param responseType identifies the type of response we expect, or {@code null} if we’ll accept anything\n@param arguments The argument fields to send in the request\n\n@return the response from the player\n\n@throws IOException if there is a communication problem, or if the response does not have the same transaction\nID as the request.",
"Create the log if it does not exist or return back exist log\n\n@param topic the topic name\n@param partition the partition id\n@return read or create a log\n@throws IOException any IOException",
"Get parent digest of an image.\n\n@param digest\n@param host\n@return",
"Finds for the given project.\n\n@param name project name\n@return given project or an empty {@code Optional} if project does not exist\n@throws IllegalArgumentException",
"copy all fields from the \"from\" object to the \"to\" object.\n\n@param from source object\n@param to from's clone\n@param fields fields to be populated\n@param accessible 'true' if all 'fields' have been made accessible during\ntraversal",
"Use this API to add transformpolicy.",
"Provides a collection of all the nodes in the tree\nusing a depth first traversal.\n\n@return the list of (depth-first) ordered nodes",
"Returns true if the string is a valid Java full qualified class name.\n\n@param str the string to be examined\n@return true if str is a valid Java Fqcn",
"Gets or creates id of the entity type.\n\n@param entityType entity type name.\n@param allowCreate if set to true and if there is no entity type like entityType,\ncreate the new id for the entityType.\n@return entity type id."
] |
private static JSONArray parseDockers(ArrayList<Point> dockers) throws JSONException {
if (dockers != null) {
JSONArray dockersArray = new JSONArray();
for (Point docker : dockers) {
JSONObject dockerObject = new JSONObject();
dockerObject.put("x",
docker.getX().doubleValue());
dockerObject.put("y",
docker.getY().doubleValue());
dockersArray.put(dockerObject);
}
return dockersArray;
}
return new JSONArray();
} | [
"Delivers the correct JSON Object for the dockers\n\n@param dockers\n@throws org.json.JSONException"
] | [
"Creates a slice for directly a raw memory address. This is\ninherently unsafe as it may be used to access arbitrary memory.\n\n@param address the raw memory address base\n@param size the size of the slice\n@return the unsafe slice",
"After obtaining a connection, perform additional tasks.\n@param handle\n@param statsObtainTime",
"Generates a diagonal matrix with the input vector on its diagonal\n\n@param vector The given matrix A.\n@return diagonalMatrix The matrix with the vectors entries on its diagonal",
"Calculates a checksum for the specified buffer.\n@param buffer the buffer to calculate.\n@return the checksum value.",
"Helper method used to peel off spurious wrappings of DateTimeException\n\n@param e DateTimeException to peel\n\n@return DateTimeException that does not have another DateTimeException as its cause.",
"Convert an object to a list of maps.\n\n@param mapper the object mapper\n@param source the source object\n@return list",
"Constraint that ensures that the proxy-prefetching-limit has a valid value.\n\n@param def The descriptor (class, reference, collection)\n@param checkLevel The current check level (this constraint is checked in basic and strict)",
"Processes a row of the sites table and stores the site information found\ntherein.\n\n@param siteRow\nstring serialisation of a sites table row as found in the SQL\ndump",
"Add new control at the end of control bar with specified touch listener.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param properties JSON control specific properties\n@param listener touch listener"
] |
protected Object getMacroBeanValue(Object bean, String property) {
Object result = null;
if ((bean != null) && CmsStringUtil.isNotEmptyOrWhitespaceOnly(property)) {
try {
PropertyUtilsBean propBean = BeanUtilsBean.getInstance().getPropertyUtils();
result = propBean.getProperty(bean, property);
} catch (Exception e) {
LOG.error("Unable to access property '" + property + "' of '" + bean + "'.", e);
}
} else {
LOG.info("Invalid parameters: property='" + property + "' bean='" + bean + "'.");
}
return result;
} | [
"Returns the property value read from the given JavaBean.\n\n@param bean the JavaBean to read the property from\n@param property the property to read\n\n@return the property value read from the given JavaBean"
] | [
"Demonstrates obtaining the request history data from a test run",
"Creates the tables according to the schema files.\n\n@throws PlatformException If some error occurred",
"Checks if the required option exists.\n\n@param options OptionSet to checked\n@param opt Required option to check\n@throws VoldemortException",
"Given a date represented by a Calendar instance, set the time\ncomponent of the date based on the hours and minutes of the\ntime supplied by the Date instance.\n\n@param cal Calendar instance representing the date\n@param time Date instance representing the time of day",
"MOVED INSIDE ExpressionUtils\n\nprotected JRDesignExpression getExpressionForConditionalStyle(ConditionalStyle condition, String columExpression) {\nString fieldsMap = \"((\"+DJDefaultScriptlet.class.getName() + \")$P{REPORT_SCRIPTLET}).getCurrentFields()\";\nString parametersMap = \"((\"+DJDefaultScriptlet.class.getName() + \")$P{REPORT_SCRIPTLET}).getCurrentParams()\";\nString variablesMap = \"((\"+DJDefaultScriptlet.class.getName() + \")$P{REPORT_SCRIPTLET}).getCurrentVariables()\";\n\nString evalMethodParams = fieldsMap +\", \" + variablesMap + \", \" + parametersMap + \", \" + columExpression;\n\nString text = \"((\"+ConditionStyleExpression.class.getName()+\")$P{\" + JRParameter.REPORT_PARAMETERS_MAP + \"}.get(\\\"\"+condition.getName()+\"\\\")).\"+CustomExpression.EVAL_METHOD_NAME+\"(\"+evalMethodParams+\")\";\nJRDesignExpression expression = new JRDesignExpression();\nexpression.setValueClass(Boolean.class);\nexpression.setText(text);\nreturn expression;\n}",
"Call the named method\n\n@param obj The object to call the method on\n@param c The class of the object\n@param name The name of the method\n@param args The method arguments\n@return The result of the method",
"in truth we probably only need the types as injected by the metadata binder",
"Determine the enum value corresponding to the track source slot found in the packet.\n\n@return the proper value",
"Code common to both XER and database readers to extract\ncurrency format data.\n\n@param row row containing currency data"
] |
public static base_response expire(nitro_service client, cachecontentgroup resource) throws Exception {
cachecontentgroup expireresource = new cachecontentgroup();
expireresource.name = resource.name;
return expireresource.perform_operation(client,"expire");
} | [
"Use this API to expire cachecontentgroup."
] | [
"Shutdown the container.\n\n@see Weld#initialize()",
"Produces a string in which the lower 4 bytes are expressed as an IPv4 address and the remaining upper bytes are expressed in IPv6 format.\n\nThis the mixed IPv6/IPv4 format described in RFC 1884 https://tools.ietf.org/html/rfc1884\n\n@return",
"Adds the file to the tar archive represented by output stream. It's caller's responsibility to close output stream\nproperly.\n\n@param out target archive.\n@param source file to be added.\n@param fileSize size of the file (which is known in most cases).\n@throws IOException in case of any issues with underlying store.",
"Set the main attribute \"Bundle-RequiredExecutionEnvironment\" to the given\nvalue.\n\n@param bree The new value",
"Gets validation errors either as a JSON string, or null if there are no validation errors.\n\n@return the validation error JSON",
"Obtains a Ethiopic local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Take four bytes from the specified position in the specified\nblock and convert them into a 32-bit int, using the big-endian\nconvention.\n@param bytes The data to read from.\n@param offset The position to start reading the 4-byte int from.\n@return The 32-bit integer represented by the four bytes.",
"Checks if maintenance mode is enabled for the given app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@return true if maintenance mode is enabled",
"Convenience method for retrieving a char resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value"
] |
public static double ratioSmallestOverLargest( double []sv ) {
if( sv.length == 0 )
return Double.NaN;
double min = sv[0];
double max = min;
for (int i = 1; i < sv.length; i++) {
double v = sv[i];
if( v > max )
max = v;
else if( v < min )
min = v;
}
return min/max;
} | [
"Computes the ratio of the smallest value to the largest. Does not assume\nthe array is sorted first\n@param sv array\n@return smallest / largest"
] | [
"Gets the positions.\n\n@return the positions",
"Set the TimeSensor's cycleInterval property\nCurrently, this does not change the duration of the animation.\n@param newCycleInterval",
"Read custom property definitions for resources.\n\n@param gpResources GanttProject resources",
"Check whether the value is matched by a regular expression.\n\n@param value value\n@param regex regular expression\n@return true when value is matched",
"Updates the model. Ensures that we reset the columns widths.\n\n@param model table model",
"Returns the complete record for a single section.\n\n@param section The section to get.\n@return Request object",
"Determine the height of the preview given an index into it.\n\n@param segment the index of the waveform preview segment to examine\n@param front if {@code true} the height of the front (brighter) segment of a color waveform preview is returned,\notherwise the height of the back (dimmer) segment is returned. Has no effect for blue previews.\n\n@return a value from 0 to 31 representing the height of the waveform at that segment, which may be an average\nof a number of values starting there, determined by the scale",
"With this impl, it only returns the same credentials once. Otherwise it's possible that a loop will occur.\nWhen server returns status code 401, the HTTP client provides the same credentials forever.\nSince we create a new HTTP client for every request, we can handle it this way.",
"Call the constructor for the given class, inferring the correct types for\nthe arguments. This could be confusing if there are multiple constructors\nwith the same number of arguments and the values themselves don't\ndisambiguate.\n\n@param klass The class to construct\n@param args The arguments\n@return The constructed value"
] |
@Override
public void close() {
// Use monitor to avoid race between external close and handler thread run()
synchronized (closeMonitor) {
// Close and clear streams, sockets etc.
if (socket != null) {
try {
// Terminates thread blocking on socket read
// and automatically closed depending streams
socket.close();
} catch (IOException e) {
log.warn("Can not close socket", e);
} finally {
socket = null;
}
}
// Clear user data
session = null;
response = null;
}
} | [
"Resets the handler data to a basic state."
] | [
"Adds new connections to the partition.\n@param connectionsToCreate number of connections to create\n@throws InterruptedException",
"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",
"Specify the artifact configuration to be searched for\n@param artifact configured artifact object\n@return",
"Create the close button UI Component.\n@return the close button.",
"Checks for duplicate elements. A is sorted\n@param A Matrix to be tested.\n@return true if duplicates or false if false duplicates",
"Returns the duration of the measured tasks in ms",
"Use this API to fetch a rewriteglobal_binding resource .",
"Log error information",
"This method computes the list of unnamed parameters, by filtering the\nlist of raw arguments, stripping out the named parameters."
] |
public void switchDataSource(BoneCPConfig newConfig) throws SQLException {
logger.info("Switch to new datasource requested. New Config: "+newConfig);
DataSource oldDS = getTargetDataSource();
if (!(oldDS instanceof BoneCPDataSource)){
throw new SQLException("Unknown datasource type! Was expecting BoneCPDataSource but received "+oldDS.getClass()+". Not switching datasource!");
}
BoneCPDataSource newDS = new BoneCPDataSource(newConfig);
newDS.getConnection().close(); // initialize a connection (+ throw it away) to force the datasource to initialize the pool
// force application to start using the new one
setTargetDataSource(newDS);
logger.info("Shutting down old datasource slowly. Old Config: "+oldDS);
// tell the old datasource to terminate. This terminates the pool lazily so existing checked out connections can still be used.
((BoneCPDataSource)oldDS).close();
} | [
"Switch to a new DataSource using the given configuration.\n@param newConfig BoneCP DataSource to use.\n@throws SQLException"
] | [
"This creates a new audit log file with default permissions.\n\n@param file File to create",
"For internal use, don't call the public API internally",
"Convert a url to a file object. No checks are made to see if file exists but there are some hacks that\nare needed to convert uris to files across platforms.\n\n@param fileURI the uri to convert",
"Extract data for a single task.\n\n@param parent task parent\n@param row Synchro task data",
"Load the available layers.\n\n@param image the installed image\n@param productConfig the product config to establish the identity\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the layers\n@throws IOException",
"Loads the tag definitions from the files with a \".tags.xml\" suffix from the addons.",
"The mediator registration config. If it contains default config and definitions,\nthen the dynamic config will be initialized with those values.\n\n@see org.openhim.mediator.engine.RegistrationConfig\n@see #getDynamicConfig()",
"Read FTS file data from the configured source and return a populated ProjectFile instance.\n\n@return ProjectFile instance",
"Call the constructor for the given class, inferring the correct types for\nthe arguments. This could be confusing if there are multiple constructors\nwith the same number of arguments and the values themselves don't\ndisambiguate.\n\n@param klass The class to construct\n@param args The arguments\n@return The constructed value"
] |
public void destroy() throws Exception {
if (_clientId == null) {
return;
}
// delete the clientId here
String uri = BASE_PROFILE + uriEncode(_profileName) + "/" + BASE_CLIENTS + "/" + _clientId;
try {
doDelete(uri, null);
} catch (Exception e) {
// some sort of error
throw new Exception("Could not delete a proxy client");
}
} | [
"Call when you are done with the client\n\n@throws Exception"
] | [
"The nullity of the decomposed matrix.\n\n@see SingularOps_DDRM#nullity(SingularValueDecomposition_F64, double)\n\n@return The matrix's nullity",
"Adds the parent package to the java.protocol.handler.pkgs system property.",
"Removes the given value to the set.\n\n@return true if the value was actually removed",
"Use this API to delete dnssuffix of given name.",
"Returns the y-coordinate of a vertex bitangent.\n\n@param vertex the vertex index\n@return the y coordinate",
"Compress a directory into a zip file\n\n@param dir Directory\n@param zipFile ZIP file to create\n@throws IOException I/O Error",
"Convenience method which locates the first P3 database in a directory\nand opens it.\n\n@param directory directory containing a P3 database\n@return ProjectFile instance",
"Use this API to update sslcertkey.",
"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."
] |
private static String getHostname() {
if (Hostname == null) {
try {
Hostname = InetAddress.getLocalHost().getHostName();
} catch (Exception e) {
Hostname = "default";
LOGGER.warn("Can not get current hostname", e);
}
}
return Hostname;
} | [
"Save current hostname and reuse it.\n\n@return hostname as String"
] | [
"Reads input data from a JSON file in the output directory.",
"Use this API to fetch all the systemeventhistory resources that are configured on netscaler.\nThis uses systemeventhistory_args which is a way to provide additional arguments while fetching the resources.",
"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.",
"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)",
"Ensures that the specified fields are present in the given class.\n\n@param classDef The class to copy the fields into\n@param fields The fields to copy\n@throws ConstraintException If there is a conflict between the new fields and fields in the class",
"Checks that native primarykey fields have readonly access, and warns if not.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)",
"Adds main report query.\n\n@param text\n@param language use constants from {@link DJConstants}\n@return",
"Set a knot blend type.\n@param n the knot index\n@param type the knot blend type\n@see #getKnotBlend",
"Return input mapper from processor."
] |
public Where<T, ID> between(String columnName, Object low, Object high) throws SQLException {
addClause(new Between(columnName, findColumnFieldType(columnName), low, high));
return this;
} | [
"Add a BETWEEN clause so the column must be between the low and high parameters."
] | [
"Converts an absolute rectangle to a relative one wrt to the current coordinate system.\n\n@param rect absolute rectangle\n@return relative rectangle",
"Returns all tags that designate this tag. E.g., for \"tesla-model3\", this would return \"car\", \"vehicle\", \"vendor-tesla\" etc.",
"Changes the given filenames suffix from the current suffix to the provided suffix.\n\n<b>Directly exposed for JSP EL</b>, not through {@link org.opencms.jsp.util.CmsJspElFunctions}.<p>\n\n@param filename the filename to be changed\n@param suffix the new suffix of the file\n\n@return the filename with the replaced suffix",
"Print the parameters of the parameterized type t",
"Starts advertising on Hyperbahn at a fixed interval.\n\n@return a future that resolves to the response of the first advertise request",
"Sets the value of a UDF.\n\n@param udf user defined field\n@param dataType MPXJ data type\n@param value field value",
"Shrinks the alert message body so that the resulting payload\nmessage fits within the passed expected payload length.\n\nThis method performs best-effort approach, and its behavior\nis unspecified when handling alerts where the payload\nwithout body is already longer than the permitted size, or\nif the break occurs within word.\n\n@param payloadLength the expected max size of the payload\n@param postfix for the truncated body, e.g. \"...\"\n@return this",
"Invalidate layout setup.",
"Use this API to fetch all the lbvserver resources that are configured on netscaler."
] |
private void writeExceptions9(List<Project.Calendars.Calendar.WeekDays.WeekDay> dayList, List<ProjectCalendarException> exceptions)
{
for (ProjectCalendarException exception : exceptions)
{
boolean working = exception.getWorking();
Project.Calendars.Calendar.WeekDays.WeekDay day = m_factory.createProjectCalendarsCalendarWeekDaysWeekDay();
dayList.add(day);
day.setDayType(BIGINTEGER_ZERO);
day.setDayWorking(Boolean.valueOf(working));
Project.Calendars.Calendar.WeekDays.WeekDay.TimePeriod period = m_factory.createProjectCalendarsCalendarWeekDaysWeekDayTimePeriod();
day.setTimePeriod(period);
period.setFromDate(exception.getFromDate());
period.setToDate(exception.getToDate());
if (working)
{
Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes times = m_factory.createProjectCalendarsCalendarWeekDaysWeekDayWorkingTimes();
day.setWorkingTimes(times);
List<Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes.WorkingTime> timesList = times.getWorkingTime();
for (DateRange range : exception)
{
Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes.WorkingTime time = m_factory.createProjectCalendarsCalendarWeekDaysWeekDayWorkingTimesWorkingTime();
timesList.add(time);
time.setFromTime(range.getStart());
time.setToTime(range.getEnd());
}
}
}
} | [
"Write exceptions in the format used by MSPDI files prior to Project 2007.\n\n@param dayList list of calendar days\n@param exceptions list of exceptions"
] | [
"Checks if there's exactly one option that exists among all opts.\n\n@param options OptionSet to checked\n@param opts List of options to be checked\n@throws VoldemortException",
"Login the user and redirect back to original URL. If no\noriginal URL found then redirect to `defaultLandingUrl`.\n\n@param userIdentifier\nthe user identifier, could be either userId or username\n@param defaultLandingUrl\nthe URL to be redirected if original URL not found",
"Use this API to fetch the statistics of all lbvserver_stats resources that are configured on netscaler.",
"Determine which field the Activity ID has been mapped to.\n\n@param map field map\n@return field",
"Adjust the visible columns.",
"Get a misc file.\n\n@param root the root\n@param item the misc content item\n@return the misc file",
"Wrap an operation's parameters in a simple encapsulating object\n@param operation the operation\n@param messageHandler the message handler\n@param attachments the attachments\n@return the encapsulating object",
"Convert an object to a list.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target list element type\n@return list",
"Command-line version of the classifier. See the class\ncomments for examples of use, and SeqClassifierFlags\nfor more information on supported flags."
] |
public void setFirstOccurence(int min, int max) throws ParseException {
if (fullCondition == null) {
if ((min < 0) || (min > max) || (max < 1)) {
throw new ParseException("Illegal number {" + min + "," + max + "}");
}
if (min == 0) {
firstOptional = true;
}
firstMinimumOccurence = Math.max(1, min);
firstMaximumOccurence = max;
} else {
throw new ParseException("fullCondition already generated");
}
} | [
"Sets the first occurence.\n\n@param min the min\n@param max the max\n@throws ParseException the parse exception"
] | [
"Sets a JSON String as a request entity.\n\n@param connnection The request of {@link HttpConnection}\n@param body The JSON String to set.",
"Sets the SCXML model with an InputStream\n\n@param inputFileStream the model input stream",
"Create and return a new Violation for this rule and the specified values\n@param lineNumber - the line number for the violation; may be null\n@param sourceLine - the source line for the violation; may be null\n@param message - the message for the violation; may be null\n@return a new Violation object",
"Start a timer of the given string name for the current 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",
"Load the given class using the default constructor\n\n@param className The name of the class\n@return The class object",
"Check if a dependency matches the filters\n\n@param dependency\n\n@return boolean",
"Populates a resource availability table.\n\n@param table resource availability table\n@param data file data",
"Load a list of entities using the information in the context\n\n@param session The session\n@param lockOptions The locking details\n@param ogmContext The context with the information to load the entities\n@return the list of entities corresponding to the given context",
"Determines the field name based on an accessor method name.\n\n@param methodName\nan accessor method name\n@return the resulting field name"
] |
private List<Event> filterEvents(List<Event> events) {
List<Event> filteredEvents = new ArrayList<Event>();
for (Event event : events) {
if (!filter(event)) {
filteredEvents.add(event);
}
}
return filteredEvents;
} | [
"Filter events.\n\n@param events the events\n@return the list of filtered events"
] | [
"Create a MfClientHttpRequestFactory for adding the specified headers.\n\n@param requestFactory the basic request factory. It should be unmodified and just wrapped with\na proxy class.\n@param matchers The matchers.\n@param headers The headers.\n@return",
"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.",
"get the default profile\n\n@return representation of default profile\n@throws Exception exception",
"Apply issues tracker info to a build info builder (used by generic tasks and maven2 which doesn't use the extractor",
"Returns all values that can be selected in the widget.\n@param cms the current CMS object\n@param rootPath the root path to the currently edited xml file (sitemap config)\n@param allRemoved flag, indicating if all inheritedly available formatters should be disabled\n@return all values that can be selected in the widget.",
"A specific, existing project can be deleted by making a DELETE request\non the URL for that project.\n\nReturns an empty data record.\n\n@param project The project to delete.\n@return Request object",
"Returns the naming context.",
"Process hours in a working day.\n\n@param calendar project calendar\n@param dayRecord working day data",
"Logs the time taken by this rule, and attaches this to the total for the RuleProvider"
] |
public static base_response unset(nitro_service client, inatparam resource, String[] args) throws Exception{
inatparam unsetresource = new inatparam();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of inatparam resource.\nProperties that need to be unset are specified in args array."
] | [
"Determine if a CharSequence can be parsed as a BigDecimal.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isBigDecimal(String)\n@since 1.8.2",
"Reopen the associated static logging stream. Set to null to redirect to System.out.",
"Use this API to fetch wisite_binding resource of given name .",
"Read the name of a table and prepare to populate it with column data.\n\n@param startIndex start of the block\n@param blockLength length of the block",
"Use this API to fetch server_service_binding resources of given name .",
"Get logs for an app by specifying additional parameters.\n@param logRequest See {LogRequestBuilder}\n@return log stream response",
"Marks inbox message as read for given messageId\n@param messageId String messageId\n@return boolean value depending on success of operation",
"Return a list of place IDs for a query string.\n\nThe flickr.places.find method is not a geocoder. It will round \"up\" to the nearest place type to which place IDs apply. For example, if you pass it a\nstreet level address it will return the city that contains the address rather than the street, or building, itself.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param query\n@return PlacesList\n@throws FlickrException",
"Assigns retention policy with givenID to folder or enterprise.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param assignTo object representing folder or enterprise to assign policy to.\n@return info about created assignment."
] |
protected void aliasGeneric( Object variable , String name ) {
if( variable.getClass() == Integer.class ) {
alias(((Integer)variable).intValue(),name);
} else if( variable.getClass() == Double.class ) {
alias(((Double)variable).doubleValue(),name);
} else if( variable.getClass() == DMatrixRMaj.class ) {
alias((DMatrixRMaj)variable,name);
} else if( variable.getClass() == FMatrixRMaj.class ) {
alias((FMatrixRMaj)variable,name);
} else if( variable.getClass() == DMatrixSparseCSC.class ) {
alias((DMatrixSparseCSC)variable,name);
} else if( variable.getClass() == SimpleMatrix.class ) {
alias((SimpleMatrix) variable, name);
} else if( variable instanceof DMatrixFixed ) {
DMatrixRMaj M = new DMatrixRMaj(1,1);
ConvertDMatrixStruct.convert((DMatrixFixed)variable,M);
alias(M,name);
} else if( variable instanceof FMatrixFixed ) {
FMatrixRMaj M = new FMatrixRMaj(1,1);
ConvertFMatrixStruct.convert((FMatrixFixed)variable,M);
alias(M,name);
} else {
throw new RuntimeException("Unknown value type of "+
(variable.getClass().getSimpleName())+" for variable "+name);
}
} | [
"Aliases variables with an unknown type.\n@param variable The variable being aliased\n@param name Name of the variable"
] | [
"Returns a new analysis context builder that extracts the information about the available extensions from\nthe provided Revapi instance.\n\n<p>The extensions have to be known so that both old and new style of configuration can be usefully worked with.\n\n@param revapi the revapi instance to read the available extensions from\n@return a new analysis context builder",
"Creates the .story file necessary for every Beast Test Case.\n\n@param scenarioName\n- The name of the scenario, with spaces\n@param srcTestRootFolder\n- The test root folder\n@param packagePath\n- The package of the BeastTestCase\n@param scenarioDescription\n- the scenario name\n@param givenDescription\n- The given description\n@param whenDescription\n- The when description\n@param thenDescription\n- The then description\n@throws BeastException",
"Overloads the left shift operator to provide syntactic sugar for appending to a StringBuilder.\n\n@param self a StringBuilder\n@param value an Object\n@return the original StringBuilder\n@since 1.8.2",
"Try to link the declaration with the importerService referenced by the ServiceReference,.\nreturn true if they have been link together, false otherwise.\n\n@param declaration The Declaration\n@param declarationBinderRef The ServiceReference<S> of S\n@return true if they have been link together, false otherwise.",
"Sets the specified integer 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",
"Stops the scavenger.",
"This method writes data for a single calendar to an MSPDI file.\n\n@param bc Base calendar data\n@return New MSPDI calendar instance",
"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",
"On host controller reload, remove a not running server registered in the process controller declared as down."
] |
public static <T> void filterListToMap(final Map<String, T> destinationMap, final String[] nameMapping,
final List<? extends T> sourceList) {
if( destinationMap == null ) {
throw new NullPointerException("destinationMap should not be null");
} else if( nameMapping == null ) {
throw new NullPointerException("nameMapping should not be null");
} else if( sourceList == null ) {
throw new NullPointerException("sourceList should not be null");
} else if( nameMapping.length != sourceList.size() ) {
throw new SuperCsvException(
String
.format(
"the nameMapping array and the sourceList should be the same size (nameMapping length = %d, sourceList size = %d)",
nameMapping.length, sourceList.size()));
}
destinationMap.clear();
for( int i = 0; i < nameMapping.length; i++ ) {
final String key = nameMapping[i];
if( key == null ) {
continue; // null's in the name mapping means skip column
}
// no duplicates allowed
if( destinationMap.containsKey(key) ) {
throw new SuperCsvException(String.format("duplicate nameMapping '%s' at index %d", key, i));
}
destinationMap.put(key, sourceList.get(i));
}
} | [
"Converts a List to a Map using the elements of the nameMapping array as the keys of the Map.\n\n@param destinationMap\nthe destination Map (which is cleared before it's populated)\n@param nameMapping\nthe keys of the Map (corresponding with the elements in the sourceList). Cannot contain duplicates.\n@param sourceList\nthe List to convert\n@param <T>\nthe type of the values in the map\n@throws NullPointerException\nif destinationMap, nameMapping or sourceList are null\n@throws SuperCsvException\nif nameMapping and sourceList are not the same size"
] | [
"Add a value to this activity code.\n\n@param uniqueID value unique ID\n@param name value name\n@param description value description\n@return ActivityCodeValue instance",
"Use this API to expire cachecontentgroup resources.",
"Retrieves the members of the given type.\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 Members attribute\n@param paramValue The feature to be added to the Members attribute\n@throws XDocletException If an error occurs",
"adds a CmsJspImageBean as hi-DPI variant to this image\n@param factor the variant multiplier, e.g. \"2x\" (the common retina multiplier)\n@param image the image to be used for this variant",
"Saves meta tree, writes database root and flushes the log.\n\n@param metaTree mutable meta tree\n@param env enclosing environment\n@param expired expired loggables (database root to be added)\n@return database root loggable which is read again from the log.",
"Attempts to checkout a resource so that one queued request can be\nserviced.\n\n@param key The key for which to process the requestQueue\n@return true iff an item was processed from the Queue.",
"Makes sure that there is a class definition for the given qualified name, and returns it.\n\n@param original The XDoclet class object\n@return The class definition",
"Computes the likelihood of the random draw\n\n@return The likelihood.",
"Reads the text files in the given directory and puts their content\nin the given map after compressing it. Note that this method does not\ntraverse recursivly into sub-directories.\n\n@param dir The directory to process\n@param results Map that will receive the contents (indexed by the relative filenames)\n@throws IOException If an error ocurred"
] |
public boolean hasUppercaseVariations(int base, boolean lowerOnly) {
if(base > 10) {
int count = getSegmentCount();
for(int i = 0; i < count; i++) {
IPv6AddressSegment seg = getSegment(i);
if(seg.hasUppercaseVariations(base, lowerOnly)) {
return true;
}
}
}
return false;
} | [
"Returns whether this subnet or address has alphabetic digits when printed.\n\nNote that this method does not indicate whether any address contained within this subnet has alphabetic digits,\nonly whether the subnet itself when printed has alphabetic digits.\n\n@return whether the section has alphabetic digits when printed."
] | [
"Computes A-B\n\n@param listA\n@param listB\n@return",
"Update the descriptor content with values from the editor.\n@throws CmsXmlException thrown if update fails due to a wrong XML structure (should never happen)",
"Use this API to update snmpuser resources.",
"Get the last non-white X point\n@param img Image in memory\n@return the trimmed width",
"Returns the locale specified by the named scoped attribute or context\nconfiguration parameter.\n\n<p> The named scoped attribute is searched in the page, request,\nsession (if valid), and application scope(s) (in this order). If no such\nattribute exists in any of the scopes, the locale is taken from the\nnamed context configuration parameter.\n\n@param pageContext the page in which to search for the named scoped\nattribute or context configuration parameter\n@param name the name of the scoped attribute or context configuration\nparameter\n\n@return the locale specified by the named scoped attribute or context\nconfiguration parameter, or <tt>null</tt> if no scoped attribute or\nconfiguration parameter with the given name exists",
"Helper function to create JsonArray from collection.\n\n@param values collection of values to convert to JsonArray\n@return JsonArray with collection values",
"Adapt the size of the tiles so that we have the same amount of tiles as we would have had with maxWidth\nand maxHeight, but with the smallest tiles as possible.",
"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",
"Returns all the elements in the sorted set with a score in the given range.\nIn contrary to the default ordering of sorted sets, for this command the elements are considered to be ordered\nfrom high to low scores.\nThe elements having the same score are returned in reverse lexicographical order.\n@param scoreRange\n@return elements in the specified score range"
] |
private static char[] buildTable() {
char[] table = new char[26];
for (int ix = 0; ix < table.length; ix++)
table[ix] = '0';
table['B' - 'A'] = '1';
table['P' - 'A'] = '1';
table['F' - 'A'] = '1';
table['V' - 'A'] = '1';
table['C' - 'A'] = '2';
table['S' - 'A'] = '2';
table['K' - 'A'] = '2';
table['G' - 'A'] = '2';
table['J' - 'A'] = '2';
table['Q' - 'A'] = '2';
table['X' - 'A'] = '2';
table['Z' - 'A'] = '2';
table['D' - 'A'] = '3';
table['T' - 'A'] = '3';
table['L' - 'A'] = '4';
table['M' - 'A'] = '5';
table['N' - 'A'] = '5';
table['R' - 'A'] = '6';
return table;
} | [
"Builds the mapping table."
] | [
"Populates the project header.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException",
"Merges the immutable container types of this Configuration with the given\nConfiguration.\n\nThe resultant immutable container types results will be the union of the two sets of\nimmutable container types. Where the type is found in both\nConfigurations, the result from otherConfiguration will replace the\nexisting result in this Configuration. This replacement behaviour will\noccur for subsequent calls to\n{@link #mergeImmutableContainerTypesFrom(Configuration)} .\n\n@param otherConfiguration - Configuration to merge immutable container types with.",
"Set the replace of the uri and return the new URI.\n\n@param initialUri the starting URI, the URI to update\n@param path the path to set on the baeURI",
"Given a string which is either the name of a predefined tab configuration or a configuration string, returns\nthe corresponding tab configuration.\n\n@param configStr a configuration string or predefined configuration name\n\n@return the gallery tab configuration",
"Update server mapping's host header\n\n@param serverMappingId ID of server mapping\n@param hostHeader value of host header\n@return updated ServerRedirect",
"Use this API to add authenticationradiusaction.",
"Detects if the current device is a mobile device.\nThis method catches most of the popular modern devices.\nExcludes Apple iPads and other modern tablets.\n@return detection of any mobile device using the quicker method",
"Method signature without \"public void\" prefix\n\n@return The method signature in String format",
"In the 3.0 xsd the vault configuration and its options are part of the vault xsd.\n\n@param reader the reader at the vault element\n@param expectedNs the namespace\n@return the vault configuration"
] |
private void onChangedImpl(final int preferableCenterPosition) {
for (ListOnChangedListener listener: mOnChangedListeners) {
listener.onChangedStart(this);
}
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "onChangedImpl(%s): items [%d] views [%d] mLayouts.size() = %d " +
"preferableCenterPosition = %d",
getName(), getDataCount(), getViewCount(), mContent.mLayouts.size(), preferableCenterPosition);
// TODO: selectively recycle data based on the changes in the data set
mPreferableCenterPosition = preferableCenterPosition;
recycleChildren();
} | [
"This method is called if the data set has been changed. Subclasses might want to override\nthis method to add some extra logic.\n\nGo through all items in the list:\n- reuse the existing views in the list\n- add new views in the list if needed\n- trim the unused views\n- request re-layout\n\n@param preferableCenterPosition the preferable center position. If it is -1 - keep the\ncurrent center position."
] | [
"Throws one RendererException if the viewType, layoutInflater or parent are null.",
"Retrieve the result produced by a task with the given id in the group.\n\nThis method can be used to retrieve the result of invocation of both dependency\nand \"post-run\" dependent tasks. If task with the given id does not exists then\nIllegalArgumentException exception will be thrown.\n\n@param taskId the task item id\n@return the task result, null will be returned if task has not yet been invoked",
"returns an Array with an Objects CURRENT locking VALUES , BRJ\n@throws PersistenceBrokerException if there is an erros accessing o field values",
"Gets the string describing the uniforms used by shaders of this type.\n@param ctx GVFContext shader is associated with\n@return uniform descriptor string\n@see #getTemplate(GVRContext) GVRShader#getUniformDescriptor()",
"Closes the server socket.",
"This method generates a list of lists. Each list represents the data\nfor an embedded object, and contains set set of RTFEmbeddedObject instances\nthat make up the embedded object. This method will return null\nif there are no embedded objects in the RTF document.\n\n@param text RTF document\n@return list of lists of RTFEmbeddedObject instances",
"Use this API to update snmpuser.",
"Creates a CSS rgb specification from a PDF color\n@param pdcolor\n@return the rgb() string",
"Returns a the list of available version of an artifact\n\n@param gavc String\n@return List<String>"
] |
public static BMatrixRMaj randomBinary(int numRow , int numCol , Random rand ) {
BMatrixRMaj mat = new BMatrixRMaj(numRow,numCol);
setRandomB(mat, rand);
return mat;
} | [
"Returns new boolean matrix with true or false values selected with equal probability.\n\n@param numRow Number of rows in the new matrix.\n@param numCol Number of columns in the new matrix.\n@param rand Random number generator used to fill the matrix.\n@return The randomly generated matrix."
] | [
"Flush this log file to the physical disk\n\n@throws IOException file read error",
"Do not call directly.\n@deprecated",
"Creates the next permutation in the sequence.\n\n@return An array containing the permutation. The returned array is modified each time this function is called.",
"Find the scheme to use to connect to the service.\nUses java annotations first and if not found, uses kubernetes annotations on the service object.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved scheme of 'http' as a fallback.",
"Find the user by their email address.\n\nThis method does not require authentication.\n\n@param email\nThe email address\n@return The User\n@throws FlickrException",
"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",
"Detaches or removes the value from 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}.",
"Decomposes the provided matrix and stores the result in the same matrix.\n\n@param A Matrix that is to be decomposed. Modified.\n@return If it succeeded or not.",
"Shuffle an array.\n\n@param array Array.\n@param seed Random seed."
] |
private List<ResourceField> getAllResourceExtendedAttributes()
{
ArrayList<ResourceField> result = new ArrayList<ResourceField>();
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_TEXT));
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_START));
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_FINISH));
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_COST));
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_DATE));
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_FLAG));
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_NUMBER));
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_DURATION));
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_OUTLINE_CODE));
result.addAll(Arrays.asList(ResourceFieldLists.ENTERPRISE_COST));
result.addAll(Arrays.asList(ResourceFieldLists.ENTERPRISE_DATE));
result.addAll(Arrays.asList(ResourceFieldLists.ENTERPRISE_DURATION));
result.addAll(Arrays.asList(ResourceFieldLists.ENTERPRISE_FLAG));
result.addAll(Arrays.asList(ResourceFieldLists.ENTERPRISE_NUMBER));
result.addAll(Arrays.asList(ResourceFieldLists.ENTERPRISE_TEXT));
return result;
} | [
"Retrieve list of resource extended attributes.\n\n@return list of extended attributes"
] | [
"Use this API to Import responderhtmlpage.",
"Converts this update description to its document representation as it would appear in a\nMongoDB Change Event.\n\n@return the update description document as it would appear in a change event",
"Returns an iterator over the items in this collection.\n@return an iterator over the items in this collection.",
"Inserts an array of Parcelable values into the mapping of the underlying Bundle, replacing any\nexisting value for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value an array of Parcelable objects, or null\n@return this bundler instance to chain method calls",
"A factory method for users that need to report success without actually running any analysis. The returned\nresult will be successful, but will not contain the actual configurations of extensions.\n\n@return a \"fake\" successful analysis result",
"Removes a child task.\n\n@param child child task instance",
"Use this API to delete dnspolicylabel of given name.",
"Detect numbers using comma as a decimal separator and replace with period.\n\n@param value original numeric value\n@return corrected numeric value",
"Creates a new Terms of Services.\n@param api the API connection to be used by the resource.\n@param termsOfServiceStatus the current status of the terms of services. Set to \"enabled\" or \"disabled\".\n@param termsOfServiceType the scope of terms of service. Set to \"external\" or \"managed\".\n@param text the text field of terms of service containing terms of service agreement info.\n@return information about the Terms of Service created."
] |
public static void applyDecidedIconOrSetGone(ImageHolder imageHolder, ImageView imageView, int iconColor, boolean tint) {
if (imageHolder != null && imageView != null) {
Drawable drawable = ImageHolder.decideIcon(imageHolder, imageView.getContext(), iconColor, tint);
if (drawable != null) {
imageView.setImageDrawable(drawable);
imageView.setVisibility(View.VISIBLE);
} else if (imageHolder.getBitmap() != null) {
imageView.setImageBitmap(imageHolder.getBitmap());
imageView.setVisibility(View.VISIBLE);
} else {
imageView.setVisibility(View.GONE);
}
} else if (imageView != null) {
imageView.setVisibility(View.GONE);
}
} | [
"decides which icon to apply or hide this view\n\n@param imageHolder\n@param imageView\n@param iconColor\n@param tint"
] | [
"Adds a shutdown hook for the process.\n\n@param process the process to add a shutdown hook for\n\n@return the thread set as the shutdown hook\n\n@throws java.lang.SecurityException If a security manager is present and it denies {@link\njava.lang.RuntimePermission <code>RuntimePermission(\"shutdownHooks\")</code>}",
"Use this API to delete appfwlearningdata.",
"Gets the Symmetric Chi-square divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Symmetric chi-square divergence between p and q.",
"Try to kill a given process.\n\n@param processName the process name\n@param id the process integer id, or {@code -1} if this is not relevant\n@return {@code true} if the command succeeded, {@code false} otherwise",
"Process StepFinishedEvent. Change last added to stepStorage step\nand add it as child of previous step.\n\n@param event to process",
"Creates a new GridLines instance.\n\n@param data data block\n@param offset offset into data block\n@return new GridLines instance",
"Returns the index of the first invalid character of the zone, or -1 if the zone is valid\n\n@param sequence\n@return",
"Send an error to the client with an exception.\n\n@param httpServletResponse the http response to send the error to\n@param e the error that occurred",
"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"
] |
private static Interval parseStartExtended(CharSequence startStr, CharSequence endStr) {
Instant start = Instant.parse(startStr);
if (endStr.length() > 0) {
char c = endStr.charAt(0);
if (c == 'P' || c == 'p') {
PeriodDuration amount = PeriodDuration.parse(endStr);
// addition of PeriodDuration only supported by OffsetDateTime,
// but to make that work need to move point being added to closer to EPOCH
long move = start.isBefore(Instant.EPOCH) ? 1000 * 86400 : -1000 * 86400;
Instant end = start.plusSeconds(move).atOffset(ZoneOffset.UTC).plus(amount).toInstant().minusSeconds(move);
return Interval.of(start, end);
}
}
// infer offset from start if not specified by end
return parseEndDateTime(start, ZoneOffset.UTC, endStr);
} | [
"handle case where Instant is outside the bounds of OffsetDateTime"
] | [
"Sets the ssh password.\n\n@param password\nthe password\n@return the parallel task builder",
"Attachments are only structurally different if one step has an inline attachment\nand the other step either has no inline attachment or the inline attachment is\ndifferent.",
"The Cost Variance field shows the difference between the baseline cost\nand total cost for a task. The total cost is the current estimate of costs\nbased on actual costs and remaining costs.\n\n@return amount",
"Get the real Object\n\n@param objectOrProxy\n@return Object",
"This method allows a resource assignment workgroup fields record\nto be added to the current resource assignment. A maximum of\none of these records can be added to a resource assignment record.\n\n@return ResourceAssignmentWorkgroupFields object\n@throws MPXJException if MSP defined limit of 1 is exceeded",
"get the real data without message header\n@return message data(without header)",
"determinates if this triangle contains the point p.\n@param p the query point\n@return true iff p is not null and is inside this triangle (Note: on boundary is considered inside!!).",
"Executes the API action \"wbsetclaim\" for the given parameters.\n\n@param statement\nthe JSON serialization of claim to add or delete.\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the JSON response from the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException",
"Adds a shutdown hook for the process.\n\n@param process the process to add a shutdown hook for\n\n@return the thread set as the shutdown hook\n\n@throws java.lang.SecurityException If a security manager is present and it denies {@link\njava.lang.RuntimePermission <code>RuntimePermission(\"shutdownHooks\")</code>}"
] |
private void waitForOutstandingRequest() throws IOException {
if (outstandingRequest == null) {
return;
}
try {
RetryHelper.runWithRetries(new Callable<Void>() {
@Override
public Void call() throws IOException, InterruptedException {
if (RetryHelper.getContext().getAttemptNumber() > 1) {
outstandingRequest.retry();
}
token = outstandingRequest.waitForNextToken();
outstandingRequest = null;
return null;
}
}, retryParams, GcsServiceImpl.exceptionHandler);
} catch (RetryInterruptedException ex) {
token = null;
throw new ClosedByInterruptException();
} catch (NonRetriableException e) {
Throwables.propagateIfInstanceOf(e.getCause(), IOException.class);
throw e;
}
} | [
"Waits for the current outstanding request retrying it with exponential backoff if it fails.\n\n@throws ClosedByInterruptException if request was interrupted\n@throws IOException In the event of FileNotFoundException, MalformedURLException\n@throws RetriesExhaustedException if exceeding the number of retries"
] | [
"Reads a row of a CSV file and populates the bean, using the supplied name mapping to map column values to the\nappropriate fields. If processors are supplied then they are used, otherwise the raw String values will be used.\n\n@param bean\nthe bean to populate\n@param nameMapping\nthe name mapping array\n@param processors\nthe (optional) cell processors\n@return the populated bean, or null if EOF was reached\n@throws IllegalArgumentException\nif nameMapping.length != number of CSV columns read\n@throws IOException\nif an I/O error occurred\n@throws NullPointerException\nif bean or nameMapping are null\n@throws SuperCsvConstraintViolationException\nif a CellProcessor constraint failed\n@throws SuperCsvException\nif there was a general exception while reading/processing\n@throws SuperCsvReflectionException\nif there was an reflection exception while mapping the values to the bean",
"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",
"Sets the alias. By default the entire attribute path participates in the alias\n@param alias The name of the alias to set",
"Returns a map from a category path to the wrapper of all the sub-categories of the category with the path given as key.\n\n@return a map from a category path to all sub-categories of the path's category.",
"Allows to access the names of the current defined roundings.\n\n@param providers the providers and ordering to be used. By default providers and ordering as defined in\n#getDefaultProviders is used.\n@return the set of custom rounding ids, never {@code null}.",
"This method should be called after all column have been added to the report.\n@param numgroups\n@return",
"Create the exception assignment map.\n\n@param rows calendar rows\n@return exception assignment map",
"set the layout which will host the ScrimInsetsFrameLayout and its layoutParams\n\n@param container\n@param layoutParams\n@return",
"Retrieves the overallocated flag.\n\n@return overallocated flag"
] |
private NodeList getNodeList(String document, XPathExpression expression) throws Exception
{
Document doc = m_documentBuilder.parse(new InputSource(new StringReader(document)));
return (NodeList) expression.evaluate(doc, XPathConstants.NODESET);
} | [
"Retrieve a node list based on an XPath expression.\n\n@param document XML document to process\n@param expression compiled XPath expression\n@return node list"
] | [
"Remove an active operation.\n\n@param id the operation id\n@return the removed active operation, {@code null} if there was no registered operation",
"When creating barcode columns\n@return",
"Returns whether this host should ignore operations from the master domain controller that target\nthe given address.\n\n@param address the resource address. Cannot be {@code null}\n\n@return {@code true} if the operation should be ignored; {@code false} otherwise",
"Checks the preconditions for creating a new Truncate processor.\n\n@param maxSize\nthe maximum size of the String\n@param suffix\nthe String to append if the input is truncated (e.g. \"...\")\n@throws IllegalArgumentException\nif {@code maxSize <= 0}\n@throws NullPointerException\nif suffix is null",
"Returns a string to resolve apostrophe issue in xpath\n\n@param text\n@return the apostrophe resolved xpath value string",
"Creates a resource key with given id for bundle specified by given class.\n@param clazz the class owning the bundle.\n@param id value identifier\n@return the resource key",
"This method merges together assignment data for the same cost.\n\n@param list assignment data",
"Updates the path_order column in the table, loops though the pathOrder array, and changes the value to the loop\nindex+1 for the specified pathId\n\n@param profileId ID of profile\n@param pathOrder array containing new order of paths",
"Checks if a parameter exists. If it exists, it is left untouched. If it doesn't, it is created. Only works for parameters which key\nis unique. Must be called from within an open transaction."
] |
public void setTargetDirectory(String directory) {
if (directory != null && directory.length() > 0) {
this.targetDirectory = new File(directory);
} else {
this.targetDirectory = null;
}
} | [
"Sets the target directory."
] | [
"Retrieves the project start date. If an explicit start date has not been\nset, this method calculates the start date by looking for\nthe earliest task start date.\n\n@return project start date",
"Serialize a map of objects to a JSON String.\n\n@param map The map of objects to serialize.\n@param jsonObjectClass The @JsonObject class of the list elements",
"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.",
"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",
"Looks up the EJB in the container and executes the method on it\n\n@param self the proxy instance.\n@param method the overridden method declared in the super class or\ninterface.\n@param proceed the forwarder method for invoking the overridden method. It\nis null if the overridden method is abstract or declared in the\ninterface.\n@param args an array of objects containing the values of the arguments\npassed in the method invocation on the proxy instance. If a\nparameter type is a primitive type, the type of the array\nelement is a wrapper class.\n@return the resulting value of the method invocation.\n@throws Throwable if the method invocation fails.",
"Adds each required length, ensuring it isn't negative.\n\n@param requiredLengths\none or more required lengths\n@throws IllegalArgumentException\nif a supplied length is negative",
"Returns the sentence as a string with a space between words.\nDesigned to work robustly, even if the elements stored in the\n'Sentence' are not of type Label.\n\nThis one uses the default separators for any word type that uses\nseparators, such as TaggedWord.\n\n@param justValue If <code>true</code> and the elements are of type\n<code>Label</code>, return just the\n<code>value()</code> of the <code>Label</code> of each word;\notherwise,\ncall the <code>toString()</code> method on each item.\n@return The sentence in String form",
"Sets the time to wait when close connection watch threads are enabled. 0 = wait forever.\n@param closeConnectionWatchTimeout the watchTimeout to set\n@param timeUnit Time granularity",
"Get cached value that is dynamically loaded by the Acacia content editor.\n\n@param attribute the attribute to load the value to\n@return the cached value"
] |
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."
] | [
"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",
"Cancel the pause operation",
"Gets information about a trashed file that's limited to a list of specified fields.\n@param fileID the ID of the trashed file.\n@param fields the fields to retrieve.\n@return info about the trashed file containing only the specified fields.",
"A convenient way of creating a map on the fly.\n\n@param <K> the key type\n@param <V> the value type\n@param entries\nMap.Entry objects to be added to the map\n@return a LinkedHashMap with the supplied entries",
"Add all headers in a header map.\n\n@param headers a map of headers.\n@return the interceptor instance itself.",
"m is more generic than a",
"Extract note text.\n\n@param row task data\n@return note text",
"Helper method to send message on outputStream and account for network\ntime stats.\n\n@param outputStream\n@param message\n@throws IOException",
"May have to be changed to let multiple touch"
] |
public static rsskeytype get(nitro_service service) throws Exception{
rsskeytype obj = new rsskeytype();
rsskeytype[] response = (rsskeytype[])obj.get_resources(service);
return response[0];
} | [
"Use this API to fetch all the rsskeytype resources that are configured on netscaler."
] | [
"Attempts to detect the provided pattern as an exact match.\n@param pattern the pattern to find in the reader stream\n@return the number of times the pattern is found,\nor an error code\n@throws MalformedPatternException if the pattern is invalid\n@throws Exception if a generic error is encountered",
"Synchronize the required files to a slave HC from the master DC if this is required.\n@param fileRepository the HostFileRepository of the HC.\n@param contentRepository the ContentRepository of the HC.\n@param backup inidcates if this is a DC backup HC.\n@param oldHash the hash of the deployment to be replaced.\n@return true if the content should be pulled by the slave HC - false otherwise.",
"Updates the indices in the index buffer from a Java char array.\nAll of the entries of the input char 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 char array is wrong size",
"Substitute the variables in the given expression with the\nvalues from the resolver\n\n@param pResolver\n@param pExpression",
"Create an info object from a uri and the http method object.\n\n@param uri the uri\n@param method the method",
"This method maps the encoded height of a Gantt bar to\nthe height in pixels.\n\n@param height encoded height\n@return height in pixels",
"Checks whether this notification is from CleverTap.\n\n@param extras The payload from the GCM intent\n@return See {@link NotificationInfo}",
"Constructs and sets the layout parameters to have some gravity.\n\n@param gravity the gravity of the Crouton\n@return <code>this</code>, for chaining.\n@see android.view.Gravity",
"Used to parse the dividend dates. Returns null if the date cannot be\nparsed.\n\n@param date String received that represents the date\n@return Calendar object representing the parsed date"
] |
private void sendOneAsyncHint(final ByteArray slopKey,
final Versioned<byte[]> slopVersioned,
final List<Node> nodesToTry) {
Node nodeToHostHint = null;
boolean foundNode = false;
while(nodesToTry.size() > 0) {
nodeToHostHint = nodesToTry.remove(0);
if(!failedNodes.contains(nodeToHostHint) && failureDetector.isAvailable(nodeToHostHint)) {
foundNode = true;
break;
}
}
if(!foundNode) {
Slop slop = slopSerializer.toObject(slopVersioned.getValue());
logger.error("Trying to send an async hint but used up all nodes. key: "
+ slop.getKey() + " version: " + slopVersioned.getVersion().toString());
return;
}
final Node node = nodeToHostHint;
int nodeId = node.getId();
NonblockingStore nonblockingStore = nonblockingSlopStores.get(nodeId);
Utils.notNull(nonblockingStore);
final Long startNs = System.nanoTime();
NonblockingStoreCallback callback = new NonblockingStoreCallback() {
@Override
public void requestComplete(Object result, long requestTime) {
Slop slop = null;
boolean loggerDebugEnabled = logger.isDebugEnabled();
if(loggerDebugEnabled) {
slop = slopSerializer.toObject(slopVersioned.getValue());
}
Response<ByteArray, Object> response = new Response<ByteArray, Object>(node,
slopKey,
result,
requestTime);
if(response.getValue() instanceof Exception
&& !(response.getValue() instanceof ObsoleteVersionException)) {
if(!failedNodes.contains(node))
failedNodes.add(node);
if(response.getValue() instanceof UnreachableStoreException) {
UnreachableStoreException use = (UnreachableStoreException) response.getValue();
if(loggerDebugEnabled) {
logger.debug("Write of key " + slop.getKey() + " for "
+ slop.getNodeId() + " to node " + node
+ " failed due to unreachable: " + use.getMessage());
}
failureDetector.recordException(node, (System.nanoTime() - startNs)
/ Time.NS_PER_MS, use);
}
sendOneAsyncHint(slopKey, slopVersioned, nodesToTry);
}
if(loggerDebugEnabled)
logger.debug("Slop write of key " + slop.getKey() + " for node "
+ slop.getNodeId() + " to node " + node + " succeeded in "
+ (System.nanoTime() - startNs) + " ns");
failureDetector.recordSuccess(node, (System.nanoTime() - startNs) / Time.NS_PER_MS);
}
};
nonblockingStore.submitPutRequest(slopKey, slopVersioned, null, callback, timeoutMs);
} | [
"A callback that handles requestComplete event from NIO selector manager\nWill try any possible nodes and pass itself as callback util all nodes\nare exhausted\n\n@param slopKey\n@param slopVersioned\n@param nodesToTry List of nodes to try to contact. Will become shorter\nafter each callback"
] | [
"Adds an ORDER BY item with a direction indicator.\n\n@param name\nName of the column by which to sort.\n@param ascending\nIf true, specifies the direction \"asc\", otherwise, specifies\nthe direction \"desc\".",
"Access all of the elements of the collection that evaluate to true for the\nprovided query predicate.\n@param\tpredicate\tAn OQL boolean query predicate.\n@return\tAn iterator used to iterate over the elements that evaluated true for the predicate.\n@exception\torg.odmg.QueryInvalidException\tThe query predicate is invalid.",
"Support the range subscript operator for CharSequence\n\n@param text a CharSequence\n@param range a Range\n@return the subsequence CharSequence\n@since 1.0",
"Sets a request header with the given name and value. If a header with the\nspecified name has already been set then the new value overwrites the\ncurrent value.\n\n@param header the name of the header\n@param value the value of the header\n\n@throws NullPointerException if header or value are null\n@throws IllegalArgumentException if header or value are the empty string",
"Creates an endpoint reference from a given adress.\n@param address\n@param props\n@return",
"Use this API to fetch a aaaglobal_binding resource .",
"Save an HTTP response to a file\n@param response the response to save\n@param destFile the destination file\n@throws IOException if the response could not be downloaded",
"Adds a tag to a task. Returns an empty data block.\n\n@param task The task to add a tag to.\n@return Request object",
"Returns the size of the shadow element"
] |
public static Cluster cloneCluster(Cluster cluster) {
// Could add a better .clone() implementation that clones the derived
// data structures. The constructor invoked by this clone implementation
// can be slow for large numbers of partitions. Probably faster to copy
// all the maps and stuff.
return new Cluster(cluster.getName(),
new ArrayList<Node>(cluster.getNodes()),
new ArrayList<Zone>(cluster.getZones()));
/*-
* Historic "clone" code being kept in case this, for some reason, was the "right" way to be doing this.
ClusterMapper mapper = new ClusterMapper();
return mapper.readCluster(new StringReader(mapper.writeCluster(cluster)));
*/
} | [
"Clones the cluster by constructing a new one with same name, partition\nlayout, and nodes.\n\n@param cluster\n@return clone of Cluster cluster."
] | [
"Processes an anonymous field definition specified at the class level.\n\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the field as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"autoincrement\" optional=\"true\" description=\"Whether the field is\nauto-incremented\" values=\"true,false\"\[email protected] name=\"column\" optional=\"true\" description=\"The column for the field\"\[email protected] name=\"conversion\" optional=\"true\" description=\"The fully qualified name of the\nconversion for the field\"\[email protected] name=\"default-fetch\" optional=\"true\" description=\"The default-fetch setting\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the field\"\[email protected] name=\"id\" optional=\"true\" description=\"The position of the field in the class\ndescriptor\"\[email protected] name=\"indexed\" optional=\"true\" description=\"Whether the field is indexed\"\nvalues=\"true,false\"\[email protected] name=\"jdbc-type\" optional=\"true\" description=\"The jdbc type of the column\"\[email protected] name=\"length\" optional=\"true\" description=\"The length of the column\"\[email protected] name=\"locking\" optional=\"true\" description=\"Whether the field supports locking\"\nvalues=\"true,false\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the field\"\[email protected] name=\"nullable\" optional=\"true\" description=\"Whether the field is nullable\"\nvalues=\"true,false\"\[email protected] name=\"precision\" optional=\"true\" description=\"The precision of the column\"\[email protected] name=\"primarykey\" optional=\"true\" description=\"Whether the field is a primarykey\"\nvalues=\"true,false\"\[email protected] name=\"scale\" optional=\"true\" description=\"The scale of the column\"\[email protected] name=\"sequence-name\" optional=\"true\" description=\"The name of the sequence for\nincrementing the field\"\[email protected] name=\"table\" optional=\"true\" description=\"The table of the field (not implemented\nyet)\"\[email protected] name=\"update-lock\" optional=\"true\" description=\"Can be set to false if the persistent attribute is\nused for optimistic locking AND the dbms should update the lock column itself (default is true). Can only be set for\nTIMESTAMP and INTEGER columns\" values=\"true,false\"",
"Returns a list of files in given addon passing given filter.",
"Do some magic to turn request parameters into a context object",
"List the slack values for each task.\n\n@param file ProjectFile instance",
"Sets the node meta data.\n\n@param key - the meta data key\n@param value - the meta data value\n@throws GroovyBugError if key is null or there is already meta\ndata under that key",
"m is more generic than a",
"Invert by solving for against an identity matrix.\n\n@param A_inv Where the inverted matrix saved. Modified.",
"very big duct tape",
"Get the Operation metadata for an MBean by name.\n@return the {@link Map} of {@link String} operation names to {@link MBeanOperationInfo} values."
] |
public Project dependsOnArtifact(Artifact artifact)
{
Project project = new Project();
project.setArtifact(artifact);
project.setInputVariablesName(inputVarName);
return project;
} | [
"Specify the artifact configuration to be searched for\n@param artifact configured artifact object\n@return"
] | [
"Resize the given mesh keeping its aspect ration.\n@param mesh Mesh to be resized.\n@param size Max size for the axis.",
"Use this API to fetch vpnvserver_appcontroller_binding resources of given name .",
"Stop finding beat grids for all active players.",
"Returns true if\n- includeTags is not empty and tag is in includeTags\n- includeTags is empty and tag is not in excludeTags\n@param tags Hint tags\n@param includeTags Include tags\n@param excludeTags Exclude tags\n@return has tag match",
"Handles the response of the SerialAPIGetCapabilities request.\n@param incomingMessage the response message to process.",
"Compute 2-dimensional Perlin noise.\n@param x the x coordinate\n@param y the y coordinate\n@return noise value at (x,y)",
"1-D Perlin noise function.\n\n@param x X Value.\n@return Returns function's value at point x.",
"Populate the container, converting raw data into Java types.\n\n@param field custom field to which these values belong\n@param values raw value data\n@param descriptions raw description data",
"Convert an object to a list.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target list element type\n@return list"
] |
static void produceInputStreamWithEntry( final DataConsumer consumer,
final InputStream inputStream,
final TarArchiveEntry entry ) throws IOException {
try {
consumer.onEachFile(inputStream, entry);
} finally {
IOUtils.closeQuietly(inputStream);
}
} | [
"Feeds input stream to data consumer using metadata from tar entry.\n@param consumer the consumer\n@param inputStream the stream to feed\n@param entry the entry to use for metadata\n@throws IOException on consume error"
] | [
"Determines storage overhead and returns pretty printed summary.\n\n@param finalNodeToOverhead Map of node IDs from final cluster to number\nof partition-stores to be moved to the node.\n@return pretty printed string summary of storage overhead.",
"Log an audit record of this operation.",
"Inserts an array of Parcelable values into the mapping of the underlying Bundle, replacing any\nexisting value for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value an array of Parcelable objects, or null\n@return this bundler instance to chain method calls",
"Updates the indices in the index buffer from a Java char array.\nAll of the entries of the input char 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 char array is wrong size",
"Await a state.\n\n@param expected the expected state\n@return {@code true} if the state was reached, {@code false} otherwise",
"Overridden to ensure that our timestamp handling is as expected",
"Creates a new indirection handler instance.\n\n@param brokerKey The associated {@link PBKey}.\n@param id The subject's ids\n@return The new instance",
"Sets the bootstrap URLs used by the different Fat clients inside the\nCoordinator\n\n@param bootstrapUrls list of bootstrap URLs defining which cluster to\nconnect to\n@return modified CoordinatorConfig",
"Create a single node representing an embedded element.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param columnValues the values in {@link org.hibernate.ogm.model.key.spi.EntityKey#getColumnValues()}\n@return the corresponding node;"
] |
public GeoPolygon addHoles(List<List<GeoPoint>> holes) {
Contracts.assertNotNull( holes, "holes" );
this.rings.addAll( holes );
return this;
} | [
"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"
] | [
"Dumps an animation channel to stdout.\n\n@param nodeAnim the channel",
"Summarizes balance for the given nodeId to PartitionCount.\n\n@param nodeIdToPartitionCount\n@param title for use in pretty string\n@return Pair: getFirst() is utility value to be minimized, getSecond() is\npretty summary string of balance",
"This method is used to extract the resource hyperlink attributes\nfrom a block of data and call the appropriate modifier methods\nto configure the specified task object.\n\n@param resource resource instance\n@param data hyperlink data block",
"Read an individual Phoenix task relationship.\n\n@param relation Phoenix task relationship",
"Modifier method to set the unique ID of this calendar.\n\n@param uniqueID unique identifier",
"Scans a path on the filesystem for resources inside the given classpath location.\n\n@param location The system-independent location on the classpath.\n@param locationUri The system-specific physical location URI.\n@return a sorted set containing all the resources inside the given location\n@throws IOException if an error accessing the filesystem happens",
"get all parts of module name apart from first",
"Use this API to update dbdbprofile.",
"Configure properties needed to connect to a Fluo application\n\n@param conf Job configuration\n@param config use {@link FluoConfiguration} to configure programmatically"
] |
public static void checkFloatNotNaNOrInfinity(String parameterName,
float data) {
if (Float.isNaN(data) || Float.isInfinite(data)) {
throw Exceptions.IllegalArgument(
"%s should never be NaN or Infinite.", parameterName);
}
} | [
"In common shader cases, NaN makes little sense. Correspondingly, GVRF is\ngoing to use Float.NaN as illegal flag in many cases. Therefore, we need\na function to check if there is any setX that is using NaN as input.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that the user can easily find the error in their code.\n@param data\nA single float data.\n@throws IllegalArgumentException\nif the data includes NaN."
] | [
"Gets a collection of photo counts for the given date ranges for the calling user.\n\nThis method requires authentication with 'read' permission.\n\n@param dates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@param takenDates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@return A Collection of Photocount objects",
"Builds the DynamicReport object. Cannot be used twice since this produced\nundesired results on the generated DynamicReport object\n\n@return",
"Get info for a given topic\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@return A group topic\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.topics.getInfo.html\">API Documentation</a>",
"Set the attributes for this template.\n\n@param attributes the attribute map",
"Accessor method used to retrieve a Boolean object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field",
"Adds each forbidden substring, checking that it's not null.\n\n@param forbiddenSubStrings\nthe forbidden substrings\n@throws NullPointerException\nif a forbidden substring is null",
"Determines whether the boolean value of the given string value.\n\n@param value The value\n@param defaultValue The boolean value to use if the string value is neither 'true' nor 'false'\n@return The boolean value of the string",
"Creates the button for converting an XML bundle in a property bundle.\n@return the created button.",
"Main executable method of Crawljax CLI.\n\n@param args\nthe arguments."
] |
private double getExpectedProbability(double x)
{
double y = 1 / (standardDeviation * Math.sqrt(Math.PI * 2));
double z = -(Math.pow(x - mean, 2) / (2 * Math.pow(standardDeviation, 2)));
return y * Math.exp(z);
} | [
"This is the probability density function for the Gaussian\ndistribution."
] | [
"Function to go through all the store definitions contained in the STORES\ndirectory and\n\n1. Update metadata cache.\n\n2. Update STORES_KEY by stitching together all these keys.\n\n3. Update 'storeNames' list.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will correctly handle concurrency issues. Currently this is not an\nissue since its invoked by init, put, add and delete store all of which\nuse locks to deal with any concurrency related issues.",
"Process the next event in a given stream.\n@return the fully processed event\n@throws IOException if a stream is in the wrong state, IO errors can be thrown",
"Retrieve a calendar exception which applies to this date.\n\n@param date target date\n@return calendar exception, or null if none match this date",
"Stop finding signatures for all active players.",
"Check the given URI to see if it matches.\n\n@param matchInfo the matchInfo to validate.\n@return True if it matches.",
"Add the list with given bundles to the \"Export-Package\" main attribute.\n\n@param exportedPackages The list of all packages to add.",
"Pushes a class type onto the stack from the string representation This can\nalso handle primitives\n\n@param b the bytecode\n@param classType the type descriptor for the class or primitive to push.\nThis will accept both the java.lang.Object form and the\nLjava/lang/Object; form",
"Last caller of this method will unregister the Mbean. All callers\ndecrement the counter.",
"Makes it possible to uniquify a collection of objects which are normally\nnon-hashable. Alternatively, it lets you define an alternate hash function\nfor them for limited-use hashing."
] |
private boolean checkConverged(DMatrixRMaj A) {
double worst = 0;
double worst2 = 0;
for( int j = 0; j < A.numRows; j++ ) {
double val = Math.abs(q2.data[j] - q0.data[j]);
if( val > worst ) worst = val;
val = Math.abs(q2.data[j] + q0.data[j]);
if( val > worst2 ) worst2 = val;
}
// swap vectors
DMatrixRMaj temp = q0;
q0 = q2;
q2 = temp;
if( worst < tol )
return true;
else if( worst2 < tol )
return true;
else
return false;
} | [
"Test for convergence by seeing if the element with the largest change\nis smaller than the tolerance. In some test cases it alternated between\nthe + and - values of the eigen vector. When this happens it seems to have \"converged\"\nto a non-dominant eigen vector. At least in the case I looked at. I haven't devoted\na lot of time into this issue..."
] | [
"Adds a node to this graph.\n\n@param node the node",
"Appends the query part for the facet to the query string.\n@param query The current query string.\n@param name The name of the facet parameter, e.g. \"limit\", \"order\", ....\n@param value The value to set for the parameter specified by name.",
"Returns IMAP formatted String of MessageFlags for named user",
"Read a Synchro date from an input stream.\n\n@param is input stream\n@return Date instance",
"Sets the baseline duration text value.\n\n@param baselineNumber baseline number\n@param value baseline duration text value",
"Use this API to count linkset_interface_binding resources configued on NetScaler.",
"Merge all reports in reportOverall.\n@param reportOverall destination file of merge.\n@param reports files to be merged.",
"Subtracts v1 from this vector and places the result in this vector.\n\n@param v1\nright-hand vector",
"Helper method for formatting connection establishment 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@return A formatted message in the format:\n\"[<connectionName>] remote host[<host>] <connectionReason>\"\n<br/>\ne.g. [con1] remote host[123.123.123.123] connection to ECMG."
] |
public FilePath getModuleRoot(Map<String, String> globalEnv) throws IOException, InterruptedException {
FilePath someWorkspace = project.getSomeWorkspace();
if (someWorkspace == null) {
throw new IllegalStateException("Couldn't find workspace");
}
Map<String, String> workspaceEnv = Maps.newHashMap();
workspaceEnv.put("WORKSPACE", someWorkspace.getRemote());
for (Builder builder : getBuilders()) {
if (builder instanceof Gradle) {
Gradle gradleBuilder = (Gradle) builder;
String rootBuildScriptDir = gradleBuilder.getRootBuildScriptDir();
if (rootBuildScriptDir != null && rootBuildScriptDir.trim().length() != 0) {
String rootBuildScriptNormalized = Util.replaceMacro(rootBuildScriptDir.trim(), workspaceEnv);
rootBuildScriptNormalized = Util.replaceMacro(rootBuildScriptNormalized, globalEnv);
return new FilePath(someWorkspace, rootBuildScriptNormalized);
} else {
return someWorkspace;
}
}
}
throw new IllegalArgumentException("Couldn't find Gradle builder in the current builders list");
} | [
"Get the root path where the build is located, the project may be checked out to\na sub-directory from the root workspace location.\n\n@param globalEnv EnvVars to take the workspace from, if workspace is not found\nthen it is take from project.getSomeWorkspace()\n@return The location of the root of the Gradle build.\n@throws IOException\n@throws InterruptedException"
] | [
"Converts this object to JSON.\n\n@return the JSON representation\n\n@throws JSONException if JSON operations fail",
"Set the horizontal and vertical alignment for the image when image gets cropped by resizing.\n\n@param valign Vertical alignment.\n@param halign Horizontal alignment.\n@throws IllegalStateException if image has not been marked for resize.",
"Non-zero counts of Householder vectors and computes a permutation\nmatrix that ensures diagonal entires are all structurally nonzero.\n\n@param parent elimination tree\n@param ll linked list for each row that specifies elements that are not zero",
"Deregister shutdown hook and execute it immediately",
"Sets the day of the month.\n@param day the day to set.",
"This method converts an offset value into an array index, which in\nturn allows the data present in the fixed block to be retrieved. Note\nthat if the requested offset is not found, then this method returns -1.\n\n@param offset Offset of the data in the fixed block\n@return Index of data item within the fixed data block",
"Encrypt a string with AES-128 using the specified key.\n\n@param message Input string.\n@param key Encryption key.\n@return Encrypted output.",
"Populates a resource.\n\n@param resource resource instance\n@param record MPX record\n@throws MPXJException",
"Use this API to update callhome."
] |
public T addModule(final String moduleName, final String slot, final byte[] newHash) {
final ContentItem item = createModuleItem(moduleName, slot, newHash);
addContentModification(createContentModification(item, ModificationType.ADD, NO_CONTENT));
return returnThis();
} | [
"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"
] | [
"Lock the given region. Does not report failures.",
"Returns a list of resource wrappers created from the input list of resources.\n\n@param cms the current OpenCms user context\n@param list the list to create the resource wrapper list from\n\n@return the list of wrapped resources.",
"Logs an error message for unhandled exception thrown from the target method.\n\n@param joinPoint - the joint point cut that contains information about the target\n@param throwable - the cause of the exception from the target method invocation",
"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",
"This method is called to format a task type.\n\n@param value task type value\n@return formatted task type",
"Use this API to update aaaparameter.",
"Return the name of the current conf set\n@return the conf set name",
"The Maven3Builder class is looking for the PATH+JDK environment variable due to legacy code.\nIn The pipeline flow we need to convert the JAVA_HOME to PATH+JDK in order to reuse the code.",
"Returns whether this represents a valid host name or address format.\n@return"
] |
@Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<Symmetry454Date> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<Symmetry454Date>) super.zonedDateTime(temporal);
} | [
"Obtains a Symmetry454 zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry454 zoned date-time, not null\n@throws DateTimeException if unable to create the date-time"
] | [
"Ensures that the element is child element of the parent element.\n\n@param parentElement the parent xml dom element\n@param childElement the child element\n@throws SpinXmlElementException if the element is not child of the parent element",
"Use this API to fetch sslcertkey_crldistribution_binding resources of given name .",
"Return the class of one of the properties of another class from which the Hibernate metadata is given.\n\n@param meta\nThe parent class to search a property in.\n@param propertyName\nThe name of the property in the parent class (provided by meta)\n@return Returns the class of the property in question.\n@throws HibernateLayerException\nThrows an exception if the property name could not be retrieved.",
"Start a task. The id is needed to end the task\n\n@param id\n@param taskName",
"Adds two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the sum of specified complex numbers.",
"Use this API to add responderpolicy.",
"Gets the object whose index is the integer argument.\n\n@param i the integer index to be queried for the corresponding argument\n@return the object whose index is the integer argument.",
"Called when app's singleton registry has been initialized",
"Return the numeraire at a given time.\nThe numeraire is provided for interpolated points. If requested on points which are not\npart of the tenor discretization, the numeraire uses a linear interpolation of the reciprocal\nvalue. See ISBN 0470047224 for details.\n\n@param time Time time <i>t</i> for which the numeraire should be returned <i>N(t)</i>.\n@return The numeraire at the specified time as <code>RandomVariableFromDoubleArray</code>\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method."
] |
private boolean isDescriptorProperty(Object property) {
return (getBundleType().equals(BundleType.DESCRIPTOR)
|| (hasDescriptor()
&& (property.equals(TableProperty.KEY)
|| property.equals(TableProperty.DEFAULT)
|| property.equals(TableProperty.DESCRIPTION))));
} | [
"Check if values in the column \"property\" are written to the bundle descriptor.\n@param property the property id of the table column.\n@return a flag, indicating if values of the table column are stored to the bundle descriptor."
] | [
"Clear tmpData in subtree rooted in this node.",
"Determine the raw type for the given generic parameter type.\n@param genericType the generic type to resolve\n@param typeVariableMap the TypeVariable Map to resolved against\n@return the resolved raw type",
"Retrieve the details of a single project from the database.\n\n@param result Map instance containing the results\n@param row result set row read from the database",
"Generate a results file for each test in each suite.\n@param outputDirectory The target directory for the generated file(s).",
"Curries a function that takes three arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes two arguments. Never <code>null</code>.",
"Print the String features generated from a IN",
"Write a short to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The short to write\n@param offset The offset to begin writing at",
"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",
"This snapshot is meant to be used when updating data."
] |
public static long getGcTimestamp(String zookeepers) {
ZooKeeper zk = null;
try {
zk = new ZooKeeper(zookeepers, 30000, null);
// wait until zookeeper is connected
long start = System.currentTimeMillis();
while (!zk.getState().isConnected() && System.currentTimeMillis() - start < 30000) {
Uninterruptibles.sleepUninterruptibly(10, TimeUnit.MILLISECONDS);
}
byte[] d = zk.getData(ZookeeperPath.ORACLE_GC_TIMESTAMP, false, null);
return LongUtil.fromByteArray(d);
} catch (KeeperException | InterruptedException | IOException e) {
log.warn("Failed to get oldest timestamp of Oracle from Zookeeper", e);
return OLDEST_POSSIBLE;
} finally {
if (zk != null) {
try {
zk.close();
} catch (InterruptedException e) {
log.error("Failed to close zookeeper client", e);
}
}
}
} | [
"Retrieves the GC timestamp, set by the Oracle, from zookeeper\n\n@param zookeepers Zookeeper connection string\n@return Oldest active timestamp or oldest possible ts (-1) if not found"
] | [
"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",
"This snapshot is meant to be used when updating data.",
"Try to link the declaration with the importerService referenced by the ServiceReference,.\nreturn true if they have been link together, false otherwise.\n\n@param declaration The Declaration\n@param declarationBinderRef The ServiceReference<S> of S\n@return true if they have been link together, false otherwise.",
"Return the number of days between startDate and endDate given the\nspecific daycount convention.\n\n@param startDate The start date given as a {@link org.threeten.bp.LocalDate}.\n@param endDate The end date given as a {@link org.threeten.bp.LocalDate}.\n@param convention A convention string.\n@return The number of days within the given period.",
"Resizes an image to the specified height, changing width in the same proportion\n@param originalImage Image in memory\n@param heightOut The height to resize\n@return New Image in memory",
"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",
"Get the list of active tasks from the server.\n\n@return List of tasks\n@see <a href=\"https://console.bluemix.net/docs/services/Cloudant/api/active_tasks.html\">\nActive tasks</a>",
"Creates a scenario with 3 different steps classes.\n\nTo share state between the different steps instances use the\n{@link com.tngtech.jgiven.annotation.ScenarioState} annotation\n\n@param givenClass the Given steps class\n@param whenClass the When steps class\n@param thenClass the Then steps class\n@return the new scenario",
"Two stage promotion, dry run and actual promotion to verify correctness.\n\n@param promotion\n@param client\n@param listener\n@param buildName\n@param buildNumber\n@throws IOException"
] |
public Collection<Method> getAllMethods(String name) {
final Map<ParamList, Map<Class<?>, Method>> nameMap = methods.get(name);
if (nameMap == null) {
return Collections.emptySet();
}
final Collection<Method> methods = new ArrayList<Method>();
for (Map<Class<?>, Method> map : nameMap.values()) {
methods.addAll(map.values());
}
return methods;
} | [
"Get a collection of methods declared on this object by method name.\n\n@param name the name of the method\n@return the (possibly empty) collection of methods with the given name"
] | [
"Performs the conversion from standard XPath to xpath with parameterization support.",
"Helper function to create JsonArray from collection.\n\n@param values collection of values to convert to JsonArray\n@return JsonArray with collection values",
"Produces an IPv4 address section from any sequence of bytes in this IPv6 address section\n\n@param startIndex the byte index in this section to start from\n@param endIndex the byte index in this section to end at\n@throws IndexOutOfBoundsException\n@return\n\n@see #getEmbeddedIPv4AddressSection()\n@see #getMixedAddressSection()",
"Connect to the HC and retrieve the current model updates.\n\n@param controller the server controller\n@param callback the operation completed callback\n\n@throws IOException for any error",
"Gets the value of the given header field.\n@param fieldName name of the header field.\n@return value of the header.",
"File URLs whose protocol are in these list will be processed as jars\ncontaining classes\n\n@param fileProtocols\nComma separated list of file protocols that will be considered\nas jar files and scanned",
"Answer the primary key query to retrieve an Object\n\n@param oid the Identity of the Object to retrieve\n@return The resulting query",
"This method writes a resource's availability table.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource",
"Read an individual GanttProject resource assignment.\n\n@param gpAllocation GanttProject resource assignment."
] |
public void setAngularLowerLimits(float limitX, float limitY, float limitZ) {
Native3DGenericConstraint.setAngularLowerLimits(getNative(), limitX, limitY, limitZ);
} | [
"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)"
] | [
"Returns the context menu for the table item.\n@param itemId the table item.\n@return the context menu for the given item.",
"This is an assertion method that can be used by a thread to confirm that\nthe thread isn't already holding lock for an object, before acquiring a\nlock\n\n@param object\nobject to test for lock\n@param name\ntag associated with the lock",
"Send value to node.\n@param nodeId the node Id to send the value to.\n@param endpoint the endpoint to send the value to.\n@param value the value to send",
"Returns all values that can be selected in the widget.\n@param cms the current CMS object\n@param rootPath the root path to the currently edited xml file (sitemap config)\n@param allRemoved flag, indicating if all inheritedly available formatters should be disabled\n@return all values that can be selected in the widget.",
"Use this API to unset the properties of Interface resource.\nProperties that need to be unset are specified in args array.",
"Load a system library from a stream. Copies the library to a temp file\nand loads from there.\n\n@param libname name of the library (just used in constructing the library name)\n@param is InputStream pointing to the library",
"Use this API to fetch autoscaleaction resource of given name .",
"Get the Query Paramaters to be used for search request.\n@return this.QueryStringBuilder.",
"Goes through the token lists and adds all the variables which can be used to define a sub-matrix. If anything\nelse is found an excpetion is thrown"
] |
public void processStencilSet() throws IOException {
StringBuilder stencilSetFileContents = new StringBuilder();
Scanner scanner = null;
try {
scanner = new Scanner(new File(ssInFile),
"UTF-8");
String currentLine = "";
String prevLine = "";
while (scanner.hasNextLine()) {
prevLine = currentLine;
currentLine = scanner.nextLine();
String trimmedPrevLine = prevLine.trim();
String trimmedCurrentLine = currentLine.trim();
// First time processing - replace view="<file>.svg" with _view_file="<file>.svg" + view="<svg_xml>"
if (trimmedCurrentLine.matches(VIEW_PROPERTY_NAME_PATTERN) && trimmedCurrentLine.endsWith(VIEW_PROPERTY_VALUE_SUFFIX)) {
String newLines = processViewPropertySvgReference(currentLine);
stencilSetFileContents.append(newLines);
}
// Second time processing - replace view="<svg_xml>" with refreshed contents of file referenced by previous line
else if (trimmedPrevLine.matches(VIEW_FILE_PROPERTY_NAME_PATTERN) && trimmedPrevLine.endsWith(VIEW_PROPERTY_VALUE_SUFFIX)
&& trimmedCurrentLine.matches(VIEW_PROPERTY_NAME_PATTERN)) {
String newLines = processViewFilePropertySvgReference(prevLine,
currentLine);
stencilSetFileContents.append(newLines);
} else {
stencilSetFileContents.append(currentLine + LINE_SEPARATOR);
}
}
} finally {
if (scanner != null) {
scanner.close();
}
}
Writer out = null;
try {
out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(ssOutFile),
"UTF-8"));
out.write(stencilSetFileContents.toString());
} catch (FileNotFoundException e) {
} catch (UnsupportedEncodingException e) {
} catch (IOException e) {
} finally {
if (out != null) {
try {
out.close();
} catch (IOException e) {
}
}
}
System.out.println("SVG files referenced more than once:");
for (Map.Entry<String, Integer> stringIntegerEntry : mapSVGCounts.entrySet()) {
if (stringIntegerEntry.getValue() > 1) {
System.out.println("\t" + stringIntegerEntry.getKey() + "\t = " + stringIntegerEntry.getValue());
}
}
} | [
"Processes a stencilset template file\n@throws IOException"
] | [
"Obtain the master partition for a given key\n\n@param key\n@return master partition id",
"Use this API to unset the properties of snmpmanager resource.\nProperties that need to be unset are specified in args array.",
"if |a11-a22| >> |a12+a21| there might be a better way. see pg371",
"Process StepStartedEvent. New step will be created and added to\nstepStorage.\n\n@param event to process",
"Return all valid maturities for a given moneyness.\nUses the fixing times of the fix schedule to determine fractions.\n\n@param moneyness The moneyness as actual offset from par swap rate for which to get the maturities.\n@return The maturities as year fraction from reference date.",
"Open the store with the version directory specified. If null is specified\nwe open the directory with the maximum version\n\n@param versionDir Version Directory to open. If null, we open the max\nversioned / latest directory",
"Add a shutdown listener, which gets called when all requests completed on shutdown.\n\n@param listener the shutdown listener",
"Use this API to add vpath resources.",
"Returns an iterable containing the items in this folder sorted by name and direction.\n@param sort the field to sort by, can be set as `name`, `id`, and `date`.\n@param direction the direction to display the item results.\n@param fields the fields to retrieve.\n@return an iterable containing the items in this folder."
] |
public static String getStringOption(Map<String, String> configOptions, String optionKey, String defaultValue) {
String result = configOptions.get(optionKey);
return null != result ? result : defaultValue;
} | [
"Returns the value of an option, or the default if the value is null or the key is not part of the map.\n@param configOptions the map with the config options.\n@param optionKey the option to get the value of\n@param defaultValue the default value to return if the option is not set.\n@return the value of an option, or the default if the value is null or the key is not part of the map."
] | [
"Invert by solving for against an identity matrix.\n\n@param A_inv Where the inverted matrix saved. Modified.",
"Add the string representation of the given object to this sequence at the given index. The given indentation will\nbe prepended to each line except the first one if the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.\n@param index\nthe index in the list of segments.",
"Traverses the test case annotations. Will inject a HiveShell in the test case that envelopes the HiveServer.",
"Use this API to fetch filtered set of appqoepolicy resources.\nset the filter parameter values in filtervalue object.",
"Prepare a parallel TCP Task.\n\n@param command\nthe command\n@return the parallel task builder",
"Reads an HTML snippet with the given name.\n\n@return the HTML data",
"Use this API to fetch the statistics of all protocoludp_stats resources that are configured on netscaler.",
"Add a simple property to the map file.\n\n@param writer xml stream writer\n@param name property name\n@param propertyType property type\n@param readMethod read method name\n@param writeMethod write method name\n@throws XMLStreamException",
"helper to calculate the actionBar height\n\n@param context\n@return"
] |
public DockerContainerObjectBuilder<T> withEnrichers(Collection<TestEnricher> enrichers) {
if (enrichers == null) {
throw new IllegalArgumentException("enrichers cannot be null");
}
this.enrichers = enrichers;
return this;
} | [
"Specifies the list of enrichers that will be used to enrich the container object.\n\n@param enrichers\nlist of enrichers that will be used to enrich the container object\n\n@return the current builder instance"
] | [
"Removes a set of calendar hours from the day to which they\nare currently attached.\n\n@param hours calendar hours instance",
"Sets the final transform of the bone during animation.\n\n@param finalTransform The transform matrix representing\nthe bone's pose after computing the skeleton.",
"Use this API to update bridgetable resources.",
"Remove contents from the deployment and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException",
"Used for initialization of the underlying map provider.\n\n@param fragmentManager required for initialization",
"Use this API to fetch filtered set of vpnclientlessaccesspolicy resources.\nset the filter parameter values in filtervalue object.",
"Creates an element that represents a single positioned box with no content.\n@return the resulting DOM element",
"Build list of style filters from style definitions.\n\n@param styleDefinitions\nlist of style definitions\n@return list of style filters\n@throws GeomajasException",
"Get a collection of public photos for the specified user ID.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param userId\nThe User ID\n@param extras\nSet of extra-attributes to include (may be null)\n@param perPage\nThe number of photos per page\n@param page\nThe page offset\n@return The PhotoList collection\n@throws FlickrException"
] |
protected void processDeletions(CmsObject cms, List<CmsResource> toDelete) throws CmsException {
Collections.sort(toDelete, (a, b) -> b.getRootPath().compareTo(a.getRootPath()));
for (CmsResource deleteRes : toDelete) {
m_report.print(
org.opencms.importexport.Messages.get().container(org.opencms.importexport.Messages.RPT_DELFOLDER_0),
I_CmsReport.FORMAT_NOTE);
m_report.print(
org.opencms.report.Messages.get().container(
org.opencms.report.Messages.RPT_ARGUMENT_1,
deleteRes.getRootPath()));
CmsLock lock = cms.getLock(deleteRes);
if (lock.isUnlocked()) {
lock(cms, deleteRes);
}
cms.deleteResource(deleteRes, CmsResource.DELETE_PRESERVE_SIBLINGS);
m_report.println(
org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0),
I_CmsReport.FORMAT_OK);
}
} | [
"Handles the file deletions.\n\n@param cms the CMS context to use\n@param toDelete the resources to delete\n\n@throws CmsException if something goes wrong"
] | [
"Reconnect to the HC.\n\n@return whether the server is still in sync\n@throws IOException",
"compares two AST nodes",
"Check position type.\n\n@param type the type\n@return the boolean",
"converts Map of data to json string\n\n@param data map data to converted to json\n@return {@link String}",
"Start with specifying the artifactId",
"Cretae a BufferedImage from an ImageProducer.\n@param producer the ImageProducer\n@return a new TYPE_INT_ARGB BufferedImage",
"Get the features collection from a GeoJson URL.\n\n@param template the template\n@param geoJsonUrl what to parse\n@return the feature collection",
"Perform the merge\n\n@param stereotypeAnnotations The stereotype annotations",
"Update the value of an embedded node property.\n\n@param executionEngine the {@link GraphDatabaseService} used to run the query\n@param keyValues the columns representing the identifier in the entity owning the embedded\n@param embeddedColumn the column on the embedded node (dot-separated properties)\n@param value the new value for the property"
] |
public String calculateCacheKey(String sql, int[] columnIndexes) {
StringBuilder tmp = new StringBuilder(sql.length()+4);
tmp.append(sql);
for (int i=0; i < columnIndexes.length; i++){
tmp.append(columnIndexes[i]);
tmp.append("CI,");
}
return tmp.toString();
} | [
"Calculate a cache key.\n@param sql to use\n@param columnIndexes to use\n@return cache key to use."
] | [
"Use this API to fetch statistics of tunnelip_stats resource of given name .",
"Test the list of TimephasedWork instances to see\nif any of them have been modified.\n\n@param list list of TimephasedWork instances\n@return boolean flag",
"Use this API to fetch aaapreauthenticationpolicy_aaaglobal_binding resources of given name .",
"Returns the y-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the y coordinate",
"Returns the type discriminator value for given Frames model class, extracted from the @TypeValue annotation.",
"Prepare the document before rendering.\n\n@param outputStream output stream to render to, null if only for layout\n@param format format\n@throws DocumentException oops\n@throws IOException oops\n@throws PrintingException oops",
"Get the group URL for the specified group ID\n\n@param groupId\nThe group ID\n@return The group URL\n@throws FlickrException",
"Binds the Identities Primary key values to the statement.",
"Finds binding for a type in the given injector and, if not found,\nrecurses to its parent\n\n@param injector\nthe current Injector\n@param type\nthe Class representing the type\n@return A boolean flag, <code>true</code> if binding found"
] |
public static String retrieveVendorId() {
if (MapboxTelemetry.applicationContext == null) {
return updateVendorId();
}
SharedPreferences sharedPreferences = obtainSharedPreferences(MapboxTelemetry.applicationContext);
String mapboxVendorId = sharedPreferences.getString(MAPBOX_SHARED_PREFERENCE_KEY_VENDOR_ID, "");
if (TelemetryUtils.isEmpty(mapboxVendorId)) {
mapboxVendorId = TelemetryUtils.updateVendorId();
}
return mapboxVendorId;
} | [
"Do not call this method outside of activity!!!"
] | [
"Returns the local collection representing the given namespace for raw document operations.\n\n@param namespace the namespace referring to the local collection.\n@return the local collection representing the given namespace for raw document operations.",
"Generate an IKVM map file.\n\n@param mapFileName map file name\n@param jarFile jar file containing code to be mapped\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws IOException\n@throws XMLStreamException\n@throws ClassNotFoundException\n@throws IntrospectionException",
"Cosine interpolation.\n\n@param x1 X1 Value.\n@param x2 X2 Value.\n@param a Value.\n@return Value.",
"Make sure the result index points to the next available key in the scan result, if exists.",
"Try to obtain the value that is cached for the given key in the given resource.\nIf no value is cached, the provider is used to compute it and store it afterwards.\n@param resource the resource. If it is <code>null</code>, the provider will be used to compute the value.\n@param key the cache key. May not be <code>null</code>.\n@param provider the strategy to compute the value if necessary. May not be <code>null</code>.",
"Resolves current full path with .yml and .yaml extensions\n\n@param fullpath\nwithout extension.\n\n@return Path of existing definition or null",
"Returns the y-coordinate of a vertex bitangent.\n\n@param vertex the vertex index\n@return the y coordinate",
"Add a dependency to this node.\n\n@param node the dependency to add.",
"Calculate where within the beat grid array the information for the specified beat can be found.\nYes, this is a super simple calculation; the main point of the method is to provide a nice exception\nwhen the beat is out of bounds.\n\n@param beatNumber the beat desired\n\n@return the offset of the start of our cache arrays for information about that beat"
] |
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."
] | [
"Find the next match of the pattern on the tree\n\n@return whether there is a match somewhere in the tree",
"Checks whether a character sequence matches against a specified pattern or not.\n\n@param pattern\npattern, that the {@code chars} must correspond to\n@param chars\na readable sequence of {@code char} values which should match the given pattern\n@return {@code true} when {@code chars} matches against the passed {@code pattern}, otherwise {@code false}",
"Register the given mbean with the platform mbean server\n\n@param mbean The mbean to register\n@param name The name to register under",
"Walk through the object graph of the specified insert object. Was used for\nrecursive object graph walk.",
"Computes the p=2 norm. If A is a matrix then the induced norm is computed. This\nimplementation is faster, but more prone to buffer overflow or underflow problems.\n\n@param A Matrix or vector.\n@return The norm.",
"Returns a date and time string which is formatted as ISO-8601.",
"Get the FieldDescriptor for the PathInfo\n\n@param aTableAlias\n@param aPathInfo\n@return FieldDescriptor",
"Init the bundle type member variable.\n@return the bundle type of the opened resource.",
"Locates the services in the context classloader of the current thread.\n\n@param serviceType the type of the services to locate\n@param <X> the type of the service\n@return the service type loader"
] |
public ParallelTaskBuilder prepareHttpGet(String url) {
reinitIfClosed();
ParallelTaskBuilder cb = new ParallelTaskBuilder();
cb.getHttpMeta().setHttpMethod(HttpMethod.GET);
cb.getHttpMeta().setRequestUrlPostfix(url);
return cb;
} | [
"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"
] | [
"Given an array of variable names, returns an Xml String\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@param dataMap\n@return values in Xml format",
"Get a store definition from the given list of store definitions\n\n@param list A list of store definitions\n@param name The name of the store\n@return The store definition",
"This method can be used by child classes to apply the configuration that is stored in config.",
"Remove multiple fields from the map\n@param fields the fields to remove\n@return the number of fields removed",
"Shutdown task scheduler.",
"Check if values in the column \"property\" are written to the bundle descriptor.\n@param property the property id of the table column.\n@return a flag, indicating if values of the table column are stored to the bundle descriptor.",
"Tries to return the single table to which all classes in the hierarchy with the given\nclass as the root map.\n\n@param classDef The root class of the hierarchy\n@return The table name or <code>null</code> if the classes map to more than one table\nor no class in the hierarchy maps to a table",
"Optimized version of the Wagner & Fischer algorithm that only\nkeeps a single column in the matrix in memory at a time. It\nimplements the simple cutoff, but otherwise computes the entire\nmatrix. It is roughly twice as fast as the original function.",
"Unpack report face to given directory.\n\n@param outputDirectory the output directory to unpack face.\n@throws IOException if any occurs."
] |
public static boolean isSuccess(JsonRtn jsonRtn) {
if (jsonRtn == null) {
return false;
}
String errCode = jsonRtn.getErrCode();
if (StringUtils.isEmpty(errCode) || StringUtils.equals(WECHAT_JSON_RTN_SUCCESS_CODE, errCode)) {
return true;
}
return false;
} | [
"return request is success by JsonRtn object\n\n@param jsonRtn\n@return"
] | [
"Get the Operation metadata for an MBean by name.\n@return the {@link Map} of {@link String} operation names to {@link MBeanOperationInfo} values.",
"Removes all items from the list box.",
"Return all scripts of a given type\n\n@param type integer value of type\n@return Array of scripts of the given type",
"Moves the drawer to the position passed.\n\n@param position The position the content is moved to.\n@param velocity Optional velocity if called by releasing a drag event.\n@param animate Whether the move is animated.",
"Calculate Median value.\n@param values Values.\n@return Median.",
"Updates the value in HashMap and writeBack as Atomic step",
"If task completed success or failure from response.\n\n@param myResponse\nthe my response\n@return true, if successful",
"If there is an unprocessed change event for a particular document ID, fetch it from the\nchange stream listener, and remove it. By reading the event here, we are assuming it will be\nprocessed by the consumer.\n\n@return the latest unprocessed change event for the given document ID, or null if none exists.",
"Use this API to fetch appfwprofile_crosssitescripting_binding resources of given name ."
] |
public static final Long date2utc(Date date) {
// use null for a null date
if (date == null) return null;
long time = date.getTime();
// remove the timezone offset
time -= timezoneOffsetMillis(date);
return time;
} | [
"Converts a gwt Date in the timezone of the current browser to a time in\nUTC.\n\n@return A Long corresponding to the number of milliseconds since January\n1, 1970, 00:00:00 GMT or null if the specified Date is null."
] | [
"Use this API to delete gslbservice of given name.",
"Calls the specified Stitch function, and decodes the response into an instance of the specified\ntype. The response will be decoded using the codec registry given.\n\n@param name the name of the Stitch function to call.\n@param args the arguments to pass to the Stitch function.\n@param requestTimeout the number of milliseconds the client should wait for a response from the\nserver before failing with an error.\n@param resultClass the class that the Stitch response should be decoded as.\n@param <T> the type into which the Stitch response will be decoded.\n@param codecRegistry the codec registry that will be used to encode/decode the function call.\n@return the decoded value.",
"Parse request parameters and files.\n@param request\n@param response",
"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.",
"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",
"Obtains a Ethiopic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Sets the provided metadata on the folder, overwriting any existing metadata keys already present.\n\n@param templateName the name of the metadata template.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").\n@param metadata the new metadata values.\n@return the metadata returned from the server.",
"Returns the adapter position of the Parent associated with this ChildViewHolder\n\n@return The adapter position of the Parent if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has been removed from the adapter,\nRecyclerView.Adapter.notifyDataSetChanged() has been called after the last\nlayout pass or the ViewHolder has already been recycled.",
"Removes the given service provider factory from the set of\nproviders for the service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@param factory\nA factory for creating a specific type of service\nprovider. May be <tt>null</tt> in which case this\nmethod does nothing.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>"
] |
@Override
public CrawlSession call() {
Injector injector = Guice.createInjector(new CoreModule(config));
controller = injector.getInstance(CrawlController.class);
CrawlSession session = controller.call();
reason = controller.getReason();
return session;
} | [
"Runs Crawljax with the given configuration.\n\n@return The {@link CrawlSession} once the Crawl is done."
] | [
"Get the bean if it exists in the contexts.\n\n@return An instance of the bean\n@throws ContextNotActiveException if the context is not active\n@see javax.enterprise.context.spi.Context#get(BaseBean, boolean)",
"Stop a timer of the given string name for the current thread. If no such\ntimer exists, -1 will be returned. Otherwise the return value is the CPU\ntime that was measured.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@return CPU time if timer existed and was running, and -1 otherwise",
"Returns the \"short rate\" from timeIndex to timeIndex+1.\n\n@param timeIndex The time index (corresponding to {@link getTime()).\n@return The \"short rate\" from timeIndex to timeIndex+1.\n@throws CalculationException Thrown if simulation failed.",
"Process any StepEvent. You can change last added to stepStorage\nstep using this method.\n\n@param event to process",
"Generate the init script from the Artifactory URL.\n\n@return The generated script.",
"User-initiated commands use this method.\n\n@param command The CLI command\n@return A Response object containing the command line, DMR request, and DMR response\n@throws CommandFormatException\n@throws IOException",
"Process field aliases.",
"Creates the JSON serialized form of the accessory for use over the Homekit Accessory Protocol.\n\n@param instanceId the static id of the accessory.\n@return a future that will complete with the JSON builder for the object.",
"Use this API to save cachecontentgroup."
] |
public static void normalizeF( DMatrixRMaj A ) {
double val = normF(A);
if( val == 0 )
return;
int size = A.getNumElements();
for( int i = 0; i < size; i++) {
A.div(i , val);
}
} | [
"Normalizes the matrix such that the Frobenius norm is equal to one.\n\n@param A The matrix that is to be normalized."
] | [
"Update which options are shown.\n@param showModeSwitch flag, indicating if the mode switch should be shown.\n@param showAddKeyOption flag, indicating if the \"Add key\" row should be shown.",
"Dump data for all non-summary tasks to stdout.\n\n@param name file name",
"Returns all the Artifacts of the module\n\n@param module Module\n@return List<Artifact>",
"Returns a Span that covers all rows beginning with a prefix String parameters will be encoded\nas UTF-8",
"Use this API to fetch authenticationvserver_authenticationtacacspolicy_binding resources of given name .",
"Parse the JSON string and return the object. The string is expected to be the JSON print data from the\nclient.\n\n@param spec the JSON formatted string.\n@return The encapsulated JSON object",
"Convert this update description to an update document.\n\n@return an update document with the appropriate $set and $unset documents.",
"Use this API to update autoscaleaction.",
"Features are only cacheable when not converted lazily as lazy features are incomplete, it would put detached\nobjects in the cache.\n\n@return true when features are not converted lazily"
] |
private float max(float x, float y, float z) {
if (x > y) {
// not y
if (x > z) {
return x;
}
else {
return z;
}
}
else {
// not x
if (y > z) {
return y;
}
else {
return z;
}
}
} | [
"misc utility methods"
] | [
"adds the qualified names to the export-package attribute, if not already\npresent.\n\n@param packages - passing parameterized packages is not supported",
"Calculates Tangent value of the complex number.\n\n@param z1 A ComplexNumber instance.\n@return Returns new ComplexNumber instance containing the Tangent value of the specified complex number.",
"Create a directory at the given path if it does not exist yet.\n\n@param path\nthe path to the directory\n@throws IOException\nif it was not possible to create a directory at the given\npath",
"Gets the first value for the key.\n\n@param key the key to check for the value\n\n@return the value or {@code null} if the key is not found or the value was {@code null}",
"Logs the current user out.\n\n@throws IOException",
"Sets the timeout used when connecting to the server.\n\n@param timeout the time out to use\n\n@return the builder",
"Schedule at most one task.\n\nThe scheduled task *must* invoke 'doneTask()' upon\ncompletion/termination.\n\n@param executeService flag to control execution of the service, some tests pass\nin value 'false'\n@return The task scheduled or null if not possible to schedule a task at\nthis time.",
"Binds a script bundle to a scene.\n@param scriptBundle\nThe {@code GVRScriptBundle} object containing script binding information.\n@param scene\nThe scene to bind to.\n@throws IOException if script bundle file cannot be read.\n@throws GVRScriptException if script processing error occurs.",
"Either a single file extension or a comma-separated list of extensions for which the language\nshall be registered."
] |
private void readTasks(Project gpProject)
{
Tasks tasks = gpProject.getTasks();
readTaskCustomPropertyDefinitions(tasks);
for (net.sf.mpxj.ganttproject.schema.Task task : tasks.getTask())
{
readTask(m_projectFile, task);
}
} | [
"Read the top level tasks from GanttProject.\n\n@param gpProject GanttProject project"
] | [
"Isn't there a method for this in GeoTools?\n\n@param crs\nCRS string in the form of 'EPSG:<srid>'.\n@return SRID as integer.",
"rollback the transaction",
"Use this API to fetch appfwpolicylabel_binding resource of given name .",
"Inserts a CharSequence array value into the mapping of the underlying Bundle, replacing any\nexisting value for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a CharSequence array object, or null\n@return this bundler instance to chain method calls",
"Converts a date series configuration to a date series bean.\n@return the date series bean.",
"Retrieve an instance of the ConstraintField class based on the data read from an\nMS Project file.\n\n@param value value from an MS Project file\n@return ConstraintField instance",
"Add the operation to add the local host definition.",
"Get the server redirects for a given clientId from the database\n\n@param clientId client ID\n@return collection of ServerRedirects",
"Returns iban length for the specified country.\n\n@param countryCode {@link org.iban4j.CountryCode}\n@return the length of the iban for the specified country."
] |
public static double I(int n, double x) {
if (n < 0)
throw new IllegalArgumentException("the variable n out of range.");
else if (n == 0)
return I0(x);
else if (n == 1)
return I(x);
if (x == 0.0)
return 0.0;
double ACC = 40.0;
double BIGNO = 1.0e+10;
double BIGNI = 1.0e-10;
double tox = 2.0 / Math.abs(x);
double bip = 0, ans = 0.0;
double bi = 1.0;
for (int j = 2 * (n + (int) Math.sqrt(ACC * n)); j > 0; j--) {
double bim = bip + j * tox * bi;
bip = bi;
bi = bim;
if (Math.abs(bi) > BIGNO) {
ans *= BIGNI;
bi *= BIGNI;
bip *= BIGNI;
}
if (j == n)
ans = bip;
}
ans *= I0(x) / bi;
return x < 0.0 && n % 2 == 1 ? -ans : ans;
} | [
"Bessel function of the first kind, of order n.\n\n@param n Order.\n@param x Value.\n@return I value."
] | [
"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.",
"parse the stencil out of a JSONObject and set it to the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Returns all the URL that should be inside the classpath. This includes the jar itself if any.\n\n@throws JqmPayloadException",
"converts Map of data to json string\n\n@param data map data to converted to json\n@return {@link String}",
"Write the classifications of the Sequence classifier out to a writer in a\nformat determined by the DocumentReaderAndWriter used.\n\n@param doc Documents to write out\n@param printWriter Writer to use for output\n@throws IOException If an IO problem",
"Makes an RPC call using the client. Logs how long it took and any exceptions.\n\nNOTE: The request could be an InputStream too, but the http client will need to\nfind its length, which will require buffering it anyways.\n\n@throws DatastoreException if the RPC fails.",
"Resolve the targeted license thanks to the license ID\nReturn null if no license is matching the licenseId\n\n@param licenseId\n@return DbLicense",
"Find and read the cache format entry in a metadata cache file.\n\n@return the content of the format entry, or {@code null} if none was found\n\n@throws IOException if there is a problem reading the file",
"Returns a string that represents a valid Solr query range.\n\n@param from Lower bound of the query range.\n@param to Upper bound of the query range.\n@return String that represents a Solr query range."
] |
public <T> T convert(Object source, TypeReference<T> typeReference)
throws ConverterException {
return (T) convert(new ConversionContext(), source, typeReference);
} | [
"Convert an object to another object with given type\n\n@param <T>\n@param source\nobject to convert\n@param typeReference\nreference to {@link java.lang.reflect.Type}\n@return the converted object if conversion failed\n@throws ConverterException"
] | [
"Writes the specified double to the stream, formatted according to the format specified in the constructor.\n\n@param d the double to write to the stream\n@return this writer\n@throws IOException if an I/O error occurs",
"Changes the vertex buffer associated with this mesh.\n@param vbuf new vertex buffer to use\n@see #setVertices(float[])\n@see #getVertexBuffer()\n@see #getVertices()",
"Returns the connection that has been saved or null if none.",
"Creates an Executor that is based on daemon threads.\nThis allows the program to quit without explicitly\ncalling shutdown on the pool\n\n@return the newly created single-threaded Executor",
"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.",
"ceiling for clipped RELU, alpha for ELU",
"Returns a single item from the Iterator.\nIf there's none, returns null.\nIf there are more, throws an IllegalStateException.\n\n@throws IllegalStateException",
"Use this API to fetch all the appfwlearningsettings resources that are configured on netscaler.",
"Get file size\n\n@return Long"
] |
@Override
public void checkin(K key, V resource) {
super.checkin(key, resource);
// NB: Blocking checkout calls for synchronous requests get the resource
// checked in above before processQueueLoop() attempts checkout below.
// There is therefore a risk that asynchronous requests will be starved.
processQueueLoop(key);
} | [
"Check the given resource back into the pool\n\n@param key The key for the resource\n@param resource The resource"
] | [
"Use this API to count dnszone_domain_binding resources configued on NetScaler.",
"Get a property as a string or defaultValue.\n\n@param key the property name\n@param defaultValue the default value",
"Mark content as obsolete. If content was already marked for obsolescenceTimeout ms then it is removed.\n\n@param ref the content refrence to be marked as obsolete.\n\n@return true if the content refrence is removed, fale otherwise.",
"Post a license to the server\n\n@param license\n@param user\n@param password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Rollback the last applied patch.\n\n@param contentPolicy the content policy\n@param resetConfiguration whether to reset the configuration\n@param modification the installation modification\n@return the patching result\n@throws PatchingException",
"Checks if a parameter exists. If it exists, it is left untouched. If it doesn't, it is created. Only works for parameters which key\nis unique. Must be called from within an open transaction.",
"Calculate matrix exponential of a square matrix.\n\nA scaled Pade approximation algorithm is used.\nThe algorithm has been directly translated from Golub & Van Loan \"Matrix Computations\",\nalgorithm 11.3.1. Special Horner techniques from 11.2 are also used to minimize the number\nof matrix multiplications.\n\n@param A square matrix\n@return matrix exponential of A",
"Update max.\n\n@param n the n\n@param c the c",
"Updates the indices in the index buffer from a Java IntBuffer.\nAll of the entries of the input int buffer 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 buffer is wrong size"
] |
public static List<Integer> checkKeyBelongsToPartition(byte[] key,
Set<Pair<Integer, HashMap<Integer, List<Integer>>>> stealerNodeToMappingTuples,
Cluster cluster,
StoreDefinition storeDef) {
List<Integer> keyPartitions = new RoutingStrategyFactory().updateRoutingStrategy(storeDef,
cluster)
.getPartitionList(key);
List<Integer> nodesToPush = Lists.newArrayList();
for(Pair<Integer, HashMap<Integer, List<Integer>>> stealNodeToMap: stealerNodeToMappingTuples) {
List<Integer> nodePartitions = cluster.getNodeById(stealNodeToMap.getFirst())
.getPartitionIds();
if(StoreRoutingPlan.checkKeyBelongsToPartition(keyPartitions,
nodePartitions,
stealNodeToMap.getSecond())) {
nodesToPush.add(stealNodeToMap.getFirst());
}
}
return nodesToPush;
} | [
"Given a key and a list of steal infos give back a list of stealer node\nids which will steal this.\n\n@param key Byte array of key\n@param stealerNodeToMappingTuples Pairs of stealer node id to their\ncorresponding [ partition - replica ] tuples\n@param cluster Cluster metadata\n@param storeDef Store definitions\n@return List of node ids"
] | [
"Filters all exceptions from the provided dates.\n@param dates the dates to filter.\n@return the provided dates, except the ones that match some exception.",
"Stops the background stream thread.",
"Flush the in-memory data to the file",
"rollback the transaction",
"Read all task relationships from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file",
"The Baseline Finish field shows the planned completion date for a task\nat the time you saved a baseline. Information in this field becomes\navailable when you set a baseline for a task.\n\n@return Date",
"Update a note.\n\n@param note\nThe Note to update\n@throws FlickrException",
"Use this API to update dbdbprofile.",
"Sends a message to the dbserver, first assembling it into a single byte buffer so that it can be sent as\na single packet.\n\n@param message the message to be sent\n\n@throws IOException if there is a problem sending it"
] |
public boolean accept(String str) {
int k = str.length() - 1;
char c = str.charAt(k);
while (k >= 0 && !Character.isDigit(c)) {
k--;
if (k >= 0) {
c = str.charAt(k);
}
}
if (k < 0) {
return false;
}
int j = k;
c = str.charAt(j);
while (j >= 0 && Character.isDigit(c)) {
j--;
if (j >= 0) {
c = str.charAt(j);
}
}
j++;
k++;
String theNumber = str.substring(j, k);
int number = Integer.parseInt(theNumber);
for (Pair<Integer,Integer> p : ranges) {
int low = p.first().intValue();
int high = p.second().intValue();
if (number >= low && number <= high) {
return true;
}
}
return false;
} | [
"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"
] | [
"If the user has not specified a project ID, this method\nretrieves the ID of the first project in the file.",
"Simple info message for status\n\n@param tag Message to print out at start of info message",
"Returns all factory instances that match the query.\n\n@param query the factory query, not null.\n@return the instances found, never null.",
"Queries a Search Index and returns ungrouped results. In case the query\nused grouping, an empty list is returned\n\n@param <T> Object type T\n@param query the Lucene query to be passed to the Search index\n@param classOfT The class of type T\n@return The result of the search query as a {@code List<T> }",
"Append the Parameter\nAdd the place holder ? or the SubQuery\n@param value the value of the criteria",
"Determine the raw type for the given generic parameter type.\n@param genericType the generic type to resolve\n@param typeVariableMap the TypeVariable Map to resolved against\n@return the resolved raw type",
"Gets information about a trashed file.\n@param fileID the ID of the trashed file.\n@return info about the trashed file.",
"Add an accessory to be handled and advertised by this root. Any existing Homekit connections\nwill be terminated to allow the clients to reconnect and see the updated accessory list. When\nusing this for a bridge, the ID of the accessory must be greater than 1, as that ID is reserved\nfor the Bridge itself.\n\n@param accessory to advertise and handle.",
"Append a Handler to a portion of the handler tree\n@param parent The parent to add the child to\n@param child The Handler to add."
] |
@JsonIgnore
public void setUnknownFields(final Map<String,Object> unknownFields) {
this.unknownFields.clear();
this.unknownFields.putAll(unknownFields);
} | [
"Set all unknown fields\n@param unknownFields the new unknown fields"
] | [
"Given a GanttProject priority value, turn this into an MPXJ Priority instance.\n\n@param gpPriority GanttProject priority\n@return Priority instance",
"Read the values from the output object and write them to the values object.\n\n@param output the output object from a processor\n@param processor the processor the output if from\n@param values the object for sharing values between processors",
"Resets the handler data to a basic state.",
"Invalidate the item in layout\n@param dataIndex data index",
"Returns the index of the eigenvalue which has the smallest magnitude.\n\n@return index of the smallest magnitude eigen value.",
"Use this API to fetch vpnvserver_authenticationsamlpolicy_binding resources of given name .",
"Use this API to add ntpserver resources.",
"Stores the output from a Frontier into the queue, pausing and waiting if the given queue is too large\n\n@param resultsMap map of String and String representing the output of a Frontier's DFS",
"Convert an Integer value into a String.\n\n@param value Integer value\n@return String value"
] |
protected static JSONObject getDefaultProfile() throws Exception {
String uri = DEFAULT_BASE_URL + BASE_PROFILE;
try {
JSONObject response = new JSONObject(doGet(uri, 60000));
JSONArray profiles = response.getJSONArray("profiles");
if (profiles.length() > 0) {
return profiles.getJSONObject(0);
}
} catch (Exception e) {
// some sort of error
throw new Exception("Could not create a proxy client");
}
return null;
} | [
"get the default profile\n\n@return representation of default profile\n@throws Exception exception"
] | [
"Retrieves the constructor that is used by OJB to create instances of the given collection proxy\nclass.\n\n@param proxyClass The proxy class\n@param baseType The required base type of the proxy class\n@param typeDesc The type of collection proxy\n@return The constructor",
"Queues up a callback to be removed and invoked on the next change event.",
"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.",
"Executes the API action \"wbsetaliases\" for the given parameters.\n\n@param id\nthe id of the entity to be edited; if used, the site and title\nparameters must be null\n@param site\nwhen selecting an entity by title, the site key for the title,\ne.g., \"enwiki\"; if used, title must also be given but id must\nbe null\n@param title\nstring used to select an entity by title; if used, site must\nalso be given but id must be null\n@param newEntity\nused for creating a new entity of a given type; the value\nindicates the intended entity type; possible values include\n\"item\" and \"property\"; if used, the parameters id, site, and\ntitle must be null\n@param language\nthe language code for the label\n@param add\nthe values of the aliases to add. They will be merged with the\nexisting aliases. This parameter cannot be used in conjunction\nwith \"set\".\n@param remove\nthe values of the aliases to remove. Other aliases will be retained.\nThis parameter cannot be used in conjunction with \"set\".\n@param set\nthe values of the aliases to set. This will erase any existing\naliases in this language and replace them by the given list.\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the JSON response from the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException",
"Use this API to update appfwlearningsettings resources.",
"Call rollback on the underlying connection.",
"Read custom fields for a GanttProject resource.\n\n@param gpResource GanttProject resource\n@param mpxjResource MPXJ Resource instance",
"New REST client uses new REST service",
"Set the values of a set of knots.\n@param x the knot positions\n@param y the knot colors\n@param types the knot types\n@param offset the first knot to set\n@param count the number of knots"
] |
static InternationalFixedDate create(int prolepticYear, int month, int dayOfMonth) {
YEAR_RANGE.checkValidValue(prolepticYear, ChronoField.YEAR_OF_ERA);
MONTH_OF_YEAR_RANGE.checkValidValue(month, ChronoField.MONTH_OF_YEAR);
DAY_OF_MONTH_RANGE.checkValidValue(dayOfMonth, ChronoField.DAY_OF_MONTH);
if (dayOfMonth == DAYS_IN_LONG_MONTH && month != 6 && month != MONTHS_IN_YEAR) {
throw new DateTimeException("Invalid date: " + prolepticYear + '/' + month + '/' + dayOfMonth);
}
if (month == 6 && dayOfMonth == DAYS_IN_LONG_MONTH && !INSTANCE.isLeapYear(prolepticYear)) {
throw new DateTimeException("Invalid Leap Day as '" + prolepticYear + "' is not a leap year");
}
return new InternationalFixedDate(prolepticYear, month, dayOfMonth);
} | [
"Factory method, validates the given triplet year, month and dayOfMonth.\n\n@param prolepticYear the International fixed proleptic-year\n@param month the International fixed month, from 1 to 13\n@param dayOfMonth the International fixed day-of-month, from 1 to 28 (29 for Leap Day or Year Day)\n@return the International fixed date\n@throws DateTimeException if the date is invalid"
] | [
"For the DC to check whether an operation should be ignored on the slave, if the slave is set up to ignore config not relevant to it\n\n@param domainResource the domain root resource\n@param serverConfigs the server configs the slave is known to have\n@param pathAddress the address of the operation to check if should be ignored or not",
"Purges the JSP repository.<p<\n\n@param afterPurgeAction the action to execute after purging",
"Make a sort order for use in a query.",
"Makes sure that the operation name and the address have been set and returns a ModelNode\nrepresenting the operation request.",
"Removes the specified type from the frame.",
"Helper function to bind script bundler to various targets",
"Returns an interval representing the subtraction of the\ngiven interval from this one.\n@param other interval to subtract from this one\n@return result of subtraction",
"Returns script view\n\n@param model\n@return\n@throws Exception",
"Merge two ExecutionStatistics into one. This method is private in order not to be synchronized (merging.\n@param otherStatistics"
] |
private void readWeekDay(ProjectCalendar mpxjCalendar, WeekDay day)
{
if (day.isIsDayWorking())
{
ProjectCalendarHours hours = mpxjCalendar.addCalendarHours(day.getDay());
for (Document.Calendars.Calendar.WeekDays.WeekDay.TimePeriods.TimePeriod period : day.getTimePeriods().getTimePeriod())
{
hours.addRange(new DateRange(period.getFrom(), period.getTo()));
}
}
} | [
"Reads a single day for a calendar.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day ConceptDraw PROJECT week day"
] | [
"Sets the node meta data.\n\n@param key - the meta data key\n@param value - the meta data value\n@throws GroovyBugError if key is null or there is already meta\ndata under that key",
"Returns the position for a given number of occurrences or NOT_FOUND if\nthis value is not found.\n\n@param nOccurrence\nnumber of occurrences\n@return the position for a given number of occurrences or NOT_FOUND if\nthis value is not found",
"Disallow the job type from being executed.\n@param jobType the job type to disallow",
"Return the Renderer class associated to the prototype.\n\n@param prototypeClass used to search the renderer in the prototypes collection.\n@return the prototype index associated to the prototypeClass.",
"Converts a vector into a quaternion.\nUsed for the direction of spot and directional lights\nCalled upon initialization and updates to those vectors\n\n@param d",
"Utility to list indexes of a given type.\n\n@param type the type of index to list, null means all types\n@param modelType the class to deserialize the index into\n@param <T> the type of the index\n@return the list of indexes of the specified type",
"Converts a sequence of Java characters to a sequence of unicode code points.\n\n@return the number of code points written to the destination buffer",
"The Maven3Builder class is looking for the PATH+JDK environment variable due to legacy code.\nIn The pipeline flow we need to convert the JAVA_HOME to PATH+JDK in order to reuse the code.",
"Load the layers based on the default setup.\n\n@param jbossHome the jboss home directory\n@param productConfig the product config\n@param repoRoots the repository roots\n@return the available layers\n@throws IOException"
] |
public static base_responses export(nitro_service client, sslfipskey resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslfipskey exportresources[] = new sslfipskey[resources.length];
for (int i=0;i<resources.length;i++){
exportresources[i] = new sslfipskey();
exportresources[i].fipskeyname = resources[i].fipskeyname;
exportresources[i].key = resources[i].key;
}
result = perform_operation_bulk_request(client, exportresources,"export");
}
return result;
} | [
"Use this API to export sslfipskey resources."
] | [
"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.",
"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",
"Reconnect the context if the RedirectException is valid.",
"Sends a text message using given server setup for SMTP.\n\n@param to the to address.\n@param from the from address.\n@param subject the subject.\n@param msg the test message.\n@param setup the SMTP setup.",
"Retrieves the configured message by property key\n@param key The key in the file\n@return The associated value in case the key is found in the message bundle file. If\nno such key is defined, the returned value would be the key itself.",
"Sets the proxy class to be used.\n@param newProxyClass java.lang.Class",
"Returns if this maps the specified cell.\n\n@param cell the cell name\n@return {@code true} if this maps the column, {@code false} otherwise",
"characters callback.",
"Ranks a map based on integer values\n@param inputMap Input\n@return The ranked map"
] |
public float getNormalZ(int vertex) {
if (!hasNormals()) {
throw new IllegalStateException("mesh has no normals");
}
checkVertexIndexBounds(vertex);
return m_normals.getFloat((vertex * 3 + 2) * SIZEOF_FLOAT);
} | [
"Returns the z-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the z coordinate"
] | [
"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",
"Use this API to fetch nstrafficdomain_binding resources of given names .",
"Given a class configures the binding between a class and a Renderer class.\n\n@param clazz to bind.\n@param prototype used as Renderer.\n@return the current RendererBuilder instance.",
"get target hosts from line by line.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the list\n@throws TargetHostsLoadException\nthe target hosts load exception",
"Returns the Set of entities recognized by this Classifier.\n\n@return The Set of entities recognized by this Classifier.",
"Use this API to clear Interface.",
"Logout the current session. After calling this method,\nthe session will be cleared",
"Populate the supplied response with the model representation of the certificates.\n\n@param result the response to populate.\n@param certificates the certificates to add to the response.\n@throws CertificateEncodingException\n@throws NoSuchAlgorithmException",
"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"
] |
public GVRAndroidResource openResource(String filePath) throws IOException {
// Error tolerance: Remove initial '/' introduced by file::///filename
// In this case, the path is interpreted as relative to defaultPath,
// which is the root of the filesystem.
if (filePath.startsWith(File.separator)) {
filePath = filePath.substring(File.separator.length());
}
filePath = adaptFilePath(filePath);
String path;
int resourceId;
GVRAndroidResource resourceKey;
switch (volumeType) {
case ANDROID_ASSETS:
// Resolve '..' and '.'
path = getFullPath(defaultPath, filePath);
path = new File(path).getCanonicalPath();
if (path.startsWith(File.separator)) {
path = path.substring(1);
}
resourceKey = new GVRAndroidResource(gvrContext, path);
break;
case ANDROID_RESOURCE:
path = FileNameUtils.getBaseName(filePath);
resourceId = gvrContext.getContext().getResources().getIdentifier(path, "raw", gvrContext.getContext().getPackageName());
if (resourceId == 0) {
throw new FileNotFoundException(filePath + " resource not found");
}
resourceKey = new GVRAndroidResource(gvrContext, resourceId);
break;
case LINUX_FILESYSTEM:
resourceKey = new GVRAndroidResource(
getFullPath(defaultPath, filePath));
break;
case ANDROID_SDCARD:
String linuxPath = Environment.getExternalStorageDirectory()
.getAbsolutePath();
resourceKey = new GVRAndroidResource(
getFullPath(linuxPath, defaultPath, filePath));
break;
case INPUT_STREAM:
resourceKey = new GVRAndroidResource(getFullPath(defaultPath, filePath), volumeInputStream);
break;
case NETWORK:
resourceKey = new GVRAndroidResource(gvrContext,
getFullURL(defaultPath, filePath), enableUrlLocalCache);
break;
default:
throw new IOException(
String.format("Unrecognized volumeType %s", volumeType));
}
return addResource(resourceKey);
} | [
"Opens a file from the volume. The filePath is relative to the\ndefaultPath.\n\n@param filePath\nFile path of the resource to open.\n\n@throws IOException"
] | [
"Get the aggregated result human readable string for easy display.\n\n\n@param aggregateResultMap the aggregate result map\n@return the aggregated result human",
"Get the domain controller data from the given byte buffer.\n\n@param buffer the byte buffer\n@return the domain controller data\n@throws Exception",
"Set the values using the specified Properties object\n\n@param properties Properties object containing specific property values\nfor the Coordinator config",
"Constructs the convex hull of a set of points whose coordinates are given\nby an array of doubles.\n\n@param coords\nx, y, and z coordinates of each input point. The length of\nthis array must be at least three times <code>nump</code>.\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe number of input points is less than four or greater than\n1/3 the length of <code>coords</code>, or the points appear\nto be coincident, colinear, or coplanar.",
"Transforms the category path of a category to the category.\n@return a map from root or site path to category.",
"Removes each of the specified followers from the task if they are\nfollowing. Returns the complete, updated record for the affected task.\n\n@param task The task to remove followers from.\n@return Request object",
"Use this API to add inat resources.",
"Retrieves all Metadata Cascade Policies on a folder.\n\n@param fields optional fields to retrieve for cascade policies.\n@return the Iterable of Box Metadata Cascade Policies in your enterprise.",
"Sets padding between the pages\n@param padding\n@param axis"
] |
private static String handleRichError(final Response response, final String body) {
if (!response.getHeaders().containsKey(Headers.CONTENT_TYPE)
|| !response.getHeaders().get(Headers.CONTENT_TYPE).equals(ContentTypes.APPLICATION_JSON)) {
return body;
}
final Document doc;
try {
doc = BsonUtils.parseValue(body, Document.class);
} catch (Exception e) {
return body;
}
if (!doc.containsKey(Fields.ERROR)) {
return body;
}
final String errorMsg = doc.getString(Fields.ERROR);
if (!doc.containsKey(Fields.ERROR_CODE)) {
return errorMsg;
}
final String errorCode = doc.getString(Fields.ERROR_CODE);
throw new StitchServiceException(errorMsg, StitchServiceErrorCode.fromCodeName(errorCode));
} | [
"Private helper method which decodes the Stitch error from the body of an HTTP `Response`\nobject. If the error is successfully decoded, this function will throw the error for the end\nuser to eventually consume. If the error cannot be decoded, this is likely not an error from\nthe Stitch server, and this function will return an error message that the calling function\nshould use as the message of a StitchServiceException with an unknown code."
] | [
"Output the SQL type for a Java String.",
"Sets the proxy class to be used.\n@param newProxyClass java.lang.Class",
"Retrieve any task field value lists defined in the MPP file.",
"Add UDFType objects to a PM XML file.\n\n@author kmahan\n@date 2014-09-24\n@author lsong\n@date 2015-7-24",
"Clears all scopes. Useful for testing and not getting any leak...",
"Use this API to clear Interface resources.",
"Internal method used to retrieve a byte array from one\nor more embedded data blocks. Consecutive data blocks may\nneed to be concatenated by this method in order to retrieve\nthe complete set of data.\n\n@param blocks list of data blocks\n@param length expected length of the data\n@return byte array",
"Bessel function of the second kind, of order n.\n\n@param n Order.\n@param x Value.\n@return Y value.",
"handles when a member leaves and hazelcast partition data is lost. We want\nto find the Futures that are waiting on lost data and error them"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.