query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public static final Bytes of(String s) {
Objects.requireNonNull(s);
if (s.isEmpty()) {
return EMPTY;
}
byte[] data = s.getBytes(StandardCharsets.UTF_8);
return new Bytes(data, s);
} | [
"Creates a Bytes object by copying the value of the given String"
] | [
"Adds a new metadata value of array type.\n@param path the path to the field.\n@param values the collection of values.\n@return the metadata object for chaining.",
"map a property id. Property id can only be an Integer or String",
"Count the number of non-zero elements in R",
"Read resource assignment baseline values.\n\n@param row result set row",
"Extract resource provider from a resource ID string.\n@param id the resource ID string\n@return the resource group name",
"Load the entity activating the persistence context execution boundaries\n\n@param session the session\n@param qp the query parameters\n@param ogmLoadingContext the loading context\n@param returnProxies when {@code true}, get an existing proxy for each collection element (if there is one)\n@return the result of the query",
"List the addons already added to an app.\n@param appName new of the app\n@return a list of add-ons",
"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",
"Checks, if the end type is valid for the set pattern type.\n@return a flag, indicating if the end type is valid for the pattern type."
] |
protected HttpUriRequest createHttpRequest(HttpMethod httpMethod, URI uri) {
switch (httpMethod) {
case GET:
return new HttpGet(uri);
case DELETE:
return new HttpDelete(uri);
case HEAD:
return new HttpHead(uri);
case OPTIONS:
return new HttpOptions(uri);
case POST:
return new HttpPost(uri);
case PUT:
return new HttpPut(uri);
case TRACE:
return new HttpTrace(uri);
default:
throw new IllegalArgumentException("Invalid HTTP method: " + httpMethod);
}
} | [
"Create a HttpComponents HttpUriRequest object for the given HTTP method and URI specification.\n\n@param httpMethod the HTTP method\n@param uri the URI\n@return the HttpComponents HttpUriRequest object"
] | [
"Returns screen height and width\n\n@param context\nAny non-null Android Context\n@param p\nOptional Point to reuse. If null, a new Point will be created.\n@return .x is screen width; .y is screen height.",
"Is the transport secured by a policy",
"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.",
"Retrieves child nodes from a directory entry.\n\n@param parent parent directory entry\n@return list of child nodes",
"Stops download dispatchers.",
"Initialize all components of this URI builder with the components of the given URI.\n@param uri the URI\n@return this UriComponentsBuilder",
"Returns a button component. On click, it triggers adding a bundle descriptor.\n@return a button for adding a descriptor to a bundle.",
"Delete the proxy history for the active profile\n\n@throws Exception exception",
"Initializes the model"
] |
@Override
public void process() {
if (client.isDone() || executorService.isTerminated()) {
throw new IllegalStateException("Client is already stopped");
}
Runnable runner = new Runnable() {
@Override
public void run() {
try {
while (!client.isDone()) {
String msg = messageQueue.take();
try {
parseMessage(msg);
} catch (Exception e) {
logger.warn("Exception thrown during parsing msg " + msg, e);
onException(e);
}
}
} catch (Exception e) {
onException(e);
}
}
};
executorService.execute(runner);
} | [
"Forks off a runnable with the executor provided. Multiple calls are allowed, but the listeners must be\nthreadsafe."
] | [
"Returns the path to java executable.",
"Returns the names of the bundles configured as workplace bundles in any module configuration.\n@return the names of the bundles configured as workplace bundles in any module configuration.",
"Flush output streams.",
"a simple contains helper method, checks if array contains a numToCheck\n\n@param array array of ints\n@param numToCheck value to find\n@return True if found, false otherwise",
"Return the value from the field in the object that is defined by this FieldType.",
"Go through the property name to see if it is a complex one. If it is, aliases must be declared.\n\n@param orgPropertyName\nThe propertyName. Can be complex.\n@param userData\nThe userData object that is passed in each method of the FilterVisitor. Should always be of the info\n\"Criteria\".\n@return property name",
"This filter uses a 9-patch to overlay the image.\n\n@param imageUrl Watermark image URL. It is very important to understand that the same image\nloader that Thumbor uses will be used here.",
"Returns a list of the rekordbox IDs of the tracks contained in the cache.\n\n@return a list containing the rekordbox ID for each track present in the cache, in the order they appear",
"Filter unsafe or unnecessary request.\n\n@param nodeDataMapValidSource\nthe node data map valid source\n@param nodeDataMapValidSafe\nthe node data map valid safe"
] |
private static String wordShapeDan1(String s) {
boolean digit = true;
boolean upper = true;
boolean lower = true;
boolean mixed = true;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (!Character.isDigit(c)) {
digit = false;
}
if (!Character.isLowerCase(c)) {
lower = false;
}
if (!Character.isUpperCase(c)) {
upper = false;
}
if ((i == 0 && !Character.isUpperCase(c)) || (i >= 1 && !Character.isLowerCase(c))) {
mixed = false;
}
}
if (digit) {
return "ALL-DIGITS";
}
if (upper) {
return "ALL-UPPER";
}
if (lower) {
return "ALL-LOWER";
}
if (mixed) {
return "MIXED-CASE";
}
return "OTHER";
} | [
"A fairly basic 5-way classifier, that notes digits, and upper\nand lower case, mixed, and non-alphanumeric.\n\n@param s String to find word shape of\n@return Its word shape: a 5 way classification"
] | [
"Use this API to fetch sslvserver_sslciphersuite_binding resources of given name .",
"Wraps a StatisticsMatrix around 'm'. Does NOT create a copy of 'm' but saves a reference\nto it.",
"Tells you if the expression is true, which can be true or Boolean.TRUE.\n@param expression\nexpression\n@return\nas described",
"Send message to all connections of a certain user\n\n@param message the message to be sent\n@param username the username\n@return this context",
"Inserts the result of the migration into the migration table\n\n@param migration the migration that was executed\n@param wasSuccessful indicates if the migration was successful or not",
"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.",
"Convenience method for retrieving an Object resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value",
"Sets the global. Does not add the global to the ExecutionResults.\n\n@param identifier\nThe identifier of the global\n@param object\nThe instance to be set as the global.\n@return",
"Enable or disable this component.\n@param flag true to enable, false to disable.\n@see #enable()\n@see #disable()\n@see #isEnabled()"
] |
private boolean isSingleMultiDay() {
long duration = getEnd().getTime() - getStart().getTime();
if (duration > I_CmsSerialDateValue.DAY_IN_MILLIS) {
return true;
}
if (isWholeDay() && (duration <= I_CmsSerialDateValue.DAY_IN_MILLIS)) {
return false;
}
Calendar start = new GregorianCalendar();
start.setTime(getStart());
Calendar end = new GregorianCalendar();
end.setTime(getEnd());
if (start.get(Calendar.DAY_OF_MONTH) == end.get(Calendar.DAY_OF_MONTH)) {
return false;
}
return true;
} | [
"Returns a flag, indicating if the current event is a multi-day event.\nThe method is only called if the single event has an explicitely set end date\nor an explicitely changed whole day option.\n\n@return a flag, indicating if the current event takes lasts over more than one day."
] | [
"Creates an instance of a NewEnterpriseBean from an annotated class\n\n@param clazz The annotated class\n@param beanManager The Bean manager\n@return a new NewEnterpriseBean instance",
"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",
"Token Info\nReturns the Token Information\n@return ApiResponse<TokenInfoSuccessResponse>\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Process field aliases.",
"Use this API to flush nssimpleacl.",
"Adds an artifact to the module.\n\n<P>\nINFO: If the module is promoted, all added artifacts will be promoted.\n\n@param artifact Artifact",
"return currently-loaded Proctor instance, throwing IllegalStateException if not loaded",
"Method indicating whether a day is a working or non-working day.\n\n@param day required day\n@return true if this is a working day",
"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"
] |
public void set(String name, Object value) {
hashAttributes.put(name, value);
if (plugin != null) {
plugin.invalidate();
}
} | [
"Set an attribute.\n\n@param name attribute name.\n@param value attribute value."
] | [
"Creates a region from a name and a label.\n\n@param name the uniquely identifiable name of the region\n@param label the label of the region\n@return the newly created region",
"Get a property as an long or throw an exception.\n\n@param key the property name",
"Initializes OJB for the purposes of this task.\n\n@return The metadata manager used by OJB",
"Log a message line to the output.",
"Gets all rows.\n\n@return the list of all rows",
"Set an enterprise text value.\n\n@param index text index (1-40)\n@param value text value",
"Emit a event object with parameters and force all listeners to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(EventObject, Object...)",
"Find the the qualified container port of the target service\nUses java annotations first or returns the container port.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved containerPort of '0' as a fallback.",
"Seeks to the given holiday within the given year\n\n@param holidayString\n@param yearString"
] |
public String getPrototypeName() {
String name = getClass().getName();
if (name.startsWith(ORG_GEOMAJAS)) {
name = name.substring(ORG_GEOMAJAS.length());
}
name = name.replace(".dto.", ".impl.");
return name.substring(0, name.length() - 4) + "Impl";
} | [
"Get prototype name.\n\n@return prototype name"
] | [
"Use this API to fetch all the appfwlearningsettings resources that are configured on netscaler.",
"Use this API to fetch a vpnglobal_auditnslogpolicy_binding resources.",
"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",
"Returns the simple name of the builder class that should be generated for the given type.\n\n<p>This is simply the {@link #BUILDER_SIMPLE_NAME_TEMPLATE} with the original type name\nsubstituted in. (If the original type is nested, its enclosing classes will be included,\nseparated with underscores, to ensure uniqueness.)",
"Translates the Fluo row, column, and value set into the persistent format that is stored in\nAccumulo.\n\n<p>\nThe objects returned by this method are reused each time its called. So each time this is\ncalled it invalidates what was returned by previous calls to this method.\n\n@return A an array of Accumulo key values in correct sorted order.",
"Initialize the class if this is being called with Spring.",
"Get a loader that lists the files in the current path,\nand monitors changes.",
"Parses the buffer into body content\n@param in ByteBuffer to parse\n@return a ByteBuffer with the parsed body content. Buffer in may not be depleted. If more data is\nneeded, null is returned. In the case of content complete, an empty ByteBuffer is returned.\n@throws BaseExceptions.ParserException",
"Uploads a new file to this folder while reporting the progress to a ProgressListener.\n\n@param fileContent a stream containing the contents of the file to upload.\n@param name the name to give the uploaded file.\n@param fileSize the size of the file used for determining the progress of the upload.\n@param listener a listener for monitoring the upload's progress.\n@return the uploaded file's info."
] |
public BoxFileUploadSession.Info createUploadSession(long fileSize) {
URL url = UPLOAD_SESSION_URL_TEMPLATE.build(this.getAPI().getBaseUploadURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "POST");
request.addHeader("Content-Type", "application/json");
JsonObject body = new JsonObject();
body.add("file_size", fileSize);
request.setBody(body.toString());
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObject = JsonObject.readFrom(response.getJSON());
String sessionId = jsonObject.get("id").asString();
BoxFileUploadSession session = new BoxFileUploadSession(this.getAPI(), sessionId);
return session.new Info(jsonObject);
} | [
"Creates an upload session to create a new version of a file in chunks.\nThis will first verify that the version can be created and then open a session for uploading pieces of the file.\n@param fileSize the size of the file that will be uploaded.\n@return the created upload session instance."
] | [
"Use this API to fetch the statistics of all systemmemory_stats resources that are configured on netscaler.",
"Checks if the given group of statements contains the given value as the\nvalue of a main snak of some statement.\n\n@param statementGroup\nthe statement group to scan\n@param value\nthe value to scan for\n@return true if value was found",
"Skip to the next matching short value.\n\n@param buffer input data array\n@param offset start offset into the input array\n@param value value to match\n@return offset of matching pattern",
"Notifies that a footer item is inserted.\n\n@param position the position of the content item.",
"Recycle all views in the list. The host views might be reused for other data to\nsave resources on creating new widgets.",
"Removes all elements in the sorted set with a score in the given range.\n@param scoreRange\n@return the number of elements removed.",
"Either gets an existing lock on the specified resource or creates one if none exists.\nThis methods guarantees to do this atomically.\n\n@param resourceId the resource to get or create the lock on\n@param isolationId the isolation level identity key. See {@link CommonsOJBLockManager}.\n@return the lock for the specified resource",
"Returns the squared of the Euclidean distance between this vector and\nvector v.\n\n@return squared distance between this vector and v",
"Multiply two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the multiply of specified complex numbers."
] |
public ValueContainer[] getKeyValues(ClassDescriptor cld, Object objectOrProxy) throws PersistenceBrokerException
{
return getKeyValues(cld, objectOrProxy, true);
} | [
"returns an Array with an Objects PK VALUES, with any java-to-sql\nFieldConversion applied. If the Object is a Proxy or a VirtualProxy NO\nconversion is necessary.\n\n@param objectOrProxy\n@return Object[]\n@throws PersistenceBrokerException"
] | [
"Checks to see if every value in the matrix is the specified value.\n\n@param mat The matrix being tested. Not modified.\n@param val Checks to see if every element in the matrix has this value.\n@param tol True if all the elements are within this tolerance.\n@return true if the test passes.",
"Get the multicast socket address.\n\n@return the multicast address",
"All the attributes needed either by the processors for each datasource row or by the jasper template.\n\n@param attributes the attributes.",
"Get random stub matching this user type\n@param userType User type\n@return Random stub",
"Split a module Id to get the module name\n@param moduleId\n@return String",
"Gets the Chi Square distance between two normalized histograms.\n\n@param histogram1 Histogram.\n@param histogram2 Histogram.\n@return The Chi Square distance between x and y.",
"Issue the database statements to create the table associated with a class.\n\n@param connectionSource\nAssociated connection source.\n@param dataClass\nThe class for which a table will be created.\n@return The number of statements executed to do so.",
"In the 2.0 xsd the vault is in an external file, which has no namespace, using the output of the vault tool.\n\n@param f the file containing the external vault configuration as generated by the vault tool\n@return the vault config",
"Returns the default shared instance of the CleverTap SDK.\n\n@param context The Android context\n@return The {@link CleverTapAPI} object"
] |
public <T> T convert(ConversionContext context, Object source,
TypeReference<T> destinationType) throws ConverterException {
try {
return (T) multiConverter.convert(context, source, destinationType);
} catch (ConverterException e) {
throw e;
} catch (Exception e) {
// There is a problem with one converter. This should not happen.
// Either there is a bug in this converter or it is not properly
// configured
throw new ConverterException(
MessageFormat
.format(
"Could not convert given object with class ''{0}'' to object with type signature ''{1}''",
source == null ? "null" : source.getClass()
.getName(), destinationType), e);
}
} | [
"Convert an object to another object given a parameterized type signature\n\n@param context\n@param destinationType\nthe destination type\n@param source\nthe source object\n\n@return the converted object\n@throws ConverterException\nif conversion failed"
] | [
"Scroll to the specific position\n@param position\n@return the new current item after the scrolling processed.",
"Send post request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws IOException the io exception",
"Read a field into our table configuration for field=value line.",
"Set the specific device class of the node.\n@param specificDeviceClass the specificDeviceClass to set\n@exception IllegalArgumentException thrown when the specific device class does not match\nthe generic device class.",
"Invalidating just the GVRView associated with the GVRViewSceneObject\nincorrectly set the clip rectangle to just that view. To fix this,\nwe have to create a full screen android View and invalidate this\nto restore the clip rectangle.\n@return full screen View object",
"Get the value for a single attribute on an MBean by name.\n@param attributeName the attribute name (can be URL-encoded).\n@return the value as a String.\n@throws JMException Java Management Exception\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Read a single weekday from the provided JSON value.\n@param val the value to read the week day from.\n@return the week day read\n@throws IllegalArgumentException thrown if the provided JSON value is not the representation of a week day.",
"Cancel a particular download in progress. Returns 1 if the download Id is found else returns 0.\n\n@param downloadId\n@return int",
"Creates a list of all permutations for a set with N elements.\n\n@param N Number of elements in the list being permuted.\n@return A list containing all the permutations."
] |
public SwaptionDataLattice append(SwaptionDataLattice other, AnalyticModel model) {
SwaptionDataLattice combined = new SwaptionDataLattice(referenceDate, quotingConvention, displacement,
forwardCurveName, discountCurveName, floatMetaSchedule, fixMetaSchedule);
combined.entryMap.putAll(entryMap);
if(quotingConvention == other.quotingConvention && displacement == other.displacement) {
combined.entryMap.putAll(other.entryMap);
} else {
SwaptionDataLattice converted = other.convertLattice(quotingConvention, displacement, model);
combined.entryMap.putAll(converted.entryMap);
}
return combined;
} | [
"Append the data of another lattice to this lattice. If the other lattice follows a different quoting convention, it is automatically converted.\nHowever, this method does not check, whether the two lattices are aligned in terms of reference date, curve names and meta schedules.\nIf the two lattices have shared data points, the data from this lattice will be overwritten.\n\n@param other The lattice containing the data to be appended.\n@param model The model to use for context, in case the other lattice follows a different convention.\n\n@return The lattice with the combined swaption entries."
] | [
"Sets the options contained in the DJCrosstab to the JRDesignCrosstab.\nAlso fits the correct width",
"Make a sort order for use in a query.",
"This method maps the task unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param taskFixedMeta Fixed meta data for this task\n@param taskFixedData Fixed data for this task\n@param taskVarData Variable task data\n@return Mapping between task identifiers and block position",
"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",
"at this point definition below is not really needed as it is the same as for 1.1, but it is here as place holder when subsystem parser evolves.",
"Validates the deployment.\n\n@param isDomain {@code true} if this is a domain server, otherwise {@code false}\n\n@throws MojoDeploymentException if the deployment is invalid",
"Uses getResult to get the final Result and executes it\n\n@throws ConfigurationException\nIf not result can be found with the returned code",
"Use this API to delete lbroute.",
"Creates a map between a work pattern ID and a list of time entry rows.\n\n@param rows time entry rows\n@return time entry map"
] |
public void setDividerPadding(float padding, final Axis axis) {
if (axis == getOrientationAxis()) {
super.setDividerPadding(padding, axis);
} else {
Log.w(TAG, "Cannot apply divider padding for wrong axis [%s], orientation = %s",
axis, getOrientation());
}
} | [
"Sets divider padding for axis. If axis does not match the orientation, it has no effect.\n@param padding\n@param axis {@link Axis}"
] | [
"Get the authentication method to use.\n\n@return authentication method",
"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.",
"Singleton of MetaClassRegistry.\n\n@param includeExtension\n@return the registry",
"Parses command-line and checks if metadata is consistent across all\nnodes.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException",
"Scans a set of classes for both ReaderListeners and Swagger annotations. All found listeners will\nbe instantiated before any of the classes are scanned for Swagger annotations - so they can be invoked\naccordingly.\n\n@param classes a set of classes to scan\n@return the generated Swagger definition",
"This method is called to format a rate.\n\n@param value rate value\n@return formatted rate",
"All the sub-level attributes.\n\n@param name the attribute name.\n@param attribute the attribute.",
"Leave a group.\n\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.leave.html\">lickr.groups.leave</a> for a description of the various behaviors possible\nwhen a user leaves a group.\n\n@param groupId\n- the id of the group to leave\n@param deletePhotos\n- delete photos by this user from group",
"Specifies the object id associated with a user assigned managed service identity\nresource that should be used to retrieve the access token.\n\n@param objectId Object ID of the identity to use when authenticating to Azure AD.\n@return MSICredentials"
] |
public boolean projectExists(String name) throws IllegalArgumentException {
if (name == null || name.isEmpty()) {
throw new IllegalArgumentException("Project name cannot be empty");
}
return listProjects().stream()
.map(p -> p.getMetadata().getName())
.anyMatch(Predicate.isEqual(name));
} | [
"Checks if the given project exists or not.\n\n@param name project name\n@return true/false\n@throws IllegalArgumentException"
] | [
"Reads a nested table. Uses the supplied reader class instance.\n\n@param readerClass reader class instance\n@return table rows",
"Helper method to copy the contents of a stream to a file.\n@param outputDirectory The directory in which the new file is created.\n@param stream The stream to copy.\n@param targetFileName The file to write the stream contents to.\n@throws IOException If the stream cannot be copied.",
"use parseJsonResponse instead",
"Creates a real valued diagonal matrix of the specified type",
"Get the JSON string representation of the selector configured for this index.\n\n@return selector JSON as string",
"This method extracts data for a single calendar from an MSPDI file.\n\n@param calendar Calendar data\n@param map Map of calendar UIDs to names\n@param baseCalendars list of base calendars",
"Update the state of the picker. If it has an owner, the picker\nwill use that object to derive its position and orientation.\nThe \"active\" state of this controller is used to indicate touch.\nThe cursor position is updated after picking.",
"Set the pattern scheme to either \"by weekday\" or \"by day of month\".\n@param isByWeekDay flag, indicating if the pattern \"by weekday\" should be set.\n@param fireChange flag, indicating if a value change event should be fired.",
"Retrieve all addresses of a host by it's address. NetBIOS hosts can\nhave many names for a given IP address. The name and IP address make the\nNetBIOS address. This provides a way to retrieve the other names for a\nhost with the same IP address.\n\n@param addr the address to query\n@throws UnknownHostException if address cannot be resolved"
] |
public static Type boxedType(Type type) {
if (type instanceof Class<?>) {
return boxedClass((Class<?>) type);
} else {
return type;
}
} | [
"Gets the boxed type of a class\n\n@param type The type\n@return The boxed type"
] | [
"This method is very similar to addMainHandler, except ShellFactory\nwill pass all handlers registered with this method to all this shell's subshells.\n\n@see org.gearvrf.debug.cli.Shell#addMainHandler(java.lang.Object, java.lang.String)\n\n@param handler Object which should be registered as handler.\n@param prefix Prefix that should be prepended to all handler's command names.",
"Remove the given pair into the map.\n\n<p>\nIf the given key is inside the map, but is not mapped to the given value, the\nmap will not be changed.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param entry the entry (key, value) to remove from the map.\n@return {@code true} if the pair was removed.\n@since 2.15",
"will trigger workers to cancel then wait for it to report back.",
"Arrange to become the tempo master. Starts a sequence of interactions with the other players that should end\nup with us in charge of the group tempo and beat alignment.\n\n@throws IllegalStateException if we are not sending status updates\n@throws IOException if there is a problem sending the master yield request",
"Put event.\n\n@param eventType the event type\n@throws Exception the exception",
"Get the Json Schema of the input path, assuming the path contains just one\nschema version in all files under that path.",
"Reads the availability table from the file.\n\n@param resource MPXJ resource instance\n@param periods MSPDI availability periods",
"Create a rollback patch based on the recorded actions.\n\n@param patchId the new patch id, depending on release or one-off\n@param patchType the current patch identity\n@return the rollback patch",
"See if a range for assignment is specified. If so return the range, otherwise return null\n\nExample of assign range:\na(0:3,4:5) = blah\na((0+2):3,4:5) = blah"
] |
public Eval<UploadResult> putAsync(String key, Object value) {
return Eval.later(() -> put(key, value))
.map(t -> t.orElse(null))
.map(FluentFunctions.ofChecked(up -> up.waitForUploadResult()));
} | [
"Non-blocking call that will throw any Exceptions in the traditional\nmanner on access\n\n@param key\n@param value\n@return"
] | [
"get the type signature corresponding to given class\n\n@param clazz\n@return",
"If the given result is not cudnnStatus.CUDNN_STATUS_SUCCESS\nand exceptions have been enabled, this method will throw a\nCudaException with an error message that corresponds to the\ngiven result code. Otherwise, the given result is simply\nreturned.\n\n@param result The result to check\n@return The result that was given as the parameter\n@throws CudaException If exceptions have been enabled and\nthe given result code is not cudnnStatus.CUDNN_STATUS_SUCCESS",
"Checks to see if all the provided matrices are the expected size for an SVD. If an error is encountered\nthen an exception is thrown. This automatically handles compact and non-compact formats",
"Create a KnowledgeBuilderConfiguration on which properties can be set. Use\nthe given properties file and ClassLoader - either of which can be null.\n@return\nThe KnowledgeBuilderConfiguration.",
"Obtain newline-delimited headers from method\n\n@param method HttpMethod to scan\n@return newline-delimited headers",
"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",
"Append the Parameter\nAdd the place holder ? or the SubQuery\n@param value the value of the criteria",
"Returns the AirMapView implementation as requested by the mapType argument. Use this method if\nyou need to request a specific AirMapView implementation that is not necessarily the preferred\ntype. For example, you can use it to explicit request a web-based map implementation.\n\n@param mapType Map type for the requested AirMapView implementation.\n@return An {@link AirMapViewBuilder} for the requested {@link AirMapViewTypes} mapType.",
"Get a list of comments made for a particular entity\n\n@param entityId - id of the commented entity\n@param entityType - type of the entity\n@return list of comments"
] |
public static String getPrettyMapOfContiguousPartitionRunLengths(final Cluster cluster,
int zoneId) {
Map<Integer, Integer> runLengthToCount = getMapOfContiguousPartitionRunLengths(cluster,
zoneId);
String prettyHistogram = "[";
boolean first = true;
Set<Integer> runLengths = new TreeSet<Integer>(runLengthToCount.keySet());
for(int runLength: runLengths) {
if(first) {
first = false;
} else {
prettyHistogram += ", ";
}
prettyHistogram += "{" + runLength + " : " + runLengthToCount.get(runLength) + "}";
}
prettyHistogram += "]";
return prettyHistogram;
} | [
"Pretty prints the output of getMapOfContiguousPartitionRunLengths\n\n@param cluster\n@param zoneId\n@return pretty string of contiguous run lengths"
] | [
"Provides the results of a QR decomposition. These will be modified by adding or removing\nrows from the original 'A' matrix.\n\n@param Q The Q matrix which is to be modified. Is modified later and reference saved.\n@param R The R matrix which is to be modified. Is modified later and reference saved.",
"Remove custom overrides\n\n@param path_id ID of path containing custom override\n@param client_uuid UUID of the client\n@throws Exception exception",
"This function uses a proxy which is capable of transforming typed invocations into proper HTTP calls\nwhich will be understood by RESTful services. This works for subresources as well. Interfaces and\nconcrete classes can be proxified, in the latter case a CGLIB runtime dependency is needed. CXF JAX-RS\nproxies can be configured the same way as HTTP-centric WebClients and response status and headers can\nalso be checked. HTTP response errors can be converted into typed exceptions.",
"Creates the style definition used for a rectangle element based on the given properties of the rectangle\n@param x The X coordinate of the rectangle.\n@param y The Y coordinate of the rectangle.\n@param width The width of the rectangle.\n@param height The height of the rectangle.\n@param stroke Should there be a stroke around?\n@param fill Should the rectangle be filled?\n@return The resulting element style definition.",
"Updates the position and direction of this light from the transform of\nscene object that owns it.",
"Returns the total number of elements which are true.\n@return number of elements which are set to true",
"Computes the product of the diagonal elements. For a diagonal or triangular\nmatrix this is the determinant.\n\n@param T A matrix.\n@return product of the diagonal elements.",
"Utility method to clear cached calendar data.",
"Enables a custom response\n\n@param model\n@param custom\n@param path_id\n@param clientUUID\n@return\n@throws Exception"
] |
private void processFile(InputStream is) throws MPXJException
{
try
{
InputStreamReader reader = new InputStreamReader(is, CharsetHelper.UTF8);
Tokenizer tk = new ReaderTokenizer(reader)
{
@Override protected boolean startQuotedIsValid(StringBuilder buffer)
{
return buffer.length() == 1 && buffer.charAt(0) == '<';
}
};
tk.setDelimiter(DELIMITER);
ArrayList<String> columns = new ArrayList<String>();
String nextTokenPrefix = null;
while (tk.getType() != Tokenizer.TT_EOF)
{
columns.clear();
TableDefinition table = null;
while (tk.nextToken() == Tokenizer.TT_WORD)
{
String token = tk.getToken();
if (columns.size() == 0)
{
if (token.charAt(0) == '#')
{
int index = token.lastIndexOf(':');
if (index != -1)
{
String headerToken;
if (token.endsWith("-") || token.endsWith("="))
{
headerToken = token;
token = null;
}
else
{
headerToken = token.substring(0, index);
token = token.substring(index + 1);
}
RowHeader header = new RowHeader(headerToken);
table = m_tableDefinitions.get(header.getType());
columns.add(header.getID());
}
}
else
{
if (token.charAt(0) == 0)
{
processFileType(token);
}
}
}
if (table != null && token != null)
{
if (token.startsWith("<\"") && !token.endsWith("\">"))
{
nextTokenPrefix = token;
}
else
{
if (nextTokenPrefix != null)
{
token = nextTokenPrefix + DELIMITER + token;
nextTokenPrefix = null;
}
columns.add(token);
}
}
}
if (table != null && columns.size() > 1)
{
// System.out.println(table.getName() + " " + columns.size());
// ColumnDefinition[] columnDefs = table.getColumns();
// int unknownIndex = 1;
// for (int xx = 0; xx < columns.size(); xx++)
// {
// String x = columns.get(xx);
// String columnName = xx < columnDefs.length ? (columnDefs[xx] == null ? "UNKNOWN" + (unknownIndex++) : columnDefs[xx].getName()) : "?";
// System.out.println(columnName + ": " + x + ", ");
// }
// System.out.println();
TextFileRow row = new TextFileRow(table, columns, m_epochDateFormat);
List<Row> rows = m_tables.get(table.getName());
if (rows == null)
{
rows = new LinkedList<Row>();
m_tables.put(table.getName(), rows);
}
rows.add(row);
}
}
}
catch (Exception ex)
{
throw new MPXJException(MPXJException.READ_ERROR, ex);
}
} | [
"Tokenizes the input file and extracts the required data.\n\n@param is input stream\n@throws MPXJException"
] | [
"Replace bad xml charactes in given array by space\n\n@param cbuf buffer to replace in\n@param off Offset from which to start reading characters\n@param len Number of characters to be replaced",
"Constraint that ensures that the field has a column property. If none is specified, then\nthe name of the field is used.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)",
"Set work connection.\n\n@param db the db setup bean",
"If X == null then the solution is written into B. Otherwise the solution is copied\nfrom B into X.",
"Create a collection object of the given collection type. If none has been given,\nOJB uses RemovalAwareList, RemovalAwareSet, or RemovalAwareCollection depending\non the field type.\n\n@param desc The collection descriptor\n@param collectionClass The collection class specified in the collection-descriptor\n@return The collection object",
"Update the repeat number for a client path\n\n@param newNum new repeat number of the path\n@param path_id ID of the path\n@param client_uuid UUID of the client\n@throws Exception exception",
"Process the timephased resource assignment data to work out the\nsplit structure of the task.\n\n@param task parent task\n@param timephasedComplete completed resource assignment work\n@param timephasedPlanned planned resource assignment work",
"Returns a copy of this year-quarter with the new year and quarter, checking\nto see if a new object is in fact required.\n\n@param newYear the year to represent, validated from MIN_YEAR to MAX_YEAR\n@param newQuarter the quarter-of-year to represent, validated not null\n@return the year-quarter, not null",
"Dump the buffer contents to a file\n@param file\n@throws IOException"
] |
public static <T> DecoratorImpl<T> of(BeanAttributes<T> attributes, EnhancedAnnotatedType<T> clazz, BeanManagerImpl beanManager) {
return new DecoratorImpl<T>(attributes, clazz, beanManager);
} | [
"Creates a decorator bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return a Bean"
] | [
"Sets the right padding for all cells in the row.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining",
"Places a disabled marker file in the directory of the specified version.\n\n@param version to disable\n@throws PersistenceFailureException if the marker file could not be created (can happen if\nthe storage system has become read-only or is otherwise\ninaccessible).",
"Handles the response of the SendData request.\n@param incomingMessage the response message to process.",
"Harvest a single value that was returned by a callable statement.\n\n@param obj the object that will receive the value that is harvested.\n@param callable the CallableStatement that contains the value to harvest\n@param fmd the FieldDescriptor that identifies the field where the\nharvested value will be stord.\n@param index the parameter index.\n\n@throws PersistenceBrokerSQLException if a problem occurs.",
"Sets the current collection definition derived from the current member, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the collection as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\ncollection on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe collection\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\ncollection\"\[email protected] name=\"collection-class\" optional=\"true\" description=\"The type of the collection if not a\njava.util type or an array\"\[email protected] name=\"database-foreignkey\" optional=\"true\" description=\"Whether a database foreignkey shall be created\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the collection\"\[email protected] name=\"element-class-ref\" optional=\"true\" description=\"The fully qualified name of\nthe element type\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The name of the\nforeign keys (columns when an indirection table is given)\"\[email protected] name=\"foreignkey-documentation\" optional=\"true\" description=\"Documentation\non the foreign keys as a comma-separated list if using an indirection table\"\[email protected] name=\"indirection-table\" optional=\"true\" description=\"The name of the indirection\ntable for m:n associations\"\[email protected] name=\"indirection-table-documentation\" optional=\"true\" description=\"Documentation\non the indirection table\"\[email protected] name=\"indirection-table-primarykeys\" optional=\"true\" description=\"Whether the\nfields referencing the collection and element classes, should also be primarykeys\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the collection is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the collection\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"query-customizer\" optional=\"true\" description=\"The query customizer for this collection\"\[email protected] name=\"query-customizer-attributes\" optional=\"true\" description=\"Attributes for the query customizer\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\ncollection\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The name of the\nforeign key columns pointing to the elements if using an indirection table\"\[email protected] name=\"remote-foreignkey-documentation\" optional=\"true\" description=\"Documentation\non the remote foreign keys as a comma-separated list if using an indirection table\"",
"generate a message for loglevel WARN\n\n@param pObject the message Object",
"Retrieve the currently cached value for the given document.",
"Retrieve column font details from a block of property data.\n\n@param data property data\n@param offset offset into property data\n@param fontBases map of font bases\n@return ColumnFontStyle instance",
"Flattens an option into its value or else null, which is not great but is usually more convenient in Java.\n@param option Optional value -- either Some(T) or None\n@param <T> Any type\n@return The value inside the option, or else null"
] |
public static synchronized FormInputValueHelper getInstance(
InputSpecification inputSpecification, FormFillMode formFillMode) {
if (instance == null)
instance = new FormInputValueHelper(inputSpecification,
formFillMode);
return instance;
} | [
"Creates or returns the instance of the helper class.\n\n@param inputSpecification the input specification.\n@param formFillMode if random data should be used on the input fields.\n@return The singleton instance."
] | [
"Creates the container for a bundle with descriptor.\n@return the container for a bundle with descriptor.\n@throws IOException thrown if reading the bundle fails.\n@throws CmsException thrown if reading the bundle fails.",
"Adds OPT_X | OPT_HEX option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Remove a child view of Android hierarchy view .\n\n@param view View to be removed.",
"Check if this applies to the provided authorization scope and return the credentials for that scope or\nnull if it doesn't apply to the scope.\n\n@param authscope the scope to test against.",
"Logout the current session. After calling this method,\nthe session will be cleared",
"Add a method to the enabled response overrides for a path\n\n@param pathName name of path\n@param methodName name of method\n@return true if success, false otherwise",
"Compute the offset for the item in the layout based on the offsets of neighbors\nin the layout. The other offsets are not patched. If neighbors offsets have not\nbeen computed the offset of the item will not be set.\n@return true if the item fits the container, false otherwise",
"Returns the configured bundle, or the provided default bundle.\n@param defaultMessages the default bundle\n@param locale the preferred locale\n@return the configured bundle or, if not found, the default bundle.",
"Gathers information, that couldn't be collected while tree traversal."
] |
public ParallelTaskBuilder prepareUdp(String command) {
reinitIfClosed();
ParallelTaskBuilder cb = new ParallelTaskBuilder();
cb.setProtocol(RequestProtocol.UDP);
cb.getUdpMeta().setCommand(command);
return cb;
} | [
"Prepare a parallel UDP Task.\n\n@param command\nthe command\n@return the parallel task builder"
] | [
"Generate and return the list of statements to create a database table and any associated features.",
"Rethrows platform specific OperationCanceledExceptions and unwraps OperationCanceledErrors. Does nothing for any other type of Throwable.",
"Aliases variables with an unknown type.\n@param variable The variable being aliased\n@param name Name of the variable",
"Read a text file into a single string\n\n@param file\nThe file to read\n@return The contents, or null on error.",
"calculate arc angle between point a and point b\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return",
"Synchronize the scroll positions of the scrollbars with the actual scroll\nposition of the content.",
"Resolve the single type argument of the given generic interface against the given\ntarget method which is assumed to return the given interface or an implementation\nof it.\n@param method the target method to check the return type of\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved parameter type of the method return type, or {@code null}\nif not resolvable or if the single argument is of type {@link WildcardType}.",
"Invokes the given configurator, obtaining the correct global context type via the datastore configuration type of\nthe current datastore provider.\n\n@param configurator the configurator to invoke\n@return a context object containing the options set via the given configurator",
"Removes all of the markers from the map."
] |
private ProjectFile handleDatabaseInDirectory(File directory) throws Exception
{
byte[] buffer = new byte[BUFFER_SIZE];
File[] files = directory.listFiles();
if (files != null)
{
for (File file : files)
{
if (file.isDirectory())
{
continue;
}
FileInputStream fis = new FileInputStream(file);
int bytesRead = fis.read(buffer);
fis.close();
//
// If the file is smaller than the buffer we are peeking into,
// it's probably not a valid schedule file.
//
if (bytesRead != BUFFER_SIZE)
{
continue;
}
if (matchesFingerprint(buffer, BTRIEVE_FINGERPRINT))
{
return handleP3BtrieveDatabase(directory);
}
if (matchesFingerprint(buffer, STW_FINGERPRINT))
{
return handleSureTrakDatabase(directory);
}
}
}
return null;
} | [
"Given a directory, determine if it contains a multi-file database whose format\nwe can process.\n\n@param directory directory to process\n@return ProjectFile instance if we can process anything, or null"
] | [
"An extremely simple method for identifying multimedia. This\ncould be improved, but it's good enough for this example.\n\n@param file which could be an image or a video\n@return true if the file can be previewed, false otherwise",
"Use this API to fetch all the dnsnsecrec resources that are configured on netscaler.",
"Validates for non-conflicting roles",
"Finish initialization of the configuration.",
"This function looks for files with the \"wrong\" replica type in their name, and\nif it finds any, renames them.\n\nThose files may have ended up on this server either because:\n- 1. We restored them from another server, where they were named according to\nanother replica type. Or,\n- 2. The {@link voldemort.store.readonly.mr.azkaban.VoldemortBuildAndPushJob}\nand the {@link voldemort.store.readonly.fetcher.HdfsFetcher} are\noperating in 'build.primary.replicas.only' mode, so they only ever built\nand fetched replica 0 of any given file.\n\nNote: This is an implementation detail of the READONLY_V2 naming scheme, and should\nnot be used outside of that scope.\n\n@param masterPartitionId partition ID of the \"primary replica\"\n@param correctReplicaType replica number which should be found on the current\nnode for the provided masterPartitionId.",
"Performs backward pass of Batch Normalization layer. Returns x gradient,\nbnScale gradient and bnBias gradient",
"Creates a method signature.\n\n@param method Method instance\n@return method signature",
"Called every frame if the picker is enabled\nto generate pick events.\n@param frameTime starting time of the current frame",
"close the AdminPool, if no long required.\nAfter closed, all public methods will throw IllegalStateException"
] |
public void createDB() throws PlatformException
{
if (_creationScript == null)
{
createCreationScript();
}
Project project = new Project();
TorqueDataModelTask modelTask = new TorqueDataModelTask();
File tmpDir = null;
File scriptFile = null;
try
{
tmpDir = new File(getWorkDir(), "schemas");
tmpDir.mkdir();
scriptFile = new File(tmpDir, CREATION_SCRIPT_NAME);
writeCompressedText(scriptFile, _creationScript);
project.setBasedir(tmpDir.getAbsolutePath());
// we use the ant task 'sql' to perform the creation script
SQLExec sqlTask = new SQLExec();
SQLExec.OnError onError = new SQLExec.OnError();
onError.setValue("continue");
sqlTask.setProject(project);
sqlTask.setAutocommit(true);
sqlTask.setDriver(_jcd.getDriver());
sqlTask.setOnerror(onError);
sqlTask.setUserid(_jcd.getUserName());
sqlTask.setPassword(_jcd.getPassWord() == null ? "" : _jcd.getPassWord());
sqlTask.setUrl(getDBCreationUrl());
sqlTask.setSrc(scriptFile);
sqlTask.execute();
deleteDir(tmpDir);
}
catch (Exception ex)
{
// clean-up
if ((tmpDir != null) && tmpDir.exists())
{
try
{
scriptFile.delete();
}
catch (NullPointerException e)
{
LoggerFactory.getLogger(this.getClass()).error("NPE While deleting scriptFile [" + scriptFile.getName() + "]", e);
}
}
throw new PlatformException(ex);
}
} | [
"Creates the database.\n\n@throws PlatformException If some error occurred"
] | [
"Add the set of partitions to the node provided\n\n@param node The node to which we'll add the partitions\n@param donatedPartitions The list of partitions to add\n@return The new node with the new partitions",
"Used to add working hours to the calendar. Note that the MPX file\ndefinition allows a maximum of 7 calendar hours records to be added to\na single calendar.\n\n@param day day number\n@return new ProjectCalendarHours instance",
"Applies the kubernetes json url to the configuration.\n\n@param map\nThe arquillian configuration.",
"Convert an object to a set.\n\n@param mapper the object mapper\n@param source the source object\n@param targetElementType the target set element type\n@return set",
"Take screenshot of the current window.\n\n@param target The target type/format of the Screenshot\n@return Screenshot of current window, in the requested format",
"Recurses the given folder and creates the FileModels vertices for the child files to the graph.",
"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",
"Edit which photos are in the photoset.\n\n@param photosetId\nThe photoset ID\n@param primaryPhotoId\nThe primary photo Id\n@param photoIds\nThe photo IDs for the photos in the set\n@throws FlickrException",
"Check, if the resource should be exported with minimal meta-data.\nThis holds for resources that are not part of the export, but must be\nexported as super-folders.\n\n@param path export-site relative path of the resource to check.\n\n@return flag, indicating if the resource should be exported with minimal meta data."
] |
public static DMatrixRMaj elements(DMatrixRMaj A , BMatrixRMaj marked , DMatrixRMaj output ) {
if( A.numRows != marked.numRows || A.numCols != marked.numCols )
throw new MatrixDimensionException("Input matrices must have the same shape");
if( output == null )
output = new DMatrixRMaj(1,1);
output.reshape(countTrue(marked),1);
int N = A.getNumElements();
int index = 0;
for (int i = 0; i < N; i++) {
if( marked.data[i] ) {
output.data[index++] = A.data[i];
}
}
return output;
} | [
"Returns a row matrix which contains all the elements in A which are flagged as true in 'marked'\n\n@param A Input matrix\n@param marked Input matrix marking elements in A\n@param output Storage for output row vector. Can be null. Will be reshaped.\n@return Row vector with marked elements"
] | [
"Mapping originator.\n\n@param originator the originator\n@return the originator type",
"Creates a document for the resource without extracting the content. The aim is to get a content indexed,\neven if extraction runs into a timeout.\n\n@return the document for the resource generated if the content is discarded,\ni.e., only meta information are indexed.",
"Extract resource data.",
"Write attributes for an individual custom field.\nNote that at present we are only writing a subset of the\navailable data... in this instance the field alias.\nIf the field does not have an alias we won't write an\nentry.\n\n@param field custom field to write\n@throws IOException",
"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.",
"Main method of this class related to RecyclerView widget. This method is the responsible of\ncreate a new Renderer instance with all the needed information to implement the rendering.\nThis method will validate all the attributes passed in the builder constructor and will create\na RendererViewHolder instance.\n\nThis method is used with RecyclerView because the view recycling mechanism is implemented out\nof this class and we only have to return new RendererViewHolder instances.\n\n@return ready to use RendererViewHolder instance.",
"Get new vector clock based on this clock but incremented on index nodeId\n\n@param nodeId The id of the node to increment\n@return A vector clock equal on each element execept that indexed by\nnodeId",
"This snapshot is meant to be used when updating data.",
"Decompiles a single type.\n\n@param metadataSystem\n@param typeName\n@return\n@throws IOException"
] |
public boolean checkXpathStartsWithXpathEventableCondition(Document dom,
EventableCondition eventableCondition, String xpath) throws XPathExpressionException {
if (eventableCondition == null || Strings
.isNullOrEmpty(eventableCondition.getInXPath())) {
throw new CrawljaxException("Eventable has no XPath condition");
}
List<String> expressions =
XPathHelper.getXpathForXPathExpressions(dom, eventableCondition.getInXPath());
return checkXPathUnderXPaths(xpath, expressions);
} | [
"Checks whether an XPath expression starts with an XPath eventable condition.\n\n@param dom The DOM String.\n@param eventableCondition The eventable condition.\n@param xpath The XPath.\n@return boolean whether xpath starts with xpath location of eventable condition xpath\ncondition\n@throws XPathExpressionException\n@throws CrawljaxException when eventableCondition is null or its inXPath has not been set"
] | [
"Updates the properties of a tag. Only the fields provided in the `data`\nblock will be updated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the task.\n\nReturns the complete updated tag record.\n\n@param tag The tag to update.\n@return Request object",
"Use this API to unset the properties of sslcertkey resources.\nProperties that need to be unset are specified in args array.",
"Search for the second entry in the second database. Use this method for databases configured with no duplicates.\n\n@param second second key (value for first).\n@return null if no entry found, otherwise the value.",
"Show multiple channels. All other channels will be unaffected.\n@param channels The channels to show",
"Stop the drag action.",
"This method allows a pre-existing resource calendar to be attached to a\nresource.\n\n@param calendar resource calendar",
"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",
"Obtains a Accounting zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Accounting zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Pre API 11, this does an alpha animation.\n\n@param progress"
] |
public int nextToken() throws IOException
{
int c;
int nextc = -1;
boolean quoted = false;
int result = m_next;
if (m_next != 0)
{
m_next = 0;
}
m_buffer.setLength(0);
while (result == 0)
{
if (nextc != -1)
{
c = nextc;
nextc = -1;
}
else
{
c = read();
}
switch (c)
{
case TT_EOF:
{
if (m_buffer.length() != 0)
{
result = TT_WORD;
m_next = TT_EOF;
}
else
{
result = TT_EOF;
}
break;
}
case TT_EOL:
{
int length = m_buffer.length();
if (length != 0 && m_buffer.charAt(length - 1) == '\r')
{
--length;
m_buffer.setLength(length);
}
if (length == 0)
{
result = TT_EOL;
}
else
{
result = TT_WORD;
m_next = TT_EOL;
}
break;
}
default:
{
if (c == m_quote)
{
if (quoted == false && startQuotedIsValid(m_buffer))
{
quoted = true;
}
else
{
if (quoted == false)
{
m_buffer.append((char) c);
}
else
{
nextc = read();
if (nextc == m_quote)
{
m_buffer.append((char) c);
nextc = -1;
}
else
{
quoted = false;
}
}
}
}
else
{
if (c == m_delimiter && quoted == false)
{
result = TT_WORD;
}
else
{
m_buffer.append((char) c);
}
}
}
}
}
m_type = result;
return (result);
} | [
"This method retrieves the next token and returns a constant representing\nthe type of token found.\n\n@return token type value"
] | [
"Sets the columns width by reading some report options like the\nprintableArea and useFullPageWidth.\ncolumns with fixedWidth property set in TRUE will not be modified",
"Remove a license from an artifact\n\n@param gavc String The artifact GAVC\n@param licenseId String The license id to be removed.",
"Searches the Html5ReportGenerator in Java path and instantiates the report",
"Performs a null edit on an entity. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param currentDocument\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection",
"Common method for creating styles.\n\n@param template the template that the map is part of\n@param styleRef the style ref identifying the style\n@param <T> the source type",
"Add authentication information for the given host\n@param host the host\n@param credentials the credentials\n@param authScheme the scheme for preemptive authentication (should be\n<code>null</code> if adding authentication for a proxy server)\n@param context the context in which the authentication information\nshould be saved",
"Retrieve a boolean value.\n\n@param name column name\n@return boolean value",
"Look up the database server port reported by a given player. You should not use this port directly; instead\nask this class for a session to use while you communicate with the database.\n\n@param player the player number of interest\n\n@return the port number on which its database server is running, or -1 if unknown\n\n@throws IllegalStateException if not running",
"Use this API to unset the properties of vridparam resource.\nProperties that need to be unset are specified in args array."
] |
public ListActiveCoursesInAccountOptions searchTerm(String searchTerm) {
if(searchTerm == null || searchTerm.length() < 3) {
throw new IllegalArgumentException("Search term must be at least 3 characters");
}
addSingleItem("search_term", searchTerm);
return this;
} | [
"Filter on a search term. Can be course name, code or full ID. Must be at least 3 characters\n@param searchTerm Search term to filter by\n@return This object to allow adding more options"
] | [
"Determine how many forked JVMs to use.",
"Retrieve the parent task based on its WBS.\n\n@param wbs parent WBS\n@return parent task",
"If needed, destroy the remaining conversation contexts after an HTTP session was invalidated within the current request.\n\n@param request",
"Utility function that gives list of values from list of value-pair\nstrings.\n\n@param valuePairs List of value-pair strings\n@param delim Delimiter that separates the value pair\n@returns The list of values; empty if no value-pair is present, The even\nelements are the first ones of the value pair, and the odd\nelements are the second ones. For example, if the list of\nvalue-pair is [\"cluster.xml=file1\", \"stores.xml=file2\"], and the\npair delimiter is '=', we will then have the list of values in\nreturn: [\"cluster.xml\", \"file1\", \"stores.xml\", \"file2\"].",
"Get a property as a array or throw exception.\n\n@param key the property name",
"Create a JavadocComment, by formatting the text of the Javadoc using the given indentation.",
"Use this API to update Interface resources.",
"Reverse Engineers an XPath Expression of a given Node in the DOM.\n\n@param node the given node.\n@return string xpath expression (e.g., \"/html[1]/body[1]/div[3]\").",
"Get a View that displays the data at the specified\nposition in the data set. In this case, if we are at\nthe end of the list and we are still in append mode, we\nask for a pending view and return it, plus kick off the\nbackground task to append more data to the wrapped\nadapter.\n\n@param position Position of the item whose data we want\n@param convertView View to recycle, if not null\n@param parent ViewGroup containing the returned View"
] |
@Override
public Optional<SoyMapData> toSoyMap(@Nullable final Object model) throws Exception {
if (model instanceof SoyMapData) {
return Optional.of((SoyMapData) model);
}
if (model instanceof Map) {
return Optional.of(new SoyMapData(model));
}
return Optional.of(new SoyMapData());
} | [
"Pass a model object and return a SoyMapData if a model object happens\nto be a SoyMapData.\n\nAn implementation will also check if a passed in object is a Map and return\na SoyMapData wrapping that map"
] | [
"Remove the given pair from a given map for obtaining a new map.\n\n<p>\nIf the given key is inside the map, but is not mapped to the given value, the\nmap will not be changed.\n</p>\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param left the map to consider.\n@param right the entry (key, value) to remove from the map.\n@return an immutable map with the content of the map and with the given entry.\n@throws IllegalArgumentException - when the right operand key exists in the left operand.\n@since 2.15",
"This method prints goal information of an agent through its external\naccess. It can be used to check the correct behaviour of the agent.\n\n@param agent_name\nThe name of the agent\n@param connector\nThe connector to get the external access\n@return goals the IGoal[] with all the information, so the tester can\nlook for information",
"Inserts the provided document. If the document is missing an identifier, the client should\ngenerate one.\n\n@param document the document to insert\n@return a task containing the result of the insert one operation",
"Assigns a list of nodes in the cluster represented by this failure\ndetector configuration.\n\n@param nodes Collection of Node instances, usually determined from the\nCluster; must be non-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",
"Calculate start dates for a weekly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"The primary run loop of the event processor.",
"Sets the provided square matrix to be a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\n\n@param A The matrix that is to be modified. Must be square. Modified.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.",
"Send a device lost announcement to all registered listeners.\n\n@param announcement the last message received from the vanished device"
] |
private synchronized void initializeFatClient(String storeName, Properties storeClientProps) {
// updates the coordinator metadata with recent stores and cluster xml
updateCoordinatorMetadataWithLatestState();
logger.info("Creating a Fat client for store: " + storeName);
SocketStoreClientFactory fatClientFactory = getFatClientFactory(this.coordinatorConfig.getBootstrapURLs(),
storeClientProps);
if(this.fatClientMap == null) {
this.fatClientMap = new HashMap<String, DynamicTimeoutStoreClient<ByteArray, byte[]>>();
}
DynamicTimeoutStoreClient<ByteArray, byte[]> fatClient = new DynamicTimeoutStoreClient<ByteArray, byte[]>(storeName,
fatClientFactory,
1,
this.coordinatorMetadata.getStoreDefs(),
this.coordinatorMetadata.getClusterXmlStr());
this.fatClientMap.put(storeName, fatClient);
} | [
"Initialize the fat client for the given store.\n\n1. Updates the coordinatorMetadata 2.Gets the new store configs from the\nconfig file 3.Creates a new @SocketStoreClientFactory 4. Subsequently\ncaches the @StoreClient obtained from the factory.\n\n\nThis is synchronized because if Coordinator Admin is already doing some\nchange we want the AsyncMetadataVersionManager to wait.\n\n@param storeName"
] | [
"Returns the AirMapView implementation as requested by the mapType argument. Use this method if\nyou need to request a specific AirMapView implementation that is not necessarily the preferred\ntype. For example, you can use it to explicit request a web-based map implementation.\n\n@param mapType Map type for the requested AirMapView implementation.\n@return An {@link AirMapViewBuilder} for the requested {@link AirMapViewTypes} mapType.",
"Inserts a Bundle value into the mapping of the underlying Bundle, replacing any existing value\nfor the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Bundle object, or null\n@return this bundler instance to chain method calls",
"Checks all data sets in a given record for constraint violations.\n\n@param record\nIIM record (1,2,3, ...) to check\n\n@return list of constraint violations, empty set if IIM file is valid",
"Set RGB output range.\n\n@param outRGB Range.",
"Samples a batch of indices in the range [0, numExamples) without replacement.",
"for testing purpose",
"Handling out request.\n\n@param message\nthe message\n@throws Fault\nthe fault",
"Can be overridden if you want to replace or supplement the debug handling for responses.\n\n@param responseCode\n@param inputStream",
"Performs a get operation with the specified composite request object\n\n@param requestWrapper A composite request object containing the key (and\n/ or default value) and timeout.\n@return The Versioned value corresponding to the key"
] |
public static dnsview[] get(nitro_service service) throws Exception{
dnsview obj = new dnsview();
dnsview[] response = (dnsview[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the dnsview resources that are configured on netscaler."
] | [
"Use this API to fetch cacheselector resources of given names .",
"Sets top and bottom padding for all cells in the row.\n@param padding new padding for top and bottom, ignored if smaller than 0\n@return this to allow chaining",
"Sets number of pages. If the index of currently selected page is bigger than the total number\nof pages, first page will be selected instead.\n@return difference between the previous number of pages and new one. Negative value is\nreturned if new number of pages is less then it was before.",
"Parses a single query item for the query facet.\n@param item JSON object of the query item.\n@return the parsed query item, or <code>null</code> if parsing failed.",
"find all accessibility object and set active false for enable talk back.",
"Executes the sequence of operations",
"Safe write error response.\n\n@param channel the channel\n@param header the request header\n@param error the exception",
"Validates operation model against the definition and its parameters\n\n@param operation model node of type {@link ModelType#OBJECT}, representing an operation request\n@throws OperationFailedException if the value is not valid\n\n@deprecated Not used by the WildFly management kernel; will be removed in a future release",
"Gets the URL of the route with given name.\n@param routeName to return its URL\n@return URL backed by the route with given name."
] |
ModelNode toModelNode() {
ModelNode result = null;
if (map != null) {
result = new ModelNode();
for (Map.Entry<PathAddress, ResourceData> entry : map.entrySet()) {
ModelNode item = new ModelNode();
PathAddress pa = entry.getKey();
item.get(ABSOLUTE_ADDRESS).set(pa.toModelNode());
ResourceData rd = entry.getValue();
item.get(RELATIVE_ADDRESS).set(pa.subAddress(baseAddressLength).toModelNode());
ModelNode attrs = new ModelNode().setEmptyList();
if (rd.attributes != null) {
for (String attr : rd.attributes) {
attrs.add(attr);
}
}
if (attrs.asInt() > 0) {
item.get(FILTERED_ATTRIBUTES).set(attrs);
}
ModelNode children = new ModelNode().setEmptyList();
if (rd.children != null) {
for (PathElement pe : rd.children) {
children.add(new Property(pe.getKey(), new ModelNode(pe.getValue())));
}
}
if (children.asInt() > 0) {
item.get(UNREADABLE_CHILDREN).set(children);
}
ModelNode childTypes = new ModelNode().setEmptyList();
if (rd.childTypes != null) {
Set<String> added = new HashSet<String>();
for (PathElement pe : rd.childTypes) {
if (added.add(pe.getKey())) {
childTypes.add(pe.getKey());
}
}
}
if (childTypes.asInt() > 0) {
item.get(FILTERED_CHILDREN_TYPES).set(childTypes);
}
result.add(item);
}
}
return result;
} | [
"Report on the filtered data in DMR ."
] | [
"Creates a new instance of this class.\n\n@param variableName\nname of the instance variable to search aliases for. Must\nneither be {@code null} nor empty.\n@param controlFlowBlockToExamine\na {@link ControlFlowBlock} which possibly contains the setup\nof an alias for a lazy variable. This method thereby examines\npredecessors of {@code block}, too. This parameter must not be\n{@code null}.\n@return a new instance of this class.",
"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",
"Save a weak reference to the resource",
"Formats event output by key, usually equal to the method name.\n\n@param key the event key\n@param defaultPattern the default pattern to return if a custom pattern\nis not found\n@param args the args used to format output\n@return A formatted event output",
"Get a writer implementation to push data into Canvas.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param <T> A writer implementation\n@return A writer implementation class",
"return a HashMap with all properties, name as key, value as value\n@return the properties",
"Inserts the specified objects at the specified index in the array.\n\n@param items The objects to insert into the array.\n@param index The index at which the object must be inserted.",
"Await a state.\n\n@param expected the expected state\n@return {@code true} if the state was reached, {@code false} otherwise",
"If this address section is equivalent to the mask for a CIDR prefix block, it returns that prefix length.\nOtherwise, it returns null.\nA CIDR network mask is an address with all 1s in the network section and then all 0s in the host section.\nA CIDR host mask is an address with all 0s in the network section and then all 1s in the host section.\nThe prefix length is the length of the network section.\n\nAlso, keep in mind that the prefix length returned by this method is not equivalent to the prefix length used to construct this object.\nThe prefix length used to construct indicates the network and host section of this address.\nThe prefix length returned here indicates the whether the value of this address can be used as a mask for the network and host\nsection of any other address. Therefore the two values can be different values, or one can be null while the other is not.\n\nThis method applies only to the lower value of the range if this section represents multiple values.\n\n@param network whether to check for a network mask or a host mask\n@return the prefix length corresponding to this mask, or null if there is no such prefix length"
] |
private List<AssignmentField> getAllAssignmentExtendedAttributes()
{
ArrayList<AssignmentField> result = new ArrayList<AssignmentField>();
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_COST));
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_DATE));
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_DURATION));
result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_COST));
result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_DATE));
result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_DURATION));
result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_FLAG));
result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_NUMBER));
result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_RESOURCE_MULTI_VALUE));
result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_RESOURCE_OUTLINE_CODE));
result.addAll(Arrays.asList(AssignmentFieldLists.ENTERPRISE_TEXT));
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_FINISH));
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_FLAG));
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_NUMBER));
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_START));
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_TEXT));
return result;
} | [
"Retrieve list of assignment extended attributes.\n\n@return list of extended attributes"
] | [
"Inserts the specified objects at the specified index in the array.\n\n@param items The objects to insert into the array.\n@param index The index at which the object must be inserted.",
"private HttpServletResponse headers;",
"Write all state items to the log file.\n\n@param fileRollEvent the event to log",
"Signal that this thread will not log any more messages in the multithreaded\nenvironment",
"Creates a code location URL from a URL\n\n@param url the URL external form\n@return A URL created from URL\n@throws InvalidCodeLocation if URL creation fails",
"Cut all characters from maxLength and replace it with \"...\"",
"Checks whether every property except 'preferred' is satisfied\n\n@return",
"Utility method to convert a String to an Integer, and\nhandles null values.\n\n@param value string representation of an integer\n@return int value",
"Enables or disables auto closing when selecting a date."
] |
private static boolean validateEndRecord(File file, FileChannel channel, long startEndRecord, long endSig) throws IOException {
try {
channel.position(startEndRecord);
final ByteBuffer endDirHeader = getByteBuffer(ENDLEN);
read(endDirHeader, channel);
if (endDirHeader.limit() < ENDLEN) {
// Couldn't read the full end of central directory record header
return false;
} else if (getUnsignedInt(endDirHeader, 0) != endSig) {
return false;
}
long pos = getUnsignedInt(endDirHeader, END_CENSTART);
// TODO deal with Zip64
if (pos == ZIP64_MARKER) {
return false;
}
ByteBuffer cdfhBuffer = getByteBuffer(CENLEN);
read(cdfhBuffer, channel, pos);
long header = getUnsignedInt(cdfhBuffer, 0);
if (header == CENSIG) {
long firstLoc = getUnsignedInt(cdfhBuffer, CEN_LOC_OFFSET);
long firstSize = getUnsignedInt(cdfhBuffer, CENSIZ);
if (firstLoc == 0) {
// normal case -- first bytes are the first local file
if (!validateLocalFileRecord(channel, 0, firstSize)) {
return false;
}
} else {
// confirm that firstLoc is indeed the first local file
long fileFirstLoc = scanForLocSig(channel);
if (firstLoc != fileFirstLoc) {
if (fileFirstLoc == 0) {
return false;
} else {
// scanForLocSig() found a LOCSIG, but not at position zero and not
// at the expected position.
// With a file like this, we can't tell if we're in a nested zip
// or we're in an outer zip and had the bad luck to find random bytes
// that look like LOCSIG.
return false;
}
}
}
// At this point, endDirHeader points to the correct end of central dir record.
// Just need to validate the record is complete, including any comment
int commentLen = getUnsignedShort(endDirHeader, END_COMMENTLEN);
long commentEnd = startEndRecord + ENDLEN + commentLen;
return commentEnd <= channel.size();
}
return false;
} catch (EOFException eof) {
// pos or firstLoc weren't really positions and moved us to an invalid location
return false;
}
} | [
"Validates that the data structure at position startEndRecord has a field in the expected position\nthat points to the start of the first central directory file, and, if so, that the file\nhas a complete end of central directory record comment at the end.\n\n@param file the file being checked\n@param channel the channel\n@param startEndRecord the start of the end of central directory record\n@param endSig the end of central dir signature\n@return true if it can be confirmed that the end of directory record points to a central directory\nfile and a complete comment is present, false otherwise\n@throws java.io.IOException"
] | [
"Do some magic to turn request parameters into a context object",
"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",
"Get all registration points associated with this registration.\n\n@return all registration points. Will not be {@code null} but may be empty",
"Wraps the specified object pool for connections as a DataSource.\n\n@param jcd the OJB connection descriptor for the pool to be wrapped\n@param connectionPool the connection pool to be wrapped\n@return a DataSource attached to the connection pool.\nConnections will be wrapped using DBCP PoolGuard, that will not allow\nunwrapping unless the \"accessToUnderlyingConnectionAllowed=true\" configuration\nis specified.",
"Use this API to fetch service_dospolicy_binding resources of given name .",
"Closes a Closeable and swallows any exceptions that might occur in the\nprocess.\n\n@param closeable",
"Peeks the current top of the stack or returns null if the stack is empty\n@return the current top of the stack or returns null if the stack is empty",
"Creates a map of work pattern rows indexed by the primary key.\n\n@param rows work pattern rows\n@return work pattern map",
"Determines if the queue identified by the given key can be used as a delayed queue.\n\n@param jedis\nconnection to Redis\n@param key\nthe key that identifies a queue\n@return true if the key already is a delayed queue or is not currently used, false otherwise"
] |
@SuppressWarnings("SameParameterValue")
public static long bytesToNumberLittleEndian(byte[] buffer, int start, int length) {
long result = 0;
for (int index = start + length - 1; index >= start; index--) {
result = (result << 8) + unsign(buffer[index]);
}
return result;
} | [
"Reconstructs a number that is represented by more than one byte in a network packet in little-endian order, for\nthe very few protocol values that are sent in this quirky way.\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"
] | [
"Removes the key and its associated value from this map.\n\n@param key the key to remove\n@return the value associated with that key, or null if\nthe key was not in the map",
"Adds the complex number with a scalar value.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNumber instance containing the add of specified complex number with scalar value.",
"This method is called on every reference that is in the .class file.\n@param typeReference\n@return",
"Returns a persistence strategy based on the passed configuration.\n\n@param cacheMapping the selected {@link org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType}\n@param externalCacheManager the infinispan cache manager\n@param configurationUrl the location of the configuration file\n@param jtaPlatform the {@link JtaPlatform}\n@param entityTypes the meta-data of the entities\n@param associationTypes the meta-data of the associations\n@param idSourceTypes the meta-data of the id generators\n@return the persistence strategy",
"Write calendar hours.\n\n@param parentCalendar parent calendar instance\n@param record calendar hours instance\n@throws IOException",
"Helper method to send message on outputStream and account for network\ntime stats.\n\n@param outputStream\n@param message\n@throws IOException",
"Converts an Accumulo Range to a Fluo Span\n\n@param range Range\n@return Span",
"Add an object into cache by key with expiration time specified\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached\n@param expiration\nthe seconds after which the object will be evicted from the cache",
"Deletes this collaboration."
] |
protected void prepForWrite(SelectionKey selectionKey) {
if(logger.isTraceEnabled())
traceInputBufferState("About to clear read buffer");
if(requestHandlerFactory.shareReadWriteBuffer() == false) {
inputStream.clear();
}
if(logger.isTraceEnabled())
traceInputBufferState("Cleared read buffer");
outputStream.getBuffer().flip();
selectionKey.interestOps(SelectionKey.OP_WRITE);
} | [
"Flips the output buffer, and lets the Selector know we're ready to write.\n\n@param selectionKey"
] | [
"Request to join a group.\n\nNote: if a group has rules, the client must display the rules to the user and the user must accept them (which is indicated by passing a true value to\nacceptRules) prior to making the join request.\n\n@param groupId\n- groupId parameter\n@param message\n- (required) message to group administrator\n@param acceptRules\n- (required) parameter indicating user has accepted groups rules",
"Determine the relevant pieces of configuration which need to be included when processing the domain model.\n\n@param root the resource root\n@param requiredConfigurationHolder the resolution context\n@param serverConfig the server config\n@param extensionRegistry the extension registry",
"Finds trajectory by ID\n@param t List of Trajectories\n@param id ID of the trajectorie\n@return Trajectory with ID=id",
"If there is a zero on the diagonal element, the off diagonal element needs pushed\noff so that all the algorithms assumptions are two and so that it can split the matrix.",
"Populate a sorted list of custom fields to ensure that these fields\nare written to the file in a consistent order.",
"Extracts the zip file to the output folder\n\n@param zipFile ZIP File to extract\n@param outputFolder Output Folder\n@return A Collection with the extracted files\n@throws IOException I/O Error",
"Remove a path from a profile\n\n@param path_id path ID to remove\n@param profileId profile ID to remove path from",
"Close and remove expired streams. Package protected to allow unit tests to invoke it.",
"Gives an sequence of ByteBuffers of a specified range. Writing to these ByteBuffers modifies the contents of this LBuffer.\n@param offset\n@param size\n@return"
] |
public static void validate(final Organization organization) {
if(organization.getName() == null ||
organization.getName().isEmpty()){
throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
.entity("Organization name cannot be null or empty!")
.build());
}
} | [
"Checks if the provided organization is valid and could be stored into the database\n\n@param organization Organization\n@throws WebApplicationException if the data is corrupted"
] | [
"Pauses the playback of a sound.",
"Delete the proxy history for the active profile\n\n@throws Exception exception",
"Is portlet env supported.\n\n@return true if portlet env is supported, false otherwise",
"generate a prepared DELETE-Statement for the Class\ndescribed by cld.\n@param cld the ClassDescriptor",
"Use this API to fetch all the appqoepolicy resources that are configured on netscaler.",
"Cancel all task with this tag and returns the canceled task count\n\n@param tagToCancel\n@return",
"Combines weighted crf with this crf\n\n@param crf\n@param weight",
"Dumps a texture coordinate set of a mesh to stdout.\n\n@param mesh the mesh\n@param coords the coordinates",
"poll the response queue for response\n\n@param timeout timeout amount\n@param timeUnit timeUnit of timeout\n@return same result of BlockQueue.poll(long, TimeUnit)\n@throws InterruptedException"
] |
@SuppressWarnings({"unused", "WeakerAccess"})
public synchronized void pushInstallReferrer(String source, String medium, String campaign) {
if (source == null && medium == null && campaign == null) return;
try {
// If already pushed, don't send it again
int status = StorageHelper.getInt(context, "app_install_status", 0);
if (status != 0) {
Logger.d("Install referrer has already been set. Will not override it");
return;
}
StorageHelper.putInt(context, "app_install_status", 1);
if (source != null) source = Uri.encode(source);
if (medium != null) medium = Uri.encode(medium);
if (campaign != null) campaign = Uri.encode(campaign);
String uriStr = "wzrk://track?install=true";
if (source != null) uriStr += "&utm_source=" + source;
if (medium != null) uriStr += "&utm_medium=" + medium;
if (campaign != null) uriStr += "&utm_campaign=" + campaign;
Uri uri = Uri.parse(uriStr);
pushDeepLink(uri, true);
} catch (Throwable t) {
Logger.v("Failed to push install referrer", t);
}
} | [
"This method is used to push install referrer via UTM source, medium & campaign parameters\n@param source The UTM source parameter\n@param medium The UTM medium parameter\n@param campaign The UTM campaign parameter"
] | [
"Mark unfinished test cases as interrupted for each unfinished test suite, then write\ntest suite result\n@see #createFakeTestcaseWithWarning(ru.yandex.qatools.allure.model.TestSuiteResult)\n@see #markTestcaseAsInterruptedIfNotFinishedYet(ru.yandex.qatools.allure.model.TestCaseResult)",
"radi otsu da dobije spojena crna slova i ra\n\n@param input\n@return the processed image",
"Merge a subtree.\n\n@param targetRegistry the target registry\n@param subTree the subtree",
"Hashes a path, if the path points to a directory then hashes the contents recursively.\n@param messageDigest the digest used to hash.\n@param path the file/directory we want to hash.\n@return the resulting hash.\n@throws IOException",
"Returns the compact tag records for all tags in the workspace.\n\n@param workspace The workspace or organization to find tags in.\n@return Request object",
"Creates and attaches the annotation index to a resource root, if it has not already been attached",
"If a and b are not null, returns a new duration of a + b.\nIf a is null and b is not null, returns b.\nIf a is not null and b is null, returns a.\nIf a and b are null, returns null.\nIf needed, b is converted to a's time unit using the project properties.\n\n@param a first duration\n@param b second duration\n@param defaults project properties containing default values\n@return a + b",
"Returns the user records for all users in the specified workspace or\norganization.\n\n@param workspace The workspace in which to get users.\n@return Request object",
"Get the QNames of the port components to be declared\nin the namespaces\n\n@return collection of QNames"
] |
private Variable createVariableInferred(TokenList.Token t0, Variable variableRight) {
Variable result;
if( t0.getType() == Type.WORD ) {
switch( variableRight.getType()) {
case MATRIX:
alias(new DMatrixRMaj(1,1),t0.getWord());
break;
case SCALAR:
if( variableRight instanceof VariableInteger) {
alias(0,t0.getWord());
} else {
alias(1.0,t0.getWord());
}
break;
case INTEGER_SEQUENCE:
alias((IntegerSequence)null,t0.getWord());
break;
default:
throw new RuntimeException("Type not supported for assignment: "+variableRight.getType());
}
result = variables.get(t0.getWord());
} else {
result = t0.getVariable();
}
return result;
} | [
"Infer the type of and create a new output variable using the results from the right side of the equation.\nIf the type is already known just return that."
] | [
"create a broker with given broker info\n\n@param id broker id\n@param brokerInfoString broker info format: <b>creatorId:host:port:autocreated</b>\n@return broker instance with connection config\n@see #getZKString()",
"Check if the gravity and orientation are not in conflict one with other.\n@param gravity\n@param orientation\n@return true if orientation and gravity can be applied together, false - otherwise",
"Login for a specific authentication, creating a new token.\n\n@param authentication authentication to assign to token\n@return token",
"Scales a process type\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param processType type of process to maintain\n@param quantity number of processes to maintain",
"Build a query to read the mn-implementors\n@param ids",
"Reads a string of two byte characters from the input array.\nThis method assumes that the string finishes either at the\nend of the array, or when char zero is encountered.\nThe value starts at the position specified by the offset\nparameter.\n\n@param data byte array of data\n@param offset start point of unicode string\n@return string value",
"object -> xml\n\n@param object\n@param childClass",
"Accessor method to retrieve a Boolean instance.\n\n@param field the index number of the field to be retrieved\n@param falseText locale specific text representing false\n@return the value of the required field",
"Transforms an input file into HTML using the given Configuration.\n\n@param file\nThe File to process.\n@param configuration\nthe Configuration\n@return The processed String.\n@throws IOException\nif an IO error occurs\n@since 0.7\n@see Configuration"
] |
@Override
public void close() {
// unregister MBeans
if(stats != null) {
try {
if(this.jmxEnabled)
JmxUtils.unregisterMbean(getAggregateMetricName());
} catch(Exception e) {}
stats.close();
}
factory.close();
queuedPool.close();
} | [
"Permanently close the ClientRequestExecutor pool. Resources subsequently\nchecked in will be destroyed."
] | [
"Parses all child Shapes recursively and adds them to the correct JSON\nObject\n\n@param childShapes\n@throws org.json.JSONException",
"Returns the local collection representing the given namespace.\n\n@param namespace the namespace referring to the local collection.\n@param resultClass the {@link Class} that represents documents in the collection.\n@param <T> the type documents in the collection.\n@return the local collection representing the given namespace.",
"Should be called after all rows have been created\n@param headerStyle\n@param totalStyle\n@param totalHeaderStyle\n@return",
"Obtains a local date in Julian calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Julian local date, not null\n@throws DateTimeException if unable to create the date",
"Used to get the complex value of a matrix element.\n@param row The row of the element.\n@param col The column of the element.\n@param output Storage for the value",
"Sets the location value as string.\n\n@param value the string representation of the location value (JSON)",
"Returns a map of URIs to package name, as specified by the packageNames\nparameter.",
"Get ComponentsMultiThread of current instance\n@return componentsMultiThread",
"Use this API to disable snmpalarm of given name."
] |
private void ensureReferencedPKs(ModelDef modelDef, CollectionDescriptorDef collDef) throws ConstraintException
{
String elementClassName = collDef.getProperty(PropertyHelper.OJB_PROPERTY_ELEMENT_CLASS_REF);
ClassDescriptorDef elementClassDef = modelDef.getClass(elementClassName);
String indirTable = collDef.getProperty(PropertyHelper.OJB_PROPERTY_INDIRECTION_TABLE);
String localKey = collDef.getProperty(PropertyHelper.OJB_PROPERTY_FOREIGNKEY);
String remoteKey = collDef.getProperty(PropertyHelper.OJB_PROPERTY_REMOTE_FOREIGNKEY);
boolean hasRemoteKey = remoteKey != null;
ArrayList fittingCollections = new ArrayList();
// we're checking for the fitting remote collection(s) and also
// use their foreignkey as remote-foreignkey in the original collection definition
for (Iterator it = elementClassDef.getAllExtentClasses(); it.hasNext();)
{
ClassDescriptorDef subTypeDef = (ClassDescriptorDef)it.next();
// find the collection in the element class that has the same indirection table
for (Iterator collIt = subTypeDef.getCollections(); collIt.hasNext();)
{
CollectionDescriptorDef curCollDef = (CollectionDescriptorDef)collIt.next();
if (indirTable.equals(curCollDef.getProperty(PropertyHelper.OJB_PROPERTY_INDIRECTION_TABLE)) &&
(collDef != curCollDef) &&
(!hasRemoteKey || CommaListIterator.sameLists(remoteKey, curCollDef.getProperty(PropertyHelper.OJB_PROPERTY_FOREIGNKEY))) &&
(!curCollDef.hasProperty(PropertyHelper.OJB_PROPERTY_REMOTE_FOREIGNKEY) ||
CommaListIterator.sameLists(localKey, curCollDef.getProperty(PropertyHelper.OJB_PROPERTY_REMOTE_FOREIGNKEY))))
{
fittingCollections.add(curCollDef);
}
}
}
if (!fittingCollections.isEmpty())
{
// if there is more than one, check that they match, i.e. that they all have the same foreignkeys
if (!hasRemoteKey && (fittingCollections.size() > 1))
{
CollectionDescriptorDef firstCollDef = (CollectionDescriptorDef)fittingCollections.get(0);
String foreignKey = firstCollDef.getProperty(PropertyHelper.OJB_PROPERTY_FOREIGNKEY);
for (int idx = 1; idx < fittingCollections.size(); idx++)
{
CollectionDescriptorDef curCollDef = (CollectionDescriptorDef)fittingCollections.get(idx);
if (!CommaListIterator.sameLists(foreignKey, curCollDef.getProperty(PropertyHelper.OJB_PROPERTY_FOREIGNKEY)))
{
throw new ConstraintException("Cannot determine the element-side collection that corresponds to the collection "+
collDef.getName()+" in type "+collDef.getOwner().getName()+
" because there are at least two different collections that would fit."+
" Specifying remote-foreignkey in the original collection "+collDef.getName()+
" will perhaps help");
}
}
// store the found keys at the collections
collDef.setProperty(PropertyHelper.OJB_PROPERTY_REMOTE_FOREIGNKEY, foreignKey);
for (int idx = 0; idx < fittingCollections.size(); idx++)
{
CollectionDescriptorDef curCollDef = (CollectionDescriptorDef)fittingCollections.get(idx);
curCollDef.setProperty(PropertyHelper.OJB_PROPERTY_REMOTE_FOREIGNKEY, localKey);
}
}
}
// copy subclass pk fields into target class (if not already present)
ensurePKsFromHierarchy(elementClassDef);
} | [
"Ensures that the primary keys required by the given collection with indirection table are present in\nthe element class.\n\n@param modelDef The model\n@param collDef The collection\n@throws ConstraintException If there is a problem with the fitting collection (if any) or the primary keys"
] | [
"Destroys an instance of the bean\n\n@param instance The instance",
"Converts a byte array to a hexadecimal string representation\n@param bb the byte array to convert\n@return string the string representation",
"Use this API to fetch filtered set of dbdbprofile resources.\nset the filter parameter values in filtervalue object.",
"Use this API to fetch sslcipher_individualcipher_binding resources of given name .",
"Fall-back for types that are not handled by a subclasse's dispatch method.",
"Creates SLD rules for each old style.",
"Notification that the process has become unstable.\n\n@return {@code true} if this is a change in status",
"Only match if the TypeReference is at the specified location within the file.",
"Use this API to renumber nspbr6 resources."
] |
private StitchUserT doLogin(final StitchCredential credential, final boolean asLinkRequest) {
final Response response = doLoginRequest(credential, asLinkRequest);
final StitchUserT previousUser = activeUser;
final StitchUserT user = processLoginResponse(credential, response, asLinkRequest);
if (asLinkRequest) {
onUserLinked(user);
} else {
onUserLoggedIn(user);
onActiveUserChanged(activeUser, previousUser);
}
return user;
} | [
"callers of doLogin should be serialized before calling in."
] | [
"Returns the right string representation of the effort level based on given number of points.",
"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.",
"This method writes assignment data to a JSON file.",
"Record the details of the media being cached, to make it easier to recognize, now that we have access to that\ninformation.\n\n@param slot the slot from which a metadata cache is being created\n@param zos the stream to which the ZipFile is being written\n@param channel the low-level channel to which the cache is being written\n\n@throws IOException if there is a problem writing the media details entry",
"Creates an association row representing the given entry and adds it to the association managed by the given\npersister.",
"Create User Application Properties\nCreate application properties for a user\n@param userId User Id (required)\n@param properties Properties to be updated (required)\n@param aid Application ID (optional)\n@return PropertiesEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Register this broker in ZK for the first time.",
"Determine the enum value corresponding to the first play state found in the packet.\n\n@return the proper value",
"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()"
] |
public Object getBean(String name) {
Bean bean = beans.get(name);
if (null == bean) {
return null;
}
return bean.object;
} | [
"Get a bean value from the context.\n\n@param name bean name\n@return bean value or null"
] | [
"Use this API to fetch auditsyslogpolicy_systemglobal_binding resources of given name .",
"Add a dependency to this node.\n\n@param node the dependency to add.",
"Gets the positions.\n\n@return the positions",
"Given a storedefinition, constructs the xml string to be sent out in\nresponse to a \"schemata\" fetch request\n\n@param storeDefinition\n@return serialized store definition",
"Use this API to add dnsaaaarec.",
"Adds an additional alias to the constructed document.\n\n@param text\nthe text of the alias\n@param languageCode\nthe language code of the alias\n@return builder object to continue construction",
"Calculate power of a complex number.\n\n@param z1 Complex Number.\n@param n Power.\n@return Returns a new complex number containing the power of a specified number.",
"Fetches the contents of a file representation with asset path and writes them to the provided output stream.\n@see <a href=https://developer.box.com/reference#section-x-rep-hints-header>X-Rep-Hints Header</a>\n@param representationHint the X-Rep-Hints query for the representation to fetch.\n@param assetPath the path of the asset for representations containing multiple files.\n@param output the output stream to write the contents to.",
"Creates the given directory. Fails if it already exists."
] |
public static base_responses delete(nitro_service client, route6 resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
route6 deleteresources[] = new route6[resources.length];
for (int i=0;i<resources.length;i++){
deleteresources[i] = new route6();
deleteresources[i].network = resources[i].network;
deleteresources[i].gateway = resources[i].gateway;
deleteresources[i].vlan = resources[i].vlan;
deleteresources[i].td = resources[i].td;
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | [
"Use this API to delete route6 resources."
] | [
"Casts a ray into the scene graph, and returns the objects it intersects.\n\nThe ray is defined by its origin {@code [ox, oy, oz]} and its direction\n{@code [dx, dy, dz]}.\n\n<p>\nThe ray origin may be [0, 0, 0] and the direction components should be\nnormalized from -1 to 1: Note that the y direction runs from -1 at the\nbottom to 1 at the top. To construct a picking ray originating at the\nuser's head and pointing into the scene along the camera lookat vector,\npass in 0, 0, 0 for the origin and 0, 0, -1 for the direction.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is doing a ray cast into a particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n<p>\nDepending on the type of collider, that the hit location may not be exactly\nwhere the ray would intersect the scene object itself. Rather, it is\nwhere the ray intersects the collision geometry associated with the collider.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@param ox\nThe x coordinate of the ray origin.\n\n@param oy\nThe y coordinate of the ray origin.\n\n@param oz\nThe z coordinate of the ray origin.\n\n@param dx\nThe x vector of the ray direction.\n\n@param dy\nThe y vector of the ray direction.\n\n@param dz\nThe z vector of the ray direction.\n@return A list of {@link GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6",
"Write a string field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Fills the Boyer Moore \"bad character array\" for the given pattern",
"Transforms an input file into HTML using the given Configuration.\n\n@param file\nThe File to process.\n@param configuration\nthe Configuration\n@return The processed String.\n@throws IOException\nif an IO error occurs\n@since 0.7\n@see Configuration",
"Process this deployment for annotations. This will use an annotation indexer to create an index of all annotations\nfound in this deployment and attach it to the deployment unit context.\n\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException",
"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...",
"Extract the field types from the fieldConfigs if they have not already been configured.",
"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",
"Perform a security check against OpenCms.\n\n@param cms The OpenCms object.\n\n@throws CmsPermissionViolationException in case of the anonymous guest user"
] |
protected void onRemoveParentObject(GVRSceneObject parent) {
for (GVRComponent comp : mComponents.values()) {
comp.onRemoveOwnersParent(parent);
}
} | [
"Called when is removed the parent of the scene object.\n\n@param parent Old parent of this scene object."
] | [
"Converts this file into a resource name on the classpath by cutting of the file path\nto the classpath root.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param file The file.\n@return The resource name on the classpath.",
"Creates a new ServerDetails object for resolver, this will take URL and name from the deployer ServerDetails as a default behaviour",
"Checks String to see if the parameter is null.\n@param paramValue Object that will be checked if null.\n@return this.true if the parameter that is being checked is not null",
"Return the numeric distance value in degrees.\n\n@return the degrees",
"Use this API to fetch responderpolicy_binding resource of given name .",
"Override for customizing XmlMapper and ObjectMapper",
"Initialize the domain registry.\n\n@param registry the domain registry",
"returns a unique long value for class clazz and field fieldName.\nthe returned number is unique accross all tables in the extent of clazz.",
"We are adding a redeploy operation step for each specified deployment runtime name.\n\n@param context\n@param deploymentsRootAddress\n@param deploymentNames\n@throws OperationFailedException"
] |
public Response remove(String id, String rev) {
assertNotEmpty(id, "id");
assertNotEmpty(id, "rev");
return db.remove(ensureDesignPrefix(id), rev);
} | [
"Removes a design document using the id and rev from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@param rev the document revision\n@return {@link DesignDocument}"
] | [
"Provide Jersey client for the targeted Grapes server\n\n@return webResource",
"get all parts of module name apart from first",
"Send a track metadata update announcement to all registered listeners.",
"Generates a HashMap used to store expanded state for items in the list\non configuration change or whenever onResume is called.\n\n@return A HashMap containing the expanded state of all parents",
"Add the operation at the end of Stage MODEL if this operation has not already been registered.\n\nThis operation should be added if any of the following occur: -\n- The authorization configuration is removed from a security realm.\n- The rbac provider is changed to rbac.\n- A role is removed.\n- An include is removed from a role.\n- A management interface is removed.\n\nNote: This list only includes actions that could invalidate the configuration, actions that would not invalidate the\nconfiguration do not need this operation registering. e.g. Adding a role, if the configuration was already valid this\ncould not invalidate it.\n\n@param context - The OperationContext to use to register the step.",
"This method lists all resource assignments defined in the file.\n\n@param file MPX file",
"Checks if request is intended for Gerrit host.",
"Creates a tar file entry with defaults parameters.\n@param fileName the entry name\n@return file entry with reasonable defaults",
"Add a new server group\n\n@param groupName name of the group\n@param profileId ID of associated profile\n@return id of server group\n@throws Exception"
] |
private void updateDurationTimeUnit(FastTrackColumn column)
{
if (m_durationTimeUnit == null && isDurationColumn(column))
{
int value = ((DurationColumn) column).getTimeUnitValue();
if (value != 1)
{
m_durationTimeUnit = FastTrackUtility.getTimeUnit(value);
}
}
} | [
"Update the default time unit for durations based on data read from the file.\n\n@param column column data"
] | [
"Print work units.\n\n@param value TimeUnit instance\n@return work units value",
"Called just before the thread finishes, regardless of status, to take any necessary action on\nthe downloaded file with mDownloadedCacheSize file.\n\n@param forceClean - It will delete downloaded cache, Even streaming is enabled, If user intentionally cancelled.",
"Parses a type annotation table to find the labels, and to visit the try\ncatch block annotations.\n\n@param u\nthe start offset of a type annotation table.\n@param mv\nthe method visitor to be used to visit the try catch block\nannotations.\n@param context\ninformation about the class being parsed.\n@param visible\nif the type annotation table to parse contains runtime visible\nannotations.\n@return the start offset of each type annotation in the parsed table.",
"Maps the text representation of column data to Java types.\n\n@param table table name\n@param column column name\n@param data text representation of column data\n@param type column data type\n@param epochDateFormat true if date is represented as an offset from an epoch\n@return Java representation of column data\n@throws MPXJException",
"Subtracts v1 from this vector and places the result in this vector.\n\n@param v1\nright-hand vector",
"Map the EventType.\n\n@param eventType the event type\n@return the event",
"Detokenize the input list of words.\n\n@param tokens List of words.\n@return Detokenized string.",
"End the script block, adding a return value statement\n@param value the value to return\n@return the new {@link LuaScriptBlock} instance",
"Reads a single resource from a ConceptDraw PROJECT file.\n\n@param resource ConceptDraw PROJECT resource"
] |
public static <T> void addAll(Collection<T> collection, Iterable<? extends T> items) {
for (T item : items) {
collection.add(item);
}
} | [
"Add all the items from an iterable to a collection.\n\n@param <T>\nThe type of items in the iterable and the collection\n@param collection\nThe collection to which the items should be added.\n@param items\nThe items to add to the collection."
] | [
"Return all scripts of a given type\n\n@param type integer value of type\n@return Array of scripts of the given type",
"Subtract two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the subtract of specified complex numbers.",
"Utility method to remove ampersands embedded in names.\n\n@param name name text\n@return name text without embedded ampersands",
"Helper xml end tag writer\n\n@param value the output stream to use in writing",
"Set dates with the provided check states.\n@param datesWithCheckInfo the dates to set, accompanied with the check state to set.",
"Translate a path that has previously been unescaped and unquoted.\nThat is called at command execution when the calue is retrieved prior to be\nused as ModelNode value.\n@param path The unquoted, unescaped path.\n@return A path with ~ and default dir expanded.",
"This method retrieves the data at the given offset and returns\nit as a String, assuming the underlying data is composed of\nsingle byte characters.\n\n@param offset offset of required data\n@return string containing required data",
"2-D Perlin noise function.\n\n@param x X Value.\n@param y Y Value.\n@return Returns function's value at point xy.",
"returns a new segment masked by the given mask\n\nThis method applies the mask first to every address in the range, and it does not preserve any existing prefix.\nThe given prefix will be applied to the range of addresses after the mask.\nIf the combination of the two does not result in a contiguous range, then {@link IncompatibleAddressException} is thrown."
] |
public static ServerSetup[] verbose(ServerSetup[] serverSetups) {
ServerSetup[] copies = new ServerSetup[serverSetups.length];
for (int i = 0; i < serverSetups.length; i++) {
copies[i] = serverSetups[i].createCopy().setVerbose(true);
}
return copies;
} | [
"Creates a copy with verbose mode enabled.\n\n@param serverSetups the server setups.\n@return copies of server setups with verbose mode enabled."
] | [
"Returns an interval representing the addition of the\ngiven interval with this one.\n@param other interval to add to this one\n@return interval sum",
"Returns all methods for a specific group\n\n@param groupId group ID to remove methods from\n@param filters array of method types to filter by, null means no filter\n@return Collection of methods found\n@throws Exception exception",
"Get the short exception message using the requested locale. This does not include the cause exception message.\n\n@param locale locale for message\n@return (short) exception message",
"Get parent digest of an image.\n\n@param digest\n@param host\n@return",
"Set the end type as derived from other values.",
"Given a filesystem and path to a node, gets all the files which belong to\na partition and replica type\n\nWorks only for {@link ReadOnlyStorageFormat.READONLY_V2}\n\n@param fs Underlying filesystem\n@param path The node directory path\n@param partitionId The partition id for which we get the files\n@param replicaType The replica type\n@return Returns list of files of this partition, replicaType\n@throws IOException",
"Given an AVRO serializer definition, validates if all the avro schemas\nare valid i.e parseable.\n\n@param avroSerDef",
"Get the FieldDescriptor for the PathInfo\n\n@param aTableAlias\n@param aPathInfo\n@return FieldDescriptor",
"returns IsolationLevel literal as matching\nto the corresponding id\n@return the IsolationLevel literal"
] |
public int getMinutesPerWeek()
{
return m_minutesPerWeek == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerWeek()) : m_minutesPerWeek.intValue();
} | [
"Retrieve the number of minutes per week for this calendar.\n\n@return minutes per week"
] | [
"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.",
"Returns the naming context.",
"Use this API to fetch all the route6 resources that are configured on netscaler.\nThis uses route6_args which is a way to provide additional arguments while fetching the resources.",
"Adds a property to report design, this properties are mostly used by\nexporters to know if any specific configuration is needed\n\n@param name\n@param value\n@return A Dynamic Report Builder",
"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 fetch authenticationvserver_authenticationcertpolicy_binding resources of given name .",
"Curries a procedure that takes five arguments.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code procedure}.\n@return a procedure that takes four arguments. Never <code>null</code>.",
"Open the event stream\n\n@return true if successfully opened, false if not",
"Method handle a change on the cluster members set\n@param event"
] |
public static List<CompiledAutomaton> createAutomata(String prefix,
String regexp, Map<String, Automaton> automatonMap) throws IOException {
List<CompiledAutomaton> list = new ArrayList<>();
Automaton automatonRegexp = null;
if (regexp != null) {
RegExp re = new RegExp(prefix + MtasToken.DELIMITER + regexp + "\u0000*");
automatonRegexp = re.toAutomaton();
}
int step = 500;
List<String> keyList = new ArrayList<>(automatonMap.keySet());
for (int i = 0; i < keyList.size(); i += step) {
int localStep = step;
boolean success = false;
CompiledAutomaton compiledAutomaton = null;
while (!success) {
success = true;
int next = Math.min(keyList.size(), i + localStep);
List<Automaton> listAutomaton = new ArrayList<>();
for (int j = i; j < next; j++) {
listAutomaton.add(automatonMap.get(keyList.get(j)));
}
Automaton automatonList = Operations.union(listAutomaton);
Automaton automaton;
if (automatonRegexp != null) {
automaton = Operations.intersection(automatonList, automatonRegexp);
} else {
automaton = automatonList;
}
try {
compiledAutomaton = new CompiledAutomaton(automaton);
} catch (TooComplexToDeterminizeException e) {
log.debug(e);
success = false;
if (localStep > 1) {
localStep /= 2;
} else {
throw new IOException("TooComplexToDeterminizeException");
}
}
}
list.add(compiledAutomaton);
}
return list;
} | [
"Creates the automata.\n\n@param prefix the prefix\n@param regexp the regexp\n@param automatonMap the automaton map\n@return the list\n@throws IOException Signals that an I/O exception has occurred."
] | [
"Takes the file, reads it in, and prints out the likelihood of each possible\nlabel at each point.\n\n@param filename\nThe path to the specified file",
"Use this API to clear nsconfig.",
"Returns a Pair constructed from X and Y. Convenience method; the\ncompiler will disambiguate the classes used for you so that you\ndon't have to write out potentially long class names.",
"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",
"Returns the metallic factor for PBR shading",
"Create a host target.\n\n@param hostName the host name\n@param client the connected controller client to the master host.\n@return the remote target",
"Retrieves the value component of a criteria expression.\n\n@param field field type\n@param block block data\n@return field value",
"Returns the Class object of the Event implementation.",
"Use this API to Import appfwsignatures."
] |
public static Integer distance(String h1, String h2) {
HammingDistance distance = new HammingDistance();
return distance.apply(h1, h2);
} | [
"Calculate the Hamming distance between two hashes\n\n@param h1\n@param h2\n@return"
] | [
"Retrieve the index of the table entry valid for the supplied date.\n\n@param date required date\n@return cost rate table entry index",
"Build the Criteria using multiple ORs\n@param ids collection of identities\n@param fields\n@return Criteria",
"Sets all padding to the same value.\n@param padding new padding for top, bottom, left, and right, ignored if smaller than 0\n@return this to allow chaining",
"Returns the configured request parameter for the current query string, or the default parameter if the core is not specified.\n@return The configured request parameter for the current query string, or the default parameter if the core is not specified.",
"Add a new download. The download will start automatically once the download manager is\nready to execute it and connectivity is available.\n\n@param request the parameters specifying this download\n@return an ID for the download, unique across the application. This ID is used to make future\ncalls related to this download.\n@throws IllegalArgumentException",
"Creates a copy with verbose mode enabled.\n\n@param serverSetups the server setups.\n@return copies of server setups with verbose mode enabled.",
"Use this API to clear Interface resources.",
"Retrieve the calendar used internally for timephased baseline calculation.\n\n@return baseline calendar",
"Return the containing group if it contains exactly one element.\n\n@since 2.14"
] |
public void wireSteps( CanWire canWire ) {
for( StageState steps : stages.values() ) {
canWire.wire( steps.instance );
}
} | [
"Used for DI frameworks to inject values into stages."
] | [
"Read a four byte integer.\n\n@param data byte array\n@param offset offset into array\n@return integer value",
"Use this API to unset the properties of nslimitselector resources.\nProperties that need to be unset are specified in args array.",
"Make sure we don't attempt to recover inline; if the parser\nsuccessfully recovers, it won't throw an exception.",
"rollback the transaction",
"Use this API to fetch rewritepolicylabel_rewritepolicy_binding resources of given name .",
"Prints text to output stream, replacing parameter start and end\nplaceholders\n\n@param text the String to print",
"Get a list of tags for the specified photo.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param photoId\nThe photo ID\n@return The collection of Tag objects",
"Make a composite filter from the given sub-filters using AND to combine filters.",
"Map the currency separator character to a symbol name.\n\n@param c currency separator character\n@return symbol name"
] |
public static Rectangle getSelectedBounds(BufferedImage p) {
int width = p.getWidth();
int height = p.getHeight();
int maxX = 0, maxY = 0, minX = width, minY = height;
boolean anySelected = false;
int y1;
int [] pixels = null;
for (y1 = height-1; y1 >= 0; y1--) {
pixels = getRGB( p, 0, y1, width, 1, pixels );
for (int x = 0; x < minX; x++) {
if ((pixels[x] & 0xff000000) != 0) {
minX = x;
maxY = y1;
anySelected = true;
break;
}
}
for (int x = width-1; x >= maxX; x--) {
if ((pixels[x] & 0xff000000) != 0) {
maxX = x;
maxY = y1;
anySelected = true;
break;
}
}
if ( anySelected )
break;
}
pixels = null;
for (int y = 0; y < y1; y++) {
pixels = getRGB( p, 0, y, width, 1, pixels );
for (int x = 0; x < minX; x++) {
if ((pixels[x] & 0xff000000) != 0) {
minX = x;
if ( y < minY )
minY = y;
anySelected = true;
break;
}
}
for (int x = width-1; x >= maxX; x--) {
if ((pixels[x] & 0xff000000) != 0) {
maxX = x;
if ( y < minY )
minY = y;
anySelected = true;
break;
}
}
}
if ( anySelected )
return new Rectangle( minX, minY, maxX-minX+1, maxY-minY+1 );
return null;
} | [
"Calculates the bounds of the non-transparent parts of the given image.\n@param p the image\n@return the bounds of the non-transparent area"
] | [
"Creates a ServiceCall from a paging operation that returns a header response.\n\n@param first the observable to the first page\n@param next the observable to poll subsequent pages\n@param callback the client-side callback\n@param <E> the element type\n@param <V> the header object type\n@return the future based ServiceCall",
"Retrieve a field from a particular entity using its alias.\n\n@param typeClass the type of entity we are interested in\n@param alias the alias\n@return the field type referred to be the alias, or null if not found",
"Retrieve a work week which applies to this date.\n\n@param date target date\n@return work week, or null if none match this date",
"Create servlet deployment.\n\nCan be overridden with custom servlet deployment. e.g. exact resources listing in restricted env like GAE\n\n@param context the servlet context\n@param bootstrap the bootstrap\n@return new servlet deployment",
"Sets the SCXML model with an InputStream\n\n@param inputFileStream the model input stream",
"SuppressWarnings I really want to return HazeltaskTasks instead of Runnable",
"Gets any assignments for this task.\n@return a list of assignments for this task.",
"Fetch the outermost Hashmap.\n\n@param firstKey\nfirst key\n@return the the innermost hashmap",
"Set the given column name to the given value.\n\n@param name The column name to set.\n@param value the value to set.\n@return {@code this}\n@throws IllegalArgumentException if a column name does not exist in the table."
] |
public BoxFileUploadSession.Info getStatus() {
URL statusURL = this.sessionInfo.getSessionEndpoints().getStatusEndpoint();
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), statusURL, HttpMethod.GET);
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObject = JsonObject.readFrom(response.getJSON());
this.sessionInfo.update(jsonObject);
return this.sessionInfo;
} | [
"Get the status of the upload session. It contains the number of parts that are processed so far,\nthe total number of parts required for the commit and expiration date and time of the upload session.\n@return the status."
] | [
"Adds an additional label to the constructed document.\n\n@param text\nthe text of the label\n@param languageCode\nthe language code of the label\n@return builder object to continue construction",
"Creates a rectangular matrix which is zero except along the diagonals.\n\n@param numRows Number of rows in the matrix.\n@param numCols NUmber of columns in the matrix.\n@return A matrix with diagonal elements equal to one.",
"Whether the given value generation strategy requires to read the value from the database or not.",
"Sets up Log4J to write log messages to the console. Low-priority messages\nare logged to stdout while high-priority messages go to stderr.",
"Set the url for the shape file.\n\n@param url shape file url\n@throws LayerException file cannot be accessed\n@since 1.7.1",
"Initialize the version properties map from the gradle.properties file, and the additional properties from the\ngradle.properties file.",
"Reads the XER file table and row structure ready for processing.\n\n@param is input stream\n@throws MPXJException",
"Returns the text content to any HTML.\n\n@param html the HTML\n\n@return the text content",
"See convertToSQL92.\n\n@return SQL like sub-expression\n@throws IllegalArgumentException oops"
] |
public Diff compare(String left, String right) {
return compare(getCtType(left), getCtType(right));
} | [
"compares two snippet"
] | [
"Static main.\n\n@param args\nProgram arguments.\n@throws IOException\nIf an IO error occurred.",
"Gets string content from InputStream\n\n@param is InputStream to read\n@return InputStream content",
"Exceptions specific to each operation is handled in the corresponding\nsubclass. At this point we don't know the reason behind this exception.\n\n@param exception",
"get the real data without message header\n@return message data(without header)",
"Pushes the Notification Viewed event to CleverTap.\n\n@param extras The {@link Bundle} object that contains the\nnotification details",
"Returns a \"clean\" version of the given filename in which spaces have\nbeen converted to dashes and all non-alphanumeric chars are underscores.",
"Get the GroupDiscussInterface.\n\n@return The GroupDiscussInterface",
"Set child components.\n\n@param children\nchildren",
"Use this API to fetch authenticationvserver_authenticationcertpolicy_binding resources of given name ."
] |
protected Violation createViolationForImport(SourceCode sourceCode, ImportNode importNode, String message) {
Map importInfo = ImportUtil.sourceLineAndNumberForImport(sourceCode, importNode);
Violation violation = new Violation();
violation.setRule(this);
violation.setSourceLine((String) importInfo.get("sourceLine"));
violation.setLineNumber((Integer) importInfo.get("lineNumber"));
violation.setMessage(message);
return violation;
} | [
"Create and return a new Violation for this rule and the specified import\n@param sourceCode - the SourceCode\n@param importNode - the ImportNode for the import triggering the violation\n@return a new Violation object"
] | [
"Used to NOT the argument clause specified.",
"Sets the jdbc connection to use.\n\n@param jcd The connection to use\n@throws PlatformException If the target database cannot be handled with torque",
"Add tags to a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param tags\nThe tags\n@throws FlickrException",
"scans right to left until max to maintain latest max values for the multi-value property specified by key.\n\n@param key the property key\n@param left original list\n@param right new list\n@param remove if remove new list from original\n@param vr ValidationResult for error and merged list return",
"Get a list of topics from a group.\n\n@param groupId\nUnique identifier of a group returns a list of topics for a given group {@link Group}.\n@param perPage\nNumber of records per page.\n@param page\nResult-section.\n@return A group topic list\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.topics.getList.html\">API Documentation</a>",
"This method maps the resource unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param rscFixedMeta resource fixed meta data\n@param rscFixedData resource fixed data\n@return map of resource IDs to resource data",
"Adds a child to this node and sets this node as its parent node.\n\n@param node The node to add.",
"Get the Operation metadata for an MBean by name.\n@return the {@link Map} of {@link String} operation names to {@link MBeanOperationInfo} values.",
"Upgrades a read transaction to a write transaction, executes the work then downgrades to a read transaction\nagain.\n\n@since 2.4\n@noreference"
] |
public static DMatrixRMaj extractColumn(DMatrixRMaj a , int column , DMatrixRMaj out ) {
if( out == null)
out = new DMatrixRMaj(a.numRows,1);
else if( !MatrixFeatures_DDRM.isVector(out) || out.getNumElements() != a.numRows )
throw new MatrixDimensionException("Output must be a vector of length "+a.numRows);
int index = column;
for (int i = 0; i < a.numRows; i++, index += a.numCols ) {
out.data[i] = a.data[index];
}
return out;
} | [
"Extracts the column from a matrix.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column."
] | [
"Serialize an object with Json\n@param obj Object\n@return String\n@throws IOException",
"List the photos with the most views, comments or favorites.\n\n@param date\n(Optional) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day. If no date is provided, all time view counts will be returned.\n@param sort\n(Optional) The order in which to sort returned photos. Defaults to views. The possible values are views, comments and favorites. Other sort\noptions are available through flickr.photos.search.\n@param perPage\n(Optional) Number of referrers to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@throws FlickrException\n@see \"http://www.flickr.com/services/api/flickr.stats.getPopularPhotos.html\"",
"Use this API to delete dnssuffix resources of given names.",
"Get the values for a particular configuration property\n\n@param name - name of the property\n@return All values encountered or null",
"Creates the database.\n\n@throws PlatformException If some error occurred",
"Get the content-type, including the optional \";base64\".",
"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.",
"If the layer transformer has not been prepared yet, do it.\n\n@param transformer the transformer",
"Use this API to add sslcipher resources."
] |
private void exportModules() {
// avoid to export modules if unnecessary
if (((null != m_copyAndUnzip) && !m_copyAndUnzip.booleanValue())
|| ((null == m_copyAndUnzip) && !m_currentConfiguration.getDefaultCopyAndUnzip())) {
m_logStream.println();
m_logStream.println("NOT EXPORTING MODULES - you disabled copy and unzip.");
m_logStream.println();
return;
}
CmsModuleManager moduleManager = OpenCms.getModuleManager();
Collection<String> modulesToExport = ((m_modulesToExport == null) || m_modulesToExport.isEmpty())
? m_currentConfiguration.getConfiguredModules()
: m_modulesToExport;
for (String moduleName : modulesToExport) {
CmsModule module = moduleManager.getModule(moduleName);
if (module != null) {
CmsModuleImportExportHandler handler = CmsModuleImportExportHandler.getExportHandler(
getCmsObject(),
module,
"Git export handler");
try {
handler.exportData(
getCmsObject(),
new CmsPrintStreamReport(
m_logStream,
OpenCms.getWorkplaceManager().getWorkplaceLocale(getCmsObject()),
false));
} catch (CmsRoleViolationException | CmsConfigurationException | CmsImportExportException e) {
e.printStackTrace(m_logStream);
}
}
}
} | [
"Export the modules that should be checked in into git."
] | [
"Remove an read lock.",
"The normalized string returned by this method is consistent with java.net.Inet6address.\n\nIPs are not compressed nor mixed in this representation. If this has a prefix length, that will be included in the string.",
"Get content of a file as a Map<String, String>, using separator to split values\n@param file File to get content\n@param separator The separator\n@return The map with the values\n@throws IOException I/O Error",
"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",
"Use this API to add responderpolicy.",
"Drives the unit test.",
"Notification that boot has completed successfully and the configuration history should be updated",
"Write the provided chunk at the offset specified in the token. If finalChunk is set, the file\nwill be closed.",
"Switches to the next tab."
] |
protected void addConstructors(ClassFile proxyClassType, List<DeferredBytecode> initialValueBytecode) {
try {
if (getBeanType().isInterface()) {
ConstructorUtils.addDefaultConstructor(proxyClassType, initialValueBytecode, !useConstructedFlag());
} else {
boolean constructorFound = false;
for (Constructor<?> constructor : AccessController.doPrivileged(new GetDeclaredConstructorsAction(getBeanType()))) {
if ((constructor.getModifiers() & Modifier.PRIVATE) == 0) {
constructorFound = true;
String[] exceptions = new String[constructor.getExceptionTypes().length];
for (int i = 0; i < exceptions.length; ++i) {
exceptions[i] = constructor.getExceptionTypes()[i].getName();
}
ConstructorUtils.addConstructor(BytecodeUtils.VOID_CLASS_DESCRIPTOR, DescriptorUtils.parameterDescriptors(constructor.getParameterTypes()), exceptions, proxyClassType, initialValueBytecode, !useConstructedFlag());
}
}
if (!constructorFound) {
// the bean only has private constructors, we need to generate
// two fake constructors that call each other
addConstructorsForBeanWithPrivateConstructors(proxyClassType);
}
}
} catch (Exception e) {
throw new WeldException(e);
}
} | [
"Adds a constructor for the proxy for each constructor declared by the base\nbean type.\n\n@param proxyClassType the Javassist class for the proxy\n@param initialValueBytecode"
] | [
"Parse parameters from this request using HTTP.\n\n@param req The ServletRequest containing all request parameters.\n@param cms The OpenCms object.\n@return CmsSpellcheckingRequest object that contains parsed parameters.",
"This method will add a DemoInterceptor into every in and every out phase\nof the interceptor chains.\n\n@param provider",
"Creates an operation to deploy existing deployment content to the runtime.\n\n@param deployment the deployment to deploy\n\n@return the deploy operation",
"This method is provided to allow an absolute period of time\nrepresented by start and end dates into a duration in working\ndays based on this calendar instance. This method takes account\nof any exceptions defined for this calendar.\n\n@param startDate start of the period\n@param endDate end of the period\n@return new Duration object",
"Runs calls in a background thread so that the results will actually be asynchronous.\n\n@see com.google.appengine.tools.cloudstorage.RawGcsService#continueObjectCreationAsync(\ncom.google.appengine.tools.cloudstorage.RawGcsService.RawGcsCreationToken,\njava.nio.ByteBuffer, long)",
"This method processes a single deferred relationship list.\n\n@param dr deferred relationship list data\n@throws MPXJException",
"Get a property as a boolean or throw exception.\n\n@param key the property name",
"Use this API to fetch nssimpleacl resource of given name .",
"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."
] |
private void writeAssignmentTimephasedData(ResourceAssignment mpx, Project.Assignments.Assignment xml)
{
if (m_writeTimphasedData && mpx.getHasTimephasedData())
{
List<TimephasedDataType> list = xml.getTimephasedData();
ProjectCalendar calendar = mpx.getCalendar();
BigInteger assignmentID = xml.getUID();
List<TimephasedWork> complete = mpx.getTimephasedActualWork();
List<TimephasedWork> planned = mpx.getTimephasedWork();
if (m_splitTimephasedAsDays)
{
TimephasedWork lastComplete = null;
if (complete != null && !complete.isEmpty())
{
lastComplete = complete.get(complete.size() - 1);
}
TimephasedWork firstPlanned = null;
if (planned != null && !planned.isEmpty())
{
firstPlanned = planned.get(0);
}
if (planned != null)
{
planned = splitDays(calendar, mpx.getTimephasedWork(), null, lastComplete);
}
if (complete != null)
{
complete = splitDays(calendar, complete, firstPlanned, null);
}
}
if (planned != null)
{
writeAssignmentTimephasedData(assignmentID, list, planned, 1);
}
if (complete != null)
{
writeAssignmentTimephasedData(assignmentID, list, complete, 2);
}
}
} | [
"Writes the timephased data for a resource assignment.\n\n@param mpx MPXJ assignment\n@param xml MSDPI assignment"
] | [
"Set RGB input range.\n\n@param inRGB Range.",
"refresh all deliveries dependencies for a particular product",
"gets the bytes, sharing the cached array and does not clone it",
"Set the name of the schema containing the schedule tables.\n\n@param schema schema name.",
"Helper for parsing properties\n@param p The properties object\n@param key The key to retrieve\n@param defaultValue The default value if the key does not exist\n@param used The set of keys we have seen\n@return The value of the property at the key",
"Converts B and X into block matrices and calls the block matrix solve routine.\n\n@param B A matrix ℜ <sup>m × p</sup>. Not modified.\n@param X A matrix ℜ <sup>n × p</sup>, where the solution is written to. Modified.",
"Updates a path table value for column columnName\n\n@param columnName name of the column to update\n@param newData new content to set\n@param path_id ID of the path to update",
"Read a FastTrack file.\n\n@param file FastTrack file",
"Creates updateable version of capability registry that on publish pushes all changes to main registry\nthis is used to create context local registry that only on completion commits changes to main registry\n\n@return writable registry"
] |
public void cache(String key, Object obj) {
H.Session sess = session();
if (null != sess) {
sess.cache(key, obj);
} else {
app().cache().put(key, obj);
}
} | [
"Add an object into cache by key. The key will be used in conjunction with session id if\nthere is a session instance\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached"
] | [
"any possible bean invocations from other ADV observers",
"Creates a \"delta clone\" of this Map, where only the differences are\nrepresented.",
"trim \"act.\" from conf keys",
"Start the timer.",
"The main method. See the class documentation.",
"Checks the existence of the directory. If it does not exist, the method creates it.\n\n@param dir the directory to check.\n@throws IOException if fails.",
"Create a string from bytes using the given encoding\n\n@param bytes The bytes to create a string from\n@param encoding The encoding of the string\n@return The created string",
"Makes sure that the operation name and the address have been set and returns a ModelNode\nrepresenting the operation request.",
"Calls the provided closure for a \"page\" of rows from the table represented by this DataSet.\nA page is defined as starting at a 1-based offset, and containing a maximum number of rows.\n\n@param offset the 1-based offset for the first row to be processed\n@param maxRows the maximum number of rows to be processed\n@param closure called for each row with a GroovyResultSet\n@throws SQLException if a database access error occurs\n@see groovy.sql.Sql#eachRow(String, java.util.List, int, int, groovy.lang.Closure)"
] |
static void restoreFromHistory(final InstallationManager.MutablePatchingTarget target, final String rollbackPatchId,
final Patch.PatchType patchType, final PatchableTarget.TargetInfo history) throws PatchingException {
if (patchType == Patch.PatchType.CUMULATIVE) {
assert history.getCumulativePatchID().equals(rollbackPatchId);
target.apply(rollbackPatchId, patchType);
// Restore one off state
final List<String> oneOffs = new ArrayList<String>(history.getPatchIDs());
Collections.reverse(oneOffs);
for (final String oneOff : oneOffs) {
target.apply(oneOff, Patch.PatchType.ONE_OFF);
}
}
checkState(history, history); // Just check for tests, that rollback should restore the old state
} | [
"Restore the recorded state from the rollback xml.\n\n@param target the patchable target\n@param rollbackPatchId the rollback patch id\n@param patchType the the current patch type\n@param history the recorded history\n@throws PatchingException"
] | [
"Method which performs strength checks on password. It returns outcome which can be used by CLI.\n\n@param isAdminitrative - administrative checks are less restrictive. This means that weak password or one which violates restrictions is not indicated as failure.\nAdministrative checks are usually performed by admin changing/setting default password for user.\n@param userName - the name of user for which password is set.\n@param password - password.\n@return",
"Returns the comma separated list of available scopes\n\n@return String",
"Returns the output path specified on the javadoc options",
"Transforms a list of Integer objects to an array of primitive int values.\n\n@param integers\n@return",
"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",
"Throws an IllegalArgumentException when the given value is not true.\n@param value the value to assert if true\n@param message the message to display if the value is false\n@return the value",
"Serialize specified object to directory with specified name.\n\n@param directory write to\n@param name serialize object with specified name\n@param obj object to serialize\n@return number of bytes written to directory",
"Finish the work of building and sending a protocol packet.\n\n@param kind the type of packet to create and send\n@param payload the content which will follow our device name in the packet\n@param destination where the packet should be sent\n@param port the port to which the packet should be sent\n\n@throws IOException if there is a problem sending the packet",
"Decomposes the matrix using the QR algorithm. Care was taken to minimize unnecessary memory copying\nand cache skipping.\n\n@param orig The matrix which is being decomposed. Not modified.\n@return true if it decomposed the matrix or false if an error was detected. This will not catch all errors."
] |
public final void notifyFooterItemRangeRemoved(int positionStart, int itemCount) {
if (positionStart < 0 || itemCount < 0 || positionStart + itemCount > footerItemCount) {
throw new IndexOutOfBoundsException("The given range [" + positionStart + " - "
+ (positionStart + itemCount - 1) + "] is not within the position bounds for footer items [0 - "
+ (footerItemCount - 1) + "].");
}
notifyItemRangeRemoved(positionStart + headerItemCount + contentItemCount, itemCount);
} | [
"Notifies that multiple footer items are removed.\n\n@param positionStart the position.\n@param itemCount the item count."
] | [
"Stops this progress bar.",
"Gets the actual type arguments of a Type\n\n@param type The type to examine\n@return The type arguments",
"Shifts are performed based upon singular values computed previously. If it does not converge\nusing one of those singular values it uses a Wilkinson shift instead.",
"Alternative implementation for the drift. For experimental purposes.\n\n@param timeIndex\n@param componentIndex\n@param realizationAtTimeIndex\n@param realizationPredictor\n@return",
"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.",
"Read custom property definitions for resources.\n\n@param gpResources GanttProject resources",
"Maps an integer field ID to a field type.\n\n@param field field ID\n@return field type",
"Convert a Java String instance into the equivalent array of single or\ndouble bytes.\n\n@param value Java String instance representing text\n@param unicode true if double byte characters are required\n@return byte array representing the supplied text",
"remove all prefetching listeners"
] |
public boolean isIdentical(T a, double tol) {
if( a.getType() != getType() )
return false;
return ops.isIdentical(mat,a.mat,tol);
} | [
"Checks to see if matrix 'a' is the same as this matrix within the specified\ntolerance.\n\n@param a The matrix it is being compared against.\n@param tol How similar they must be to be equals.\n@return If they are equal within tolerance of each other."
] | [
"Computes the p=2 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm.",
"Specify the method to instantiate objects\nrepresented by this descriptor.\n@see #setFactoryClass",
"scans right to left until max to maintain latest max values for the multi-value property specified by key.\n\n@param key the property key\n@param left original list\n@param right new list\n@param remove if remove new list from original\n@param vr ValidationResult for error and merged list return",
"Copy the data from an InputStream to a temp file.\n\n@param inputStream data source\n@param tempFileSuffix suffix to use for temp file\n@return File instance",
"return the workspace size needed for ctc",
"Retrieve the number of minutes per month for this calendar.\n\n@return minutes per month",
"used for upload progress",
"Returns the string in the buffer minus an leading or trailing whitespace or quotes",
"Closes the Netty Channel and releases all resources"
] |
static <K, V> ViewQueryParameters<K, V> forwardPaginationQueryParameters
(ViewQueryParameters<K, V> initialQueryParameters, K startkey, String startkey_docid) {
// Copy the initial query parameters
ViewQueryParameters<K, V> pageParameters = initialQueryParameters.copy();
// Now override with the start keys provided
pageParameters.setStartKey(startkey);
pageParameters.setStartKeyDocId(startkey_docid);
return pageParameters;
} | [
"Generate query parameters for a forward page with the specified start key.\n\n@param initialQueryParameters page 1 query parameters\n@param startkey the startkey for the forward page\n@param startkey_docid the doc id for the startkey (in case of duplicate keys)\n@param <K> the view key type\n@param <V> the view value type\n@return the query parameters for the forward page"
] | [
"Extract a list of exception assignments.\n\n@param exceptionData string representation of exception assignments\n@return list of exception assignment rows",
"Retrieve a finish date.\n\n@param data byte array\n@param offset offset into byte array\n@return finish date",
"Use this API to fetch policydataset resource of given name .",
"Use this API to fetch tmsessionpolicy_binding resource of given name .",
"Sets the protocol.\n@param protocol The protocol to be set.",
"Used when setting the \"visible\" field in the response. See the \"List Conversations\" docs for details\n@param filters Filter strings to be applied to the visibility of conversations\n@return this to continue building options",
"Initializes the components.\n\n@param components the components",
"Gets Widget bounds depth\n@return depth",
"Returns the u component of a coordinate from a texture coordinate set.\n\n@param vertex the vertex index\n@param coords the texture coordinate set\n@return the u component"
] |
private void populateConstraints(Row row, Task task)
{
Date endDateMax = row.getTimestamp("ZGIVENENDDATEMAX_");
Date endDateMin = row.getTimestamp("ZGIVENENDDATEMIN_");
Date startDateMax = row.getTimestamp("ZGIVENSTARTDATEMAX_");
Date startDateMin = row.getTimestamp("ZGIVENSTARTDATEMIN_");
ConstraintType constraintType = null;
Date constraintDate = null;
if (endDateMax != null)
{
constraintType = ConstraintType.FINISH_NO_LATER_THAN;
constraintDate = endDateMax;
}
if (endDateMin != null)
{
constraintType = ConstraintType.FINISH_NO_EARLIER_THAN;
constraintDate = endDateMin;
}
if (endDateMin != null && endDateMin == endDateMax)
{
constraintType = ConstraintType.MUST_FINISH_ON;
constraintDate = endDateMin;
}
if (startDateMax != null)
{
constraintType = ConstraintType.START_NO_LATER_THAN;
constraintDate = startDateMax;
}
if (startDateMin != null)
{
constraintType = ConstraintType.START_NO_EARLIER_THAN;
constraintDate = startDateMin;
}
if (startDateMin != null && startDateMin == endDateMax)
{
constraintType = ConstraintType.MUST_START_ON;
constraintDate = endDateMin;
}
task.setConstraintType(constraintType);
task.setConstraintDate(constraintDate);
} | [
"Populate the constraint type and constraint date.\nNote that Merlin allows both start and end constraints simultaneously.\nAs we can't have both, we'll prefer the start constraint.\n\n@param row task data from database\n@param task Task instance"
] | [
"Converts the passed list of inners to unmodifiable map of impls.\n@param innerList list of the inners.\n@return map of the impls",
"Generate a module graph regarding the filters\n\n@param moduleId String\n@return AbstractGraph",
"Build a request URL.\n\n@param host\nThe host\n@param port\nThe port\n@param path\nThe path\n@param parameters\nThe parameters\n@return The URL\n@throws MalformedURLException\n@deprecated use {@link #buildSecureUrl(java.lang.String, int, java.lang.String, java.util.Map) }",
"Specify the class represented by this `ClassNode` is annotated\nby an annotation class specified by the name\n@param name the name of the annotation class\n@return this `ClassNode` instance",
"Get the minutes difference",
"Sets divider padding for axis. If axis does not match the orientation, it has no effect.\n@param padding\n@param axis {@link Axis}",
"Use this API to fetch all the nd6ravariables resources that are configured on netscaler.",
"Retrieve any resource field aliases defined in the MPP file.\n\n@param map index to field map\n@param data resource field name alias data",
"Write resource assignment workgroup.\n\n@param record resource assignment workgroup instance\n@throws IOException"
] |
public void identifyClasses(final String pluginDirectory) throws Exception {
methodInformation.clear();
jarInformation.clear();
try {
new FileTraversal() {
public void onDirectory(final File d) {
}
public void onFile(final File f) {
try {
// loads class files
if (f.getName().endsWith(".class")) {
// get the class name for this path
String className = f.getAbsolutePath();
className = className.replace(pluginDirectory, "");
className = getClassNameFromPath(className);
logger.info("Storing plugin information: {}, {}", className,
f.getName());
ClassInformation classInfo = new ClassInformation();
classInfo.pluginPath = pluginDirectory;
classInformation.put(className, classInfo);
} else if (f.getName().endsWith(".jar")) {
// loads JAR packages
// open up jar and discover files
// look for anything with /proxy/ in it
// this may discover things we don't need but that is OK
try {
jarInformation.add(f.getAbsolutePath());
JarFile jarFile = new JarFile(f);
Enumeration<?> enumer = jarFile.entries();
// Use the Plugin-Name manifest entry to match with the provided pluginName
String pluginPackageName = jarFile.getManifest().getMainAttributes().getValue("plugin-package");
if (pluginPackageName == null) {
return;
}
while (enumer.hasMoreElements()) {
Object element = enumer.nextElement();
String elementName = element.toString();
if (!elementName.endsWith(".class")) {
continue;
}
String className = getClassNameFromPath(elementName);
if (className.contains(pluginPackageName)) {
logger.info("Storing plugin information: {}, {}", className,
f.getAbsolutePath());
ClassInformation classInfo = new ClassInformation();
classInfo.pluginPath = f.getAbsolutePath();
classInformation.put(className, classInfo);
}
}
} catch (Exception e) {
}
}
} catch (Exception e) {
logger.warn("Exception caught: {}, {}", e.getMessage(), e.getCause());
}
}
}.traverse(new File(pluginDirectory));
} catch (IOException e) {
throw new Exception("Could not identify all plugins: " + e.getMessage());
}
} | [
"This loads plugin file information into a hash for lazy loading later on\n\n@param pluginDirectory path of plugin\n@throws Exception exception"
] | [
"Returns an text table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns.",
"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.",
"Deserializes a variable, checking whether the datatype is custom or not\n@param s\n@param variableType\n@param dataTypes\n@return",
"Await service container stability ignoring thread interruption.\n\n@param timeout maximum period to wait for service container stability\n@param timeUnit unit in which {@code timeout} is expressed\n\n@throws java.util.concurrent.TimeoutException if service container stability is not reached before the specified timeout",
"Print a time value.\n\n@param value time value\n@return time value",
"Add sub-deployment units to the container\n\n@param bdaMapping",
"Should be called after new data is inserted. Will be automatically called, when the view dimensions\nhas changed.\n\nCalculates the start- and end-angles for every PieSlice.",
"A connection to the database. Should be short-lived. No transaction active by default.\n\n@return a new open connection.",
"Print the class's operations m"
] |
public static void writeCorrelationId(Message message, String correlationId) {
if (!(message instanceof SoapMessage)) {
return;
}
SoapMessage soapMessage = (SoapMessage) message;
Header hdCorrelationId = soapMessage.getHeader(CORRELATION_ID_QNAME);
if (hdCorrelationId != null) {
LOG.warning("CorrelationId already existing in soap header, need not to write CorrelationId header.");
return;
}
if ((soapMessage.getContent(javax.xml.stream.XMLStreamWriter.class) != null)
&& (soapMessage.getContent(javax.xml.stream.XMLStreamWriter.class) instanceof SAAJStreamWriter)
&& (((SAAJStreamWriter) soapMessage.getContent(javax.xml.stream.XMLStreamWriter.class))
.getDocument()
.getElementsByTagNameNS("http://www.talend.com/esb/sam/correlationId/v1",
"correlationId").getLength() > 0)) {
LOG.warning("CorrelationId already existing in soap header, need not to write CorrelationId header.");
return;
}
try {
soapMessage.getHeaders().add(
new Header(CORRELATION_ID_QNAME, correlationId, new JAXBDataBinding(String.class)));
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Stored correlationId '" + correlationId + "' in soap header: "
+ CORRELATION_ID_QNAME);
}
} catch (JAXBException e) {
LOG.log(Level.SEVERE, "Couldn't create correlationId header.", e);
}
} | [
"Write correlation id to message.\n\n@param message the message\n@param correlationId the correlation id"
] | [
"Returns a JRDesignExpression that points to the main report connection\n\n@return",
"Re-initializes the shader texture used to fill in\nthe Circle upon drawing.",
"Returns the most likely class for the word at the given position.",
"Gets an enhanced protection domain for a proxy based on the given protection domain.\n@param domain the given protection domain\n@return protection domain enhanced with \"accessDeclaredMembers\" runtime permission",
"Apply filters to a method name.\n@param methodName",
"A write through put to inner-store.\n\n@param keyBytes : keyName strings serialized as bytes eg. 'cluster.xml'\n@param valueBytes : versioned byte[] eg. UTF bytes for cluster xml\ndefinitions\n@throws VoldemortException",
"Use this API to fetch cachepolicylabel_policybinding_binding resources of given name .",
"Used for initialization of the underlying map provider.\n\n@param fragmentManager required for initialization",
"Retrieves the notes text for this resource.\n\n@return notes text"
] |
private ProjectFile handleXerFile(InputStream stream) throws Exception
{
PrimaveraXERFileReader reader = new PrimaveraXERFileReader();
reader.setCharset(m_charset);
List<ProjectFile> projects = reader.readAll(stream);
ProjectFile project = null;
for (ProjectFile file : projects)
{
if (file.getProjectProperties().getExportFlag())
{
project = file;
break;
}
}
if (project == null && !projects.isEmpty())
{
project = projects.get(0);
}
return project;
} | [
"XER files can contain multiple projects when there are cross-project dependencies.\nAs the UniversalProjectReader is designed just to read a single project, we need\nto select one project from those available in the XER file.\nThe original project selected for export by the user will have its \"export flag\"\nset to true. We'll return the first project we find where the export flag is\nset to true, otherwise we'll just return the first project we find in the file.\n\n@param stream schedule data\n@return ProjectFile instance"
] | [
"Get container for principal.\n\n@param cms cmsobject\n@param list of principals\n@param captionID caption id\n@param descID description id\n@param iconID icon id\n@param ouID ou id\n@param icon icon\n@param iconList iconlist\n@return indexedcontainer",
"Add the declarationSRef to the DeclarationsManager.\nCalculate the matching of the Declaration with the DeclarationFilter of the\nLinker.\n\n@param declarationSRef the ServiceReference<D> of the Declaration",
"Return given duration in a human-friendly format. For example, \"4\nminutes\" or \"1 second\". Returns only largest meaningful unit of time,\nfrom seconds up to hours.\n\nThe longest duration it supports is hours.\n\nThis method assumes that there are 60 minutes in an hour,\n60 seconds in a minute and 1000 milliseconds in a second.\nAll currently supplied chronologies use this definition.",
"Obtain the destination hostname for a source host\n\n@param hostName\n@return",
"Run a task periodically and indefinitely.\n\n@param task\nTask to run.\n@param delay\nThe first execution will happen in {@code delay} seconds.\n@param period\nSubsequent executions will happen every {@code period} seconds\nafter the first.\n@return An interface that lets you query the status; cancel; or\nreschedule the event.",
"Add a \"post-run\" dependent for this model.\n\n@param dependent the \"post-run\" dependent.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependent task group",
"Drives the unit test.",
"Adds a command class to the list of supported command classes by this\nendpoint. Does nothing if command class is already added.\n@param commandClass the command class instance to add.",
"Handles the deletion of a key.\n@param key the deleted key.\n@return <code>true</code> if the deletion was successful, <code>false</code> otherwise."
] |
protected Object getTypedValue(int type, byte[] value)
{
Object result;
switch (type)
{
case 4: // Date
{
result = MPPUtility.getTimestamp(value, 0);
break;
}
case 6: // Duration
{
TimeUnit units = MPPUtility.getDurationTimeUnits(MPPUtility.getShort(value, 4), m_properties.getDefaultDurationUnits());
result = MPPUtility.getAdjustedDuration(m_properties, MPPUtility.getInt(value, 0), units);
break;
}
case 9: // Cost
{
result = Double.valueOf(MPPUtility.getDouble(value, 0) / 100);
break;
}
case 15: // Number
{
result = Double.valueOf(MPPUtility.getDouble(value, 0));
break;
}
case 36058:
case 21: // Text
{
result = MPPUtility.getUnicodeString(value, 0);
break;
}
default:
{
result = value;
break;
}
}
return result;
} | [
"Convert raw value as read from the MPP file into a Java type.\n\n@param type MPP value type\n@param value raw value data\n@return Java object"
] | [
"Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\n\n@param object\n@param outIdentifier\n@return",
"Returns a reasonable timeout duration for a watch request.\n\n@param expectedTimeoutMillis timeout duration that a user wants to use, in milliseconds\n@param bufferMillis buffer duration which needs to be added, in milliseconds\n@return timeout duration in milliseconds, between the specified {@code bufferMillis} and\nthe {@link #MAX_MILLIS}.",
"Sends the events to monitoring service client.\n\n@param events the events",
"This method should be called after all column have been added to the report.\n@param numgroups\n@return",
"Replace the last element of an address with a static path element.\n\n@param element the path element\n@return the operation address transformer",
"Run the JavaScript program, Output saved in localBindings",
"Removes an existing metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return this metadata object.",
"Returns the configured request parameter for the current query string, or the default parameter if the core is not specified.\n@return The configured request parameter for the current query string, or the default parameter if the core is not specified.",
"Creates a new RDF serializer based on the current configuration of this\nobject.\n\n@return the newly created RDF serializer\n@throws IOException\nif there were problems opening the output files"
] |
void processBeat(Beat beat) {
if (isRunning() && beat.isTempoMaster()) {
setMasterTempo(beat.getEffectiveTempo());
deliverBeatAnnouncement(beat);
}
} | [
"Process a beat packet, potentially updating the master tempo and sending our listeners a master\nbeat notification. Does nothing if we are not active."
] | [
"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.",
"Set the week day the events should occur.\n@param weekDay the week day to set.",
"Compare the controlDOM and testDOM and save and return the differences in a list.\n\n@return list with differences",
"Start the socket server and waiting for finished\n\n@throws InterruptedException thread interrupted",
"Use this API to add cachepolicylabel resources.",
"Add a dependency task group for this model.\n\n@param dependency the dependency.\n@return key to be used as parameter to taskResult(string) method to retrieve result of root\ntask in the given dependency task group",
"Dump the contents of a row from an MPD file.\n\n@param row row data",
"Checks constraints on this model.\n\n@param checkLevel The amount of checks to perform\n@throws ConstraintException If a constraint has been violated",
"Creates an internal project and repositories such as a token storage."
] |
private float[] calculatePointerPosition(float angle) {
float x = (float) (mColorWheelRadius * Math.cos(angle));
float y = (float) (mColorWheelRadius * Math.sin(angle));
return new float[] { x, y };
} | [
"Calculate the pointer's coordinates on the color wheel using the supplied\nangle.\n\n@param angle The position of the pointer expressed as angle (in rad).\n\n@return The coordinates of the pointer's center in our internal\ncoordinate system."
] | [
"Specifies the base URI of this conversion server.\n\n@param baseUri The URI under which this remote conversion server is reachable.\n@return This builder instance.",
"Alternative entry point allowing an MPP file to be read from\na user-supplied POI file stream.\n\n@param fs POI file stream\n@return ProjectFile instance\n@throws MPXJException",
"Reads characters until the 'end' character is encountered.\n\n@param out\nThe StringBuilder to write to.\n@param in\nThe Input String.\n@param start\nStarting position.\n@param end\nEnd characters.\n@return The new position or -1 if no 'end' char was found.",
"Return all methods for a list of groupIds\n\n@param groupIds array of group IDs\n@param filters array of filters to apply to method selection\n@return collection of Methods found\n@throws Exception exception",
"We need to make sure the terms are of the right type, otherwise they will not be serialized correctly.",
"Within a single zone, tries swapping some minimum number of random\npartitions per node with some minimum number of random partitions from\nother nodes within the zone. Chooses the best swap in each iteration.\nLarge values of the greedSwapMaxPartitions... arguments make this method\nequivalent to comparing every possible swap. This is very expensive.\n\nNormal case should be :\n\n#zones X #nodes/zone X max partitions/node X max partitions/zone\n\n@param nextCandidateCluster cluster object.\n@param greedyAttempts See RebalanceCLI.\n@param greedySwapMaxPartitionsPerNode See RebalanceCLI.\n@param greedySwapMaxPartitionsPerZone See RebalanceCLI.\n@param greedySwapZoneIds The set of zoneIds to consider. Each zone is done\nindependently.\n@param storeDefs\n@return updated cluster",
"Gets information about a trashed file.\n@param fileID the ID of the trashed file.\n@return info about the trashed file.",
"Performs a null edit on an item. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param itemId\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, such as missing network connection",
"Physically close off the internal connection.\n@param conn"
] |
public Iterable<RowKey> getKeys() {
if ( currentState.isEmpty() ) {
if ( cleared ) {
// if the association has been cleared and the currentState is empty, we consider that there are no rows.
return Collections.emptyList();
}
else {
// otherwise, the snapshot rows are the current ones
return snapshot.getRowKeys();
}
}
else {
// It may be a bit too large in case of removals, but that's fine for now
Set<RowKey> keys = CollectionHelper.newLinkedHashSet( cleared ? currentState.size() : snapshot.size() + currentState.size() );
if ( !cleared ) {
// we add the snapshot RowKeys only if the association has not been cleared
for ( RowKey rowKey : snapshot.getRowKeys() ) {
keys.add( rowKey );
}
}
for ( Map.Entry<RowKey,AssociationOperation> op : currentState.entrySet() ) {
switch ( op.getValue().getType() ) {
case PUT:
keys.add( op.getKey() );
break;
case REMOVE:
keys.remove( op.getKey() );
break;
}
}
return keys;
}
} | [
"Returns all keys of all rows contained within this association.\n\n@return all keys of all rows contained within this association"
] | [
"Use this API to fetch cmppolicylabel_policybinding_binding resources of given name .",
"Computes the householder vector used in QR decomposition.\n\nu = x / max(x)\nu(0) = u(0) + |u|\nu = u / u(0)\n\n@param x Input vector. Unmodified.\n@return The found householder reflector vector",
"Counts each property for which there is a statement in the given item\ndocument, ignoring the property thisPropertyIdValue to avoid properties\ncounting themselves.\n\n@param statementDocument\n@param usageRecord\n@param thisPropertyIdValue",
"Adds title and subtitle to the TitleBand when it applies.\nIf title is not present then subtitle will be ignored",
"Sets the position vector of the keyframe.",
"Obtain host header value for a hostname\n\n@param hostName\n@return",
"OR operation which takes 2 arguments and OR's them together.\n\n<p>\n<b>NOTE:</b> There is no guarantee of the order of the clauses that are generated in the final query.\n</p>\n<p>\n<b>NOTE:</b> I can't remove the generics code warning that can be associated with this method. You can instead\nuse the {@link #or(int)} method.\n</p>",
"Sets the invalid values for the TextBox\n@param invalidValues\n@param isCaseSensitive\n@param invalidValueErrorMessage",
"Requests the waveform detail for a specific track ID, given a connection to a player that has already been\nset up.\n\n@param rekordboxId the track whose waveform detail is desired\n@param slot identifies the media slot we are querying\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved waveform detail, or {@code null} if none was available\n@throws IOException if there is a communication problem"
] |
public static tmglobal_tmsessionpolicy_binding[] get(nitro_service service) throws Exception{
tmglobal_tmsessionpolicy_binding obj = new tmglobal_tmsessionpolicy_binding();
tmglobal_tmsessionpolicy_binding response[] = (tmglobal_tmsessionpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch a tmglobal_tmsessionpolicy_binding resources."
] | [
"Sets the bottom padding for all cells in the table.\n@param paddingBottom new padding, ignored if smaller than 0\n@return this to allow chaining",
"Handles incoming Application Update Request.\n@param incomingMessage the request message to process.",
"Get transformer to use.\n\n@return transformation to apply",
"Creates a resource key for given enumeration value. By convention,\nresource bundle for enumerations has the name of enumeration class\nand value identifier is the same as enumeration value name.\n@param value the enumeration value\n@return the resource key",
"Convert a given date to a floating point date using a given reference date.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param date The given date to be associated with the return value \\( T \\).\n@return The value T measuring the distance of reference date and date by ACT/365 with SECONDS_PER_DAY seconds used as the smallest time unit and SECONDS_PER_DAY is a constant 365*24*60*60.",
"Stop listening for device announcements. Also discard any announcements which had been received, and\nnotify any registered listeners that those devices have been lost.",
"Check that each group is satisfied by one and only one field.\n\n@param currentPath the json path to the element being checked",
"Gen job id.\n\n@return the string",
"Method used to create missing timephased data.\n\n@param file project file\n@param assignment resource assignment\n@param timephasedPlanned planned timephased data\n@param timephasedComplete complete timephased data"
] |
private int deleteSegments(Log log, List<LogSegment> segments) {
int total = 0;
for (LogSegment segment : segments) {
boolean deleted = false;
try {
try {
segment.getMessageSet().close();
} catch (IOException e) {
logger.warn(e.getMessage(), e);
}
if (!segment.getFile().delete()) {
deleted = true;
} else {
total += 1;
}
} finally {
logger.warn(String.format("DELETE_LOG[%s] %s => %s", log.name, segment.getFile().getAbsolutePath(),
deleted));
}
}
return total;
} | [
"Attemps to delete all provided segments from a log and returns how many it was able to"
] | [
"Processes the template for all procedures of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Get all sub-lists of the given list of the given sizes.\n\nFor example:\n\n<pre>\nList<String> items = Arrays.asList("a", "b", "c", "d");\nSystem.out.println(CollectionUtils.getNGrams(items, 1, 2));\n</pre>\n\nwould print out:\n\n<pre>\n[[a], [a, b], [b], [b, c], [c], [c, d], [d]]\n</pre>\n\n@param <T>\nThe type of items contained in the list.\n@param items\nThe list of items.\n@param minSize\nThe minimum size of an ngram.\n@param maxSize\nThe maximum size of an ngram.\n@return All sub-lists of the given sizes.",
"Get the value of the specified column.\n\n@param columnName the name of the column\n@return the corresponding value of the column, {@code null} if the column does not exist in the row key",
"Checks whether two internet addresses are on the same subnet.\n\n@param prefixLength the number of bits within an address that identify the network\n@param address1 the first address to be compared\n@param address2 the second address to be compared\n\n@return true if both addresses share the same network bits",
"Collects all the fields from columns and also the fields not bounds to columns\n@return List<ColumnProperty>",
"Evaluates the body if the current class has at least one member with at least one tag with the specified name.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException Description of Exception\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" description=\"The parameter name. If not specified, then the raw\ncontent of the tag is returned.\"\[email protected] name=\"error\" description=\"Show this error message if no tag found.\"",
"Returns the dimensions for the video\n@param videoFile Video file\n@return the dimensions\n@throws IOException",
"Sets that there are some pending writes that occurred at a time for an associated\nlocally emitted change event. This variant maintains the last version set.\n\n@param atTime the time at which the write occurred.\n@param changeEvent the description of the write/change.",
"Calling EventProducerInterceptor in case of logging faults.\n\n@param exchange\nthe message exchange\n@param reqFid\nthe FlowId\n\n@throws Fault\nthe fault"
] |
public static base_response add(nitro_service client, route6 resource) throws Exception {
route6 addresource = new route6();
addresource.network = resource.network;
addresource.gateway = resource.gateway;
addresource.vlan = resource.vlan;
addresource.weight = resource.weight;
addresource.distance = resource.distance;
addresource.cost = resource.cost;
addresource.advertise = resource.advertise;
addresource.msr = resource.msr;
addresource.monitor = resource.monitor;
addresource.td = resource.td;
return addresource.add_resource(client);
} | [
"Use this API to add route6."
] | [
"Organises the data from Asta into a hierarchy and converts this into tasks.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data",
"Get the server redirects belonging to a server group\n\n@param profileId ID of profile\n@param serverGroupId ID of server group\n@return Collection of ServerRedirect for a server group",
"Recycles the Renderer getting it from the tag associated to the renderer root view. This view\nis not used with RecyclerView widget.\n\n@param convertView that contains the tag.\n@param content to be updated in the recycled renderer.\n@return a recycled renderer.",
"Add the option specifying if the categories should be displayed collapsed\nwhen the dialog opens.\n\n@see org.opencms.ui.actions.I_CmsADEAction#getParams()",
"Returns iterable with all folder assignments of this retention policy.\n@param limit the limit of entries per response. The default value is 100.\n@param fields the fields to retrieve.\n@return an iterable containing all folder assignments.",
"Get the real Object\n\n@param objectOrProxy\n@return Object",
"Checks if this child holds the current active state.\nIf the child is or contains the active state it is applied.",
"Convert this object to a json array.",
"Add all the items from an iterable to a collection.\n\n@param <T>\nThe type of items in the iterable and the collection\n@param collection\nThe collection to which the items should be added.\n@param items\nThe items to add to the collection."
] |
public static void main(String[] args) {
try {
new StartMain(args).go();
} catch(Throwable t) {
WeldSELogger.LOG.error("Application exited with an exception", t);
System.exit(1);
}
} | [
"The main method called from the command line.\n\n@param args the command line arguments"
] | [
"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",
"Counts a single pair of coordinates in all datasets.\n\n@param xCoord\n@param yCoord\n@param itemDocument",
"This method is currently in use only by the SvnCoordinator",
"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",
"Find the length of the block starting from 'start'.",
"This method returns the length of overlapping time between two time\nranges.\n\n@param start1 start of first range\n@param end1 end of first range\n@param start2 start start of second range\n@param end2 end of second range\n@return overlapping time in milliseconds",
"If the user has not specified a project ID, this method\nretrieves the ID of the first project in the file.",
"Creates a color item that represents a color field fond for a track.\n\n@param colorId the key of the color as found in the database\n@param label the corresponding color label as found in the database (or sent in the dbserver message)\n\n@return the color metadata field",
"Returns the compact representations of all of the dependencies of a task.\n\n@param task The task to get dependencies on.\n@return Request object"
] |
public void loadModel(GVRAndroidResource avatarResource, String attachBone)
{
EnumSet<GVRImportSettings> settings = GVRImportSettings.getRecommendedSettingsWith(EnumSet.of(GVRImportSettings.OPTIMIZE_GRAPH, GVRImportSettings.NO_ANIMATION));
GVRContext ctx = mAvatarRoot.getGVRContext();
GVRResourceVolume volume = new GVRResourceVolume(ctx, avatarResource);
GVRSceneObject modelRoot = new GVRSceneObject(ctx);
GVRSceneObject boneObject;
int boneIndex;
if (mSkeleton == null)
{
throw new IllegalArgumentException("Cannot attach model to avatar - there is no skeleton");
}
boneIndex = mSkeleton.getBoneIndex(attachBone);
if (boneIndex < 0)
{
throw new IllegalArgumentException(attachBone + " is not a bone in the avatar skeleton");
}
boneObject = mSkeleton.getBone(boneIndex);
if (boneObject == null)
{
throw new IllegalArgumentException(attachBone +
" does not have a bone object in the avatar skeleton");
}
boneObject.addChildObject(modelRoot);
ctx.getAssetLoader().loadModel(volume, modelRoot, settings, false, mLoadModelHandler);
} | [
"Load a model to attach to the avatar\n@param avatarResource resource with avatar model\n@param attachBone name of bone to attach model to"
] | [
"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.",
"Reads a single schema file.\n\n@param reader The schema reader\n@param schemaFile The schema file\n@return The model",
"get the ClassTypeSignature corresponding to given parameterized type\n\n@param parameterizedType\n@return",
"Return the array of field objects pulled from the data object.",
"Applies the given filter to each of the given elems, and returns the\nlist of elems that were accepted. The runtime type of the returned\narray is the same as the passed in array.",
"Create the index and associate it with all project models in the Application",
"Search for groups. 18+ groups will only be returned for authenticated calls where the authenticated user is over 18. This method does not require\nauthentication.\n\n@param text\nThe text to search for.\n@param perPage\nNumber of groups to return per page. If this argument is 0, it defaults to 100. The maximum allowed value is 500.\n@param page\nThe page of results to return. If this argument is 0, it defaults to 1.\n@return A GroupList Object. Only the fields <em>id</em>, <em>name</em> and <em>eighteenplus</em> in the Groups will be set.\n@throws FlickrException",
"Will scale the image down before processing for\nperformance enhancement and less memory usage\nsacrificing image quality.\n\n@param scaleInSample value greater than 1 will scale the image width/height, so 2 will getFromDiskCache you 1/4\nof the original size and 4 will getFromDiskCache you 1/16 of the original size - this just sets\nthe inSample size in {@link android.graphics.BitmapFactory.Options#inSampleSize } and\nbehaves exactly the same, so keep the value 2^n for least scaling artifacts",
"Introspect the given object.\n\n@param obj object for introspection.\n\n@return a map containing object's field values.\n\n@throws IntrospectionException if an exception occurs during introspection\n@throws InvocationTargetException if property getter throws an exception\n@throws IllegalAccessException if property getter is inaccessible"
] |
@SuppressWarnings("WeakerAccess")
public Map<DeckReference, WaveformDetail> getLoadedDetails() {
ensureRunning();
if (!isFindingDetails()) {
throw new IllegalStateException("WaveformFinder is not configured to find waveform details.");
}
// Make a copy so callers get an immutable snapshot of the current state.
return Collections.unmodifiableMap(new HashMap<DeckReference, WaveformDetail>(detailHotCache));
} | [
"Get the waveform details available for all tracks currently loaded in any player, either on the play deck, or\nin a hot cue.\n\n@return the details associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the WaveformFinder is not running or requesting waveform details"
] | [
"Normalize the list of selected categories to fit for the ids of the tree items.",
"Sets the replace var map to single target from map.\n\n@param replacementVarMapNodeSpecific\nthe replacement var map node specific\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder",
"Populates a calendar hours instance.\n\n@param record MPX record\n@param hours calendar hours instance\n@throws MPXJException",
"Creates a new RDF serializer based on the current configuration of this\nobject.\n\n@return the newly created RDF serializer\n@throws IOException\nif there were problems opening the output files",
"Use this API to update filterhtmlinjectionparameter.",
"You should use the server's time here. Otherwise you might get unexpected results.\n\nThe typical use case is:\n\n\n<pre>\nHTTPResponse response = ....\nHTTPRequest request = createRequest();\nrequest = request.conditionals(new Conditionals().ifModifiedSince(response.getLastModified());\n</pre>\n\n@param time the time to check.\n@return the conditionals with the If-Modified-Since date set.",
"Gets the Taneja divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Taneja divergence between p and q.",
"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",
"Facade method for operating the Telnet Shell supporting line editing and command\nhistory over a socket.\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param mainHandler Main command handler\n@param input Input stream.\n@param output Output stream.\n@return Shell that can be either further customized or run directly by calling commandLoop()."
] |
public Quaternionf ConvertDirectionalVectorToQuaternion(Vector3f d) {
d.negate();
Quaternionf q = new Quaternionf();
// check for exception condition
if ((d.x == 0) && (d.z == 0)) {
// exception condition if direction is (0,y,0):
// straight up, straight down or all zero's.
if (d.y > 0) { // direction straight up
AxisAngle4f angleAxis = new AxisAngle4f(-(float) Math.PI / 2, 1, 0,
0);
q.set(angleAxis);
} else if (d.y < 0) { // direction straight down
AxisAngle4f angleAxis = new AxisAngle4f((float) Math.PI / 2, 1, 0, 0);
q.set(angleAxis);
} else { // All zero's. Just set to identity quaternion
q.identity();
}
} else {
d.normalize();
Vector3f up = new Vector3f(0, 1, 0);
Vector3f s = new Vector3f();
d.cross(up, s);
s.normalize();
Vector3f u = new Vector3f();
d.cross(s, u);
u.normalize();
Matrix4f matrix = new Matrix4f(s.x, s.y, s.z, 0, u.x, u.y, u.z, 0, d.x,
d.y, d.z, 0, 0, 0, 0, 1);
q.setFromNormalized(matrix);
}
return q;
} | [
"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"
] | [
"Get the server redirects for a given clientId from the database\n\n@param clientId client ID\n@return collection of ServerRedirects",
"Utility function to zip the content of an entire folder, but not the folder itself.\n@param folder\n@param fileName optional\n@return success or not",
"Helper function to return the minimum size of the index space to be passed to the reduction given the input and\noutput tensors",
"returns an Array with an Objects PK VALUES, with any java-to-sql\nFieldConversion applied. If the Object is a Proxy or a VirtualProxy NO\nconversion is necessary.\n\n@param objectOrProxy\n@return Object[]\n@throws PersistenceBrokerException",
"Get a list of comments made for a particular entity\n\n@param entityId - id of the commented entity\n@param entityType - type of the entity\n@return list of comments",
"Sets a new image\n\n@param BufferedImage imagem",
"Support the range subscript operator for String\n\n@param text a String\n@param range a Range\n@return a substring corresponding to the Range\n@since 1.0",
"Starts recursive insert on all insert objects object graph",
"Does the server support log downloads?\n\n@param cliGuiCtx The context.\n@return <code>true</code> if the server supports log downloads,\n<code>false</code> otherwise."
] |
private static final String correctNumberFormat(String value)
{
String result;
int index = value.indexOf(',');
if (index == -1)
{
result = value;
}
else
{
char[] chars = value.toCharArray();
chars[index] = '.';
result = new String(chars);
}
return result;
} | [
"Detect numbers using comma as a decimal separator and replace with period.\n\n@param value original numeric value\n@return corrected numeric value"
] | [
"default visibility for unit test",
"Gets the estimated time remaining in milliseconds based upon the total number of work units, the start time, and how many units have been done\nso far.\n\nThis should not be called before any work units have been done.",
"Utility method to convert an array of bytes into a long. Byte ordered is\nassumed to be big-endian.\n@param bytes The data to read from.\n@param offset The position to start reading the 8-byte long from.\n@return The 64-bit integer represented by the eight bytes.\n@since 1.1",
"Gets the global and adds it ot the BatchExecutionresults using the alternative outIdentifier.\n\n@param identifier\nThe identifier of the global\n@param outIdentifier\nThe identifier used in the ExecutionResults to store the global.\n@return",
"Instantiates the templates specified by @Template within @Templates",
"Send a metadata cache update announcement to all registered listeners.\n\n@param slot the media slot whose cache status has changed\n@param cache the cache which has been attached, or, if {@code null}, the previous cache has been detached",
"Use this API to fetch all the ipset resources that are configured on netscaler.",
"Use this API to fetch a appfwglobal_auditsyslogpolicy_binding resources.",
"Use this API to fetch all the dnsaaaarec resources that are configured on netscaler.\nThis uses dnsaaaarec_args which is a way to provide additional arguments while fetching the resources."
] |
public static List<String> getSelectOptionValues(CmsObject cms, String rootPath, boolean allRemoved) {
try {
cms = OpenCms.initCmsObject(cms);
cms.getRequestContext().setSiteRoot("");
CmsADEConfigData adeConfig = OpenCms.getADEManager().lookupConfiguration(cms, rootPath);
if (adeConfig.parent() != null) {
adeConfig = adeConfig.parent();
}
List<CmsSelectWidgetOption> options = getFormatterOptionsStatic(cms, adeConfig, rootPath, allRemoved);
List<CmsSelectWidgetOption> typeOptions = getTypeOptionsStatic(cms, adeConfig, allRemoved);
options.addAll(typeOptions);
List<String> result = new ArrayList<String>(options.size());
for (CmsSelectWidgetOption o : options) {
result.add(o.getValue());
}
return result;
} catch (CmsException e) {
// should never happen
LOG.error(e.getLocalizedMessage(), e);
return null;
}
} | [
"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 update systemcollectionparam.",
"Set the duration option.\n@param value the duration option to set ({@link EndType} as string).",
"Sets currency symbol.\n\n@param symbol currency symbol",
"Restore the recorded state from the rollback xml.\n\n@param target the patchable target\n@param rollbackPatchId the rollback patch id\n@param patchType the the current patch type\n@param history the recorded history\n@throws PatchingException",
"Use this API to delete ntpserver resources of given names.",
"Set a friendly name for a client\n\n@param profileId profileId of the client\n@param clientUUID UUID of the client\n@param friendlyName friendly name of the client\n@return return Client object or null\n@throws Exception exception",
"Assigns this retention policy to folder.\n@param folder the folder to assign policy to.\n@return info about created assignment.",
"Updates the text style according to a new text position\n@param bstyle the style to be updated\n@param text the text position",
"Returns the compact project status update records for all updates on the project.\n\n@param project The project to find status updates for.\n@return Request object"
] |
public void notifyEventListeners(ZWaveEvent event) {
logger.debug("Notifying event listeners");
for (ZWaveEventListener listener : this.zwaveEventListeners) {
logger.trace("Notifying {}", listener.toString());
listener.ZWaveIncomingEvent(event);
}
} | [
"Notify our own event listeners of a Z-Wave event.\n@param event the event to send."
] | [
"Set the value for a floating point 4x4 matrix.\n@param key name of uniform to set.\n@see #getFloatVec(String)",
"appends a WHERE-clause to the Statement\n@param where\n@param crit\n@param stmt",
"Puts value at given column\n\n@param value Will be encoded using UTF-8",
"Starts the transition",
"Get the column name from the indirection table.\n@param mnAlias\n@param path",
"Similar to masking, checks that the range resulting from the bitwise or is contiguous.\n\n@param maskValue\n@param segmentPrefixLength\n@return\n@throws PrefixLenException",
"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.",
"Returns the specified range of elements in the sorted set.\nThe elements are considered to be ordered from the lowest to the highest score.\nLexicographical order is used for elements with equal score.\nBoth start and stop are zero-based inclusive indexes. They can also be negative numbers indicating offsets from\nthe end of the sorted set, with -1 being the last element of the sorted set.\n@param start\n@param end\n@return the range of elements",
"Checks whether the folder exists for fileName, and creates it if necessary.\n\n@param fileName folder name.\n@throws IOException an IO exception."
] |
public void addCorporateGroupId(final String organizationId, final String corporateGroupId) {
final DbOrganization dbOrganization = getOrganization(organizationId);
if(!dbOrganization.getCorporateGroupIdPrefixes().contains(corporateGroupId)){
dbOrganization.getCorporateGroupIdPrefixes().add(corporateGroupId);
repositoryHandler.store(dbOrganization);
}
repositoryHandler.addModulesOrganization(corporateGroupId, dbOrganization);
} | [
"Adds a corporate groupId to an organization\n\n@param organizationId String\n@param corporateGroupId String"
] | [
"Process field aliases.",
"Constructs a Google APIs HTTP client with the associated credentials.",
"Adds columns for the specified properties.\n@param _properties the array of <code>PropertyDescriptor</code>s to be added.\n@throws ColumnBuilderException if an error occurs.\n@throws ClassNotFoundException if an error occurs.",
"Retrieves the timephased breakdown of actual cost.\n\n@return timephased actual cost",
"Sets the initial MoificationState of the wrapped object myObj. The initial state will be StateNewDirty if myObj\nis not persisten already. The state will be set to StateOldClean if the object is already persistent.",
"If X == null then the solution is written into B. Otherwise the solution is copied\nfrom B into X.",
"The only indication that a task is a SubProject is the contents\nof the subproject file name field. We test these here then add a skeleton\nsubproject structure to match the way we do things with MPP files.",
"If the Authtoken was already created in a separate program but not saved to file.\n\n@param authToken\n@param tokenSecret\n@param username\n@return\n@throws IOException",
"Register opened database via the PBKey."
] |
public final PrintJobResultExtImpl getResult(final URI reportURI) {
final CriteriaBuilder builder = getSession().getCriteriaBuilder();
final CriteriaQuery<PrintJobResultExtImpl> criteria =
builder.createQuery(PrintJobResultExtImpl.class);
final Root<PrintJobResultExtImpl> root = criteria.from(PrintJobResultExtImpl.class);
criteria.where(builder.equal(root.get("reportURI"), reportURI.toString()));
return getSession().createQuery(criteria).uniqueResult();
} | [
"Get result report.\n\n@param reportURI the URI of the report\n@return the result report."
] | [
"Map the EventType.\n\n@param eventType the event type\n@return the event",
"Parses coordinates into a Spatial4j point shape.",
"Method to know if already exists one file with the same name in the same\nfolder\n\n@param scenario_name\n@param path\n@param dest_dir\n@return true when the file does not exist",
"Multiply two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the multiply of specified complex numbers.",
"Returns redirect information for the given ID\n\n@param id ID of redirect\n@return ServerRedirect\n@throws Exception exception",
"Print a time value.\n\n@param value time value\n@return time value",
"This is pretty ugly. We end up mimicking the request logic here, so this\nneeds to stay in sync with handleRequest.",
"Gets the final transform of the bone.\n\n@return the 4x4 matrix representing the final transform of the\nbone during animation, which comprises bind pose and skeletal\ntransform at the current time of the animation.",
"Use this API to add dospolicy."
] |
public static Optimizer<DifferentiableFunction> getRegularizedOptimizer(final Optimizer<DifferentiableFunction> opt,
final double l1Lambda, final double l2Lambda) {
if (l1Lambda == 0 && l2Lambda == 0) {
return opt;
}
return new Optimizer<DifferentiableFunction>() {
@Override
public boolean minimize(DifferentiableFunction objective, IntDoubleVector point) {
DifferentiableFunction fn = getRegularizedFn(objective, false, l1Lambda, l2Lambda);
return opt.minimize(fn, point);
}
};
} | [
"Converts a standard optimizer to one which the given amount of l1 or l2 regularization."
] | [
"Adds the given some-value restriction to the list of restrictions that\nshould still be serialized. The given resource will be used as a subject.\n\n@param subject\n@param propertyUri\n@param rangeUri",
"Use this API to update aaaparameter.",
"Use this API to fetch linkset_interface_binding resources of given name .",
"Use this API to fetch rnat6_nsip6_binding resources of given name .",
"Set the draw mode for this mesh. Default is GL_TRIANGLES.\n\n@param drawMode",
"Creates a map of identifiers or page titles to documents retrieved via\nthe API URL\n\n@param properties\nparameter setting for wbgetentities\n@return map of document identifiers or titles to documents retrieved via\nthe API URL\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\nif we encounter network issues or HTTP 500 errors from Wikibase",
"Process the set of activities from the Phoenix file.\n\n@param phoenixProject project data",
"Based on the current request represented by the HttpExchange construct a complete URL for the supplied path.\n\n@param exchange - The current HttpExchange\n@param path - The path to include in the constructed URL\n@return The constructed URL",
"Convert Collection to Set\n@param collection Collection\n@return Set"
] |
static String replaceCheckDigit(final String iban, final String checkDigit) {
return getCountryCode(iban) + checkDigit + getBban(iban);
} | [
"Returns an iban with replaced check digit.\n\n@param iban The iban\n@return The iban without the check digit"
] | [
"Reads an argument of type \"nstring\" from the request.",
"Finds out which dump files of the given type have been downloaded\nalready. The result is a list of objects that describe the available dump\nfiles, in descending order by their date. Not all of the dumps included\nmight be actually available.\n\n@param dumpContentType\nthe type of dump to consider\n@return list of objects that provide information on available dumps",
"compares two java files",
"Returns a count of in-window events.\n\n@return the the count of in-window events.",
"Use this API to fetch responderpolicy resource of given name .",
"Extracts the column of A and copies it into u while computing the magnitude of the\nlargest element and returning it.\n\n<pre>\nu[ (offsetU+row0+i)*2 ] = A.getReal(row0+i,col)\nu[ (offsetU+row0+i)*2 + 1] = A.getImag(row0+i,col)\n</pre>\n\n@param A Complex matrix\n@param row0 First row in A to be copied\n@param row1 Last row in A + 1 to be copied\n@param col Column in A\n@param u Output array storage\n@param offsetU first index in U\n@return magnitude of largest element",
"A helper - in Java 9, the extension CL was renamed to platform CL and hosts all the JDK classes. Before 9, it was useless and we used\nbootstrap CL instead.\n\n@return the base CL to use.",
"2-D Forward Discrete Cosine Transform.\n\n@param data Data.",
"Find a node in the tree. The node must be \"visible\" to be found.\n@param address The full address of the node matching ManagementModelNode.addressPath()\n@return The node, or null if not found."
] |
public static double elementMin( DMatrixSparseCSC A ) {
if( A.nz_length == 0)
return 0;
// if every element is assigned a value then the first element can be a minimum.
// Otherwise zero needs to be considered
double min = A.isFull() ? A.nz_values[0] : 0;
for(int i = 0; i < A.nz_length; i++ ) {
double val = A.nz_values[i];
if( val < min ) {
min = val;
}
}
return min;
} | [
"Returns the value of the element with the minimum value\n@param A (Input) Matrix. Not modified.\n@return scalar"
] | [
"Creates the default editor state for editing a bundle with descriptor.\n@return the default editor state for editing a bundle with descriptor.",
"This method is called to format a units value.\n\n@param value numeric value\n@return currency value",
"Seeks forward or backwards to a particular holiday based on the current date\n\n@param holidayString The holiday to seek to\n@param direction The direction to seek\n@param seekAmount The number of years to seek",
"Await service container stability ignoring thread interruption.\n\n@param timeout maximum period to wait for service container stability\n@param timeUnit unit in which {@code timeout} is expressed\n\n@throws java.util.concurrent.TimeoutException if service container stability is not reached before the specified timeout",
"Use this API to fetch nstrafficdomain_binding resources of given names .",
"Hide keyboard from phoneEdit field",
"If converters are set on a table, this function tests if these can convert a cell value. The first\nconverter, which claims that it can convert, will be used to do the conversion.",
"Find documents using an index\n\n@param selectorJson String representation of a JSON object describing criteria used to\nselect documents. For example:\n{@code \"{ \\\"selector\\\": {<your data here>} }\"}.\n@param classOfT The class of Java objects to be returned\n@param <T> the type of the Java object to be returned\n@return List of classOfT objects\n@see #findByIndex(String, Class, FindByIndexOptions)\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/cloudant_query.html#selector-syntax\"\ntarget=\"_blank\">selector syntax</a>\n@deprecated Use {@link #query(String, Class)} instead",
"This method extracts calendar data from an MSPDI file.\n\n@param project Root node of the MSPDI file\n@param map Map of calendar UIDs to names"
] |
public void explore() {
if (isLeaf) return;
if (isGeneric) return;
removeAllChildren();
try {
String addressPath = addressPath();
ModelNode resourceDesc = executor.doCommand(addressPath + ":read-resource-description");
resourceDesc = resourceDesc.get("result");
ModelNode response = executor.doCommand(addressPath + ":read-resource(include-runtime=true,include-defaults=true)");
ModelNode result = response.get("result");
if (!result.isDefined()) return;
List<String> childrenTypes = getChildrenTypes(addressPath);
for (ModelNode node : result.asList()) {
Property prop = node.asProperty();
if (childrenTypes.contains(prop.getName())) { // resource node
if (hasGenericOperations(addressPath, prop.getName())) {
add(new ManagementModelNode(cliGuiCtx, new UserObject(node, prop.getName())));
}
if (prop.getValue().isDefined()) {
for (ModelNode innerNode : prop.getValue().asList()) {
UserObject usrObj = new UserObject(innerNode, prop.getName(), innerNode.asProperty().getName());
add(new ManagementModelNode(cliGuiCtx, usrObj));
}
}
} else { // attribute node
UserObject usrObj = new UserObject(node, resourceDesc, prop.getName(), prop.getValue().asString());
add(new ManagementModelNode(cliGuiCtx, usrObj));
}
}
} catch (Exception e) {
e.printStackTrace();
}
} | [
"Refresh children using read-resource operation."
] | [
"We have received notification that a device is no longer on the network, so clear out its artwork.\n\n@param announcement the packet which reported the device’s disappearance",
"Use this API to add systemuser.",
"Constraint that ensures that the field has a length if the jdbc type requires it.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)",
"Invalidate layout setup.",
"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",
"Creates the tcpClient with proper handler.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception",
"This is the main entry point used to convert the internal representation\nof timephased baseline work into an external form which can\nbe displayed to the user.\n\n@param file parent project file\n@param work timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList timescale date ranges\n@return list of durations, one per timescale date range",
"Logs to Info if the debug level is greater than or equal to 1.",
"Process any StepEvent. You can change last added to stepStorage\nstep using this method.\n\n@param event to process"
] |
private static String qualifiedName(Options opt, String r) {
if (opt.hideGenerics)
r = removeTemplate(r);
// Fast path - nothing to do:
if (opt.showQualified && (opt.showQualifiedGenerics || r.indexOf('<') < 0))
return r;
StringBuilder buf = new StringBuilder(r.length());
qualifiedNameInner(opt, r, buf, 0, !opt.showQualified);
return buf.toString();
} | [
"Return the class's name, possibly by stripping the leading path"
] | [
"Converts this file into a resource name on the classpath by cutting of the file path\nto the classpath root.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param file The file.\n@return The resource name on the classpath.",
"Performs a put operation with the specified composite request object\n\n@param requestWrapper A composite request object containing the key and\nvalue\n@return Version of the value for the successful put",
"Lift a Java Func2 to a Scala Function2\n\n@param f the function to lift\n\n@returns the Scala function",
"Sets the global setting for this ID\n\n@param pathId ID of path\n@param global True if global, False otherwise",
"Delete a path recursively.\n@param path a Path pointing to a file or a directory that may not exists anymore.\n@throws IOException",
"Log a message line to the output.",
"Use this API to fetch sslvserver_sslcipher_binding resources of given name .",
"Make a sort order for use in a query.",
"Return true only if the MethodCallExpression represents a method call for the specified method name\n@param methodCall - the AST MethodCallExpression\n@param methodNamePattern - the expected name of the method being called\n@param numArguments - The number of expected arguments\n@return true only if the method call name matches"
] |
private boolean isTileVisible(final ReferencedEnvelope tileBounds) {
if (FloatingPointUtil.equals(this.transformer.getRotation(), 0.0)) {
return true;
}
final GeometryFactory gfac = new GeometryFactory();
final Optional<Geometry> rotatedMapBounds = getRotatedMapBounds(gfac);
if (rotatedMapBounds.isPresent()) {
return rotatedMapBounds.get().intersects(gfac.toGeometry(tileBounds));
} else {
// in case of an error, we simply load the tile
return true;
}
} | [
"When using a map rotation, there might be tiles that are outside the rotated map area. To avoid to load\nthese tiles, this method checks if a tile is really required to draw the map."
] | [
"Returns the default conversion for the given java type.\n\n@param javaType The qualified java type\n@return The default conversion or <code>null</code> if there is no default conversion for the type",
"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",
"Serializes any char sequence and writes it into specified buffer.",
"This method writes extended attribute data for a resource.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource",
"Retrieve a Double from an input stream.\n\n@param is input stream\n@return Double instance",
"Obtain matching paths for a request\n\n@param overrideType type of override\n@param client Client\n@param profile Profile\n@param uri URI\n@param requestType type of request\n@param pathTest If true this will also match disabled paths\n@return Collection of matching endpoints\n@throws Exception exception",
"Delete by id.\n\n@param id the id",
"Returns a value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return the metadata property value.\n@deprecated Metadata#get() does not handle all possible metadata types; use Metadata#getValue() instead",
"Read general project properties."
] |
public static int countTrue(BMatrixRMaj A) {
int total = 0;
int N = A.getNumElements();
for (int i = 0; i < N; i++) {
if( A.data[i] )
total++;
}
return total;
} | [
"Counts the number of elements in A which are true\n@param A input matrix\n@return number of true elements"
] | [
"Utility method used to convert a Number into a BigInteger.\n\n@param value Number instance\n@return BigInteger instance",
"Create constant name.\n@param state STATE_UNCHANGED, STATE_CHANGED, STATE_NEW or STATE_DELETED.\n@return cconstanname as String",
"Returns the service id with the propertype.\n\n@param serviceReference\n@return long value for the service id",
"This is a convenience method provided to allow a day to be set\nas working or non-working, by using the day number to\nidentify the required day.\n\n@param day required day\n@param working flag indicating if the day is a working day",
"Produces an IPv4 address from any sequence of 4 bytes in this IPv6 address.\n\n@param byteIndex the byte index to start\n@throws IndexOutOfBoundsException if the index is less than zero or bigger than 7\n@return",
"Boot the controller. Called during service start.\n\n@param context the boot context\n@throws ConfigurationPersistenceException\nif the configuration failed to be loaded",
"The token was previously determined as potentially to-be-splitted thus we\nemit additional indentation or dedenting tokens.",
"Extracts the postal code, country code and service code from the primary data and returns the corresponding primary message\ncodewords.\n\n@return the primary message codewords",
"Process the layers.conf file.\n\n@param repoRoot the root\n@return the layers conf\n@throws java.io.IOException"
] |
public GVRAnimator start(int animIndex)
{
if ((animIndex < 0) || (animIndex >= mAnimations.size()))
{
throw new IndexOutOfBoundsException("Animation index out of bounds");
}
GVRAnimator anim = mAnimations.get(animIndex);
start(anim);
return anim;
} | [
"Starts the animation with the given index.\n@param animIndex 0-based index of {@link GVRAnimator} to start;\n@see GVRAvatar#stop()\n@see #start(String)"
] | [
"Read the table from the file and populate the supplied Table instance.\n\n@param file database file\n@param table Table instance",
"Utility method to retrieve the next working date start time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of next work start",
"Use this API to fetch csvserver_copolicy_binding resources of given name .",
"Invoked by subclasses; performs actual file roll. Tests to see whether roll\nis necessary have already been performed, so just do it.",
"Write entries into the storage.\nOverriding methods should first delegate to super before adding their own entries.",
"Finds or opens a client to talk to the dbserver on the specified player, incrementing its use count.\n\n@param targetPlayer the player number whose database needs to be interacted with\n@param description a short description of the task being performed for error reporting if it fails,\nshould be a verb phrase like \"requesting track metadata\"\n\n@return the communication client for talking to that player, or {@code null} if the player could not be found\n\n@throws IllegalStateException if we can't find the target player or there is no suitable player number for us\nto pretend to be\n@throws IOException if there is a problem communicating",
"Gets the progress from response.\n\n@param myResponse\nthe my response\n@return the progress from response",
"Remove a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param isDirectory whether the file is a directory or not\n@return the builder",
"This method uses the configured git credentials and repo, to test its validity.\nIn addition, in case the user requested creation of a new tag, it checks that\nanother tag with the same name doesn't exist"
] |
private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
Main.getProperties().setProperty(Main.PROPERTY_MAINFRAME_HEIGHT, "" + this.getHeight());
Main.getProperties().setProperty(Main.PROPERTY_MAINFRAME_WIDTH, "" + this.getWidth());
Main.getProperties().setProperty(Main.PROPERTY_MAINFRAME_POSX, "" + this.getBounds().x);
Main.getProperties().setProperty(Main.PROPERTY_MAINFRAME_POSY, "" + this.getBounds().y);
Main.getProperties().storeProperties("");
System.exit(0);
} | [
"Exit the Application"
] | [
"Only match if the TypeReference is at the specified location within the file.",
"Use this API to fetch ipset_nsip6_binding resources of given name .",
"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()",
"Generate a currency format.\n\n@param position currency symbol position\n@return currency format",
"Merges two lists together.\n\n@param one first list\n@param two second list\n@return merged lists",
"Sets the position of the currency symbol.\n\n@param posn currency symbol position.",
"Return true if the processor of the node has previously been executed.\n\n@param processorGraphNode the node to test.",
"Delete a file ignoring failures.\n\n@param file file to delete",
"Get all registration points associated with this registration.\n\n@return all registration points. Will not be {@code null} but may be empty"
] |
private void registerSynchronization(TransactionImpl odmgTrans, Transaction transaction)
{
// todo only need for development
if (odmgTrans == null || transaction == null)
{
log.error("One of the given parameters was null --> cannot do synchronization!" +
" omdg transaction was null: " + (odmgTrans == null) +
", external transaction was null: " + (transaction == null));
return;
}
int status = -1; // default status.
try
{
status = transaction.getStatus();
if (status != Status.STATUS_ACTIVE)
{
throw new OJBRuntimeException(
"Transaction synchronization failed - wrong status of external container tx: " +
getStatusString(status));
}
}
catch (SystemException e)
{
throw new OJBRuntimeException("Can't read status of external tx", e);
}
try
{
//Sequence of the following method calls is significant
// 1. register the synchronization with the ODMG notion of a transaction.
transaction.registerSynchronization((J2EETransactionImpl) odmgTrans);
// 2. mark the ODMG transaction as being in a JTA Transaction
// Associate external transaction with the odmg transaction.
txRepository.set(new TxBuffer(odmgTrans, transaction));
}
catch (Exception e)
{
log.error("Cannot associate PersistenceBroker with running Transaction", e);
throw new OJBRuntimeException(
"Transaction synchronization failed - wrong status of external container tx", e);
}
} | [
"Do synchronization of the given J2EE ODMG Transaction"
] | [
"Ask the specified player for an Artist menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n\n@return the entries in the artist menu\n\n@throws Exception if there is a problem obtaining the menu",
"Resolves an idl jar for the artifact.\n@return Returns idl artifact\n@throws MojoExecutionException is idl jar is not present for the artifact.",
"Record the checkout wait time in us\n\n@param dest Destination of the socket to checkout. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param checkoutTimeUs The number of us to wait before getting a socket",
"Get CorrelationId from message.\n\n@param message the message\n@return correlationId or null if not set",
"Reads data from a single page of the database file.\n\n@param buffer page from the database file\n@param table Table instance",
"Resolve a resource transformer for a given address.\n\n@param address the address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the resource transformer",
"Update the project properties from the project summary task.\n\n@param task project summary task",
"Return the IP address as text such as \"192.168.1.15\".",
"Convert a field value to something suitable to be stored in the database."
] |
public static CmsResource getDescriptor(CmsObject cms, String basename) {
CmsSolrQuery query = new CmsSolrQuery();
query.setResourceTypes(CmsMessageBundleEditorTypes.BundleType.DESCRIPTOR.toString());
query.setFilterQueries("filename:\"" + basename + CmsMessageBundleEditorTypes.Descriptor.POSTFIX + "\"");
query.add("fl", "path");
CmsSolrResultList results;
try {
boolean isOnlineProject = cms.getRequestContext().getCurrentProject().isOnlineProject();
String indexName = isOnlineProject
? CmsSolrIndex.DEFAULT_INDEX_NAME_ONLINE
: CmsSolrIndex.DEFAULT_INDEX_NAME_OFFLINE;
results = OpenCms.getSearchManager().getIndexSolr(indexName).search(cms, query, true, null, true, null);
} catch (CmsSearchException e) {
LOG.error(Messages.get().getBundle().key(Messages.ERR_BUNDLE_DESCRIPTOR_SEARCH_ERROR_0), e);
return null;
}
switch (results.size()) {
case 0:
return null;
case 1:
return results.get(0);
default:
String files = "";
for (CmsResource res : results) {
files += " " + res.getRootPath();
}
LOG.warn(Messages.get().getBundle().key(Messages.ERR_BUNDLE_DESCRIPTOR_NOT_UNIQUE_1, files));
return results.get(0);
}
} | [
"Returns the bundle descriptor for the bundle with the provided base name.\n@param cms {@link CmsObject} used for searching.\n@param basename the bundle base name, for which the descriptor is searched.\n@return the bundle descriptor, or <code>null</code> if it does not exist or searching fails."
] | [
"Rename with retry.\n\n@param from\n@param to\n@return <tt>true</tt> if the file was successfully renamed.",
"Add a LIKE clause so the column must mach the value using '%' patterns.",
"Set HTTP client\n\n@param httpClient\nAn instance of OkHttpClient\n@return Api Client",
"Returns information about all clients for a profile\n\n@param model\n@param profileIdentifier\n@return\n@throws Exception",
"This method searches in the Component Management Service, so given an\nagent name returns its IExternalAccess\n\n@param agent_name\nThe name of the agent in the platform\n@return The IComponentIdentifier of the agent in the platform",
"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.",
"Performs a variety of tests to see if the provided matrix is a valid\ncovariance matrix.\n\n@return 0 = is valid 1 = failed positive diagonal, 2 = failed on symmetry, 2 = failed on positive definite",
"This internal method is used to convert from a Date instance to an\ninteger representing the number of minutes past midnight.\n\n@param date date instance\n@return minutes past midnight as an integer",
"Method used to update fields with values received from API.\n@param jsonObject JSON-encoded info about File Version object."
] |
protected ServiceRegistration registerProxy(Object objectProxy, Class clazz) {
Dictionary<String, Object> props = new Hashtable<String, Object>();
ServiceRegistration registration;
registration = context.registerService(clazz, objectProxy, props);
return registration;
} | [
"Utility method to register a proxy has a Service in OSGi."
] | [
"Add roles for given role parent item.\n\n@param ouItem group parent item",
"Returns true if we should skip this bar, i.e. the bar only has a single child task.\n\n@param row bar row to test\n@return true if this bar should be skipped",
"Parses the equation and compiles it into a sequence which can be executed later on\n@param equation String in simple equation format.\n@param assignment if true an assignment is expected and an exception if thrown if there is non\n@param debug if true it will print out debugging information\n@return Sequence of operations on the variables",
"Add a custom query parameter to the _changes request. Useful for specifying extra parameters\nto a filter function for example.\n\n@param name the name of the query parameter\n@param value the value of the query parameter\n@return this Changes instance\n@since 2.5.0",
"Convert an Object to a Timestamp.",
"If you have priorities based on enums, this is the recommended prioritizer to use as it will prevent\nstarvation of low priority items\n\n@param groupClass\n@return",
"Set the host.\n\n@param host the host",
"Get Rule\nGet a rule using the Rule ID\n@param ruleId Rule ID. (required)\n@return RuleEnvelope\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Use this API to fetch csvserver_cachepolicy_binding resources of given name ."
] |
public void lock(Object obj, int lockMode) throws LockNotGrantedException
{
if (log.isDebugEnabled()) log.debug("lock object was called on tx " + this + ", object is " + obj.toString());
checkOpen();
RuntimeObject rtObject = new RuntimeObject(obj, this);
lockAndRegister(rtObject, lockMode, isImplicitLocking(), getRegistrationList());
// if(isImplicitLocking()) moveToLastInOrderList(rtObject.getIdentity());
} | [
"Upgrade the lock on the given object to the given lock mode. The call has\nno effect if the object's current lock is already at or above that level of\nlock mode.\n\n@param obj object to acquire a lock on.\n@param lockMode lock mode to acquire. The lock modes\nare <code>READ</code> , <code>UPGRADE</code> , and <code>WRITE</code> .\n\n@exception LockNotGrantedException Description of Exception"
] | [
"Returns s if it's at most maxWidth chars, otherwise chops right side to fit.",
"Stop Redwood, closing all tracks and prohibiting future log messages.",
"Create parameter converters from methods annotated with @AsParameterConverter\n@see {@link AbstractStepsFactory}",
"Converts a row major block matrix into a row major matrix.\n\n@param src Original DMatrixRBlock.. Not modified.\n@param dst Equivalent DMatrixRMaj. Modified.",
"Return the containing group if it contains exactly one element.\n\n@since 2.14",
"Notifies all interested subscribers of the given revision.\n\n@param mwRevision\nthe given revision\n@param isCurrent\ntrue if this is guaranteed to be the most current revision",
"Sets the working directory.\n\n@param dir The directory\n@throws IOException If the directory does not exist or cannot be written/read",
"Use this API to fetch filtered set of vpnglobal_auditnslogpolicy_binding resources.\nset the filter parameter values in filtervalue object.",
"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"
] |
static void backupDirectory(final File source, final File target) throws IOException {
if (!target.exists()) {
if (!target.mkdirs()) {
throw PatchLogger.ROOT_LOGGER.cannotCreateDirectory(target.getAbsolutePath());
}
}
final File[] files = source.listFiles(CONFIG_FILTER);
for (final File file : files) {
final File t = new File(target, file.getName());
IoUtils.copyFile(file, t);
}
} | [
"Backup all xml files in a given directory.\n\n@param source the source directory\n@param target the target directory\n@throws IOException for any error"
] | [
"Returns the full record for a single attachment.\n\n@param attachment Globally unique identifier for the attachment.\n@return Request object",
"Use this API to delete application.",
"Registers annotations which will be considered as bean defining annotations.\n\nNOTE - If used along with {@code <trim/>} bean archives and/or with Weld configuration key\n{@code org.jboss.weld.bootstrap.vetoTypesWithoutBeanDefiningAnnotation}, these annotations will be ignored.\n\n@param annotations annotations which will be considered as Bean Defining Annotations.\n@return self",
"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",
"Helper method to lookup a DAO if it has already been associated with the class. Otherwise this returns null.",
"Use this API to fetch ipset_nsip6_binding resources of given name .",
"Load the related repositories, plugins and a promotion config associated to the buildId.\nCalled from the UI.\n\n@param buildId - The unique build id.\n@return LoadBuildsResponse e.g. list of repositories, plugins and a promotion config.",
"Use this API to add snmpuser.",
"Process an MPP file to make it anonymous.\n\n@param input input file name\n@param output output file name\n@throws Exception"
] |
private double getConstraint(double x1, double x2)
{
double c1,c2,h;
c1 = -x1*x1-x2*x2+1+0.1*Math.cos(16*Math.atan(x1/x2));
c2 = (x1-0.5)*(x1-0.5)+(x2-0.5)*(x2-0.5)-0.5;
if(c1>c2)
h = (c1>0)?c1:0;
else
h = (c2>0)?c2:0;
return h;
} | [
"use the design parameters to compute the constraint equation to get the value"
] | [
"Prints a suggestion to stderr for the argument based on the levenshtein distance metric\n\n@param arg the argument which could not be assigned to a flag\n@param co the {@link ConfigOption} List where every flag is stored",
"Returns a name for the principal based upon one of the attributes\nof the main CommonProfile. The attribute name used to query the CommonProfile\nis specified in the constructor.\n\n@return a name for the Principal or null if the attribute is not populated.",
"Returns the time elapsed by the user on the app\n@return Time elapsed by user on the app in int",
"Only call with the read lock held",
"Function to compute the bias gradient for batch convolution",
"Determine the relevant pieces of configuration which need to be included when processing the domain model.\n\n@param root the resource root\n@param requiredConfigurationHolder the resolution context\n@param serverConfig the server config\n@param extensionRegistry the extension registry",
"Set the locking values\n@param cld\n@param obj\n@param oldLockingValues",
"Searches for brackets which are only used to construct new matrices by concatenating\n1 or more matrices together",
"Adds a child to this node and sets this node as its parent node.\n\n@param node The node to add."
] |
public List<WbSearchEntitiesResult> wbSearchEntities(String search, String language,
Boolean strictLanguage, String type, Long limit, Long offset)
throws MediaWikiApiErrorException {
Map<String, String> parameters = new HashMap<String, String>();
parameters.put(ApiConnection.PARAM_ACTION, "wbsearchentities");
if (search != null) {
parameters.put("search", search);
} else {
throw new IllegalArgumentException(
"Search parameter must be specified for this action.");
}
if (language != null) {
parameters.put("language", language);
} else {
throw new IllegalArgumentException(
"Language parameter must be specified for this action.");
}
if (strictLanguage != null) {
parameters.put("strictlanguage", Boolean.toString(strictLanguage));
}
if (type != null) {
parameters.put("type", type);
}
if (limit != null) {
parameters.put("limit", Long.toString(limit));
}
if (offset != null) {
parameters.put("continue", Long.toString(offset));
}
List<WbSearchEntitiesResult> results = new ArrayList<>();
try {
JsonNode root = this.connection.sendJsonRequest("POST", parameters);
JsonNode entities = root.path("search");
for (JsonNode entityNode : entities) {
try {
JacksonWbSearchEntitiesResult ed = mapper.treeToValue(entityNode,
JacksonWbSearchEntitiesResult.class);
results.add(ed);
} catch (JsonProcessingException e) {
LOGGER.error("Error when reading JSON for entity "
+ entityNode.path("id").asText("UNKNOWN") + ": "
+ e.toString());
}
}
} catch (IOException e) {
LOGGER.error("Could not retrive data: " + e.toString());
}
return results;
} | [
"Executes the API action \"wbsearchentity\" for the given parameters.\nSearches for entities using labels and aliases. Returns a label and\ndescription for the entity in the user language if possible. Returns\ndetails of the matched term. The matched term text is also present in the\naliases key if different from the display label.\n\n<p>\nSee the <a href=\n\"https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentity\"\n>online API documentation</a> for further information.\n<p>\n\n@param search\n(required) search for this text\n@param language\n(required) search in this language\n@param strictLanguage\n(optional) whether to disable language fallback\n@param type\n(optional) search for this type of entity\nOne of the following values: item, property\nDefault: item\n@param limit\n(optional) maximal number of results\nno more than 50 (500 for bots) allowed\nDefault: 7\n@param offset\n(optional) offset where to continue a search\nDefault: 0\nthis parameter is called \"continue\" in the API (which is a Java keyword)\n\n@return list of matching entities retrieved via the API URL\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IllegalArgumentException\nif the given combination of parameters does not make sense"
] | [
"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.",
"Reads a nested table. Uses the supplied reader class instance.\n\n@param readerClass reader class instance\n@return table rows",
"Use this API to fetch statistics of nsacl6_stats resource of given name .",
"Log original response\n\n@param httpServletResponse\n@param history\n@throws URIException",
"Reads entries from transforms.xml.\n\n@param file the XML file\n@return the transform entries read from the file\n\n@throws Exception if something goes wrong",
"Helper method to send message on outputStream and account for network\ntime stats.\n\n@param outputStream\n@param message\n@throws IOException",
"Returns the default shared instance of the CleverTap SDK.\n\n@param context The Android context\n@return The {@link CleverTapAPI} object",
"A convenience method for creating an immutable sorted map.\n\n@param self a SortedMap\n@return an immutable SortedMap\n@see java.util.Collections#unmodifiableSortedMap(java.util.SortedMap)\n@since 1.0",
"Whether the given grid dialect implements the specified facet or not.\n\n@param gridDialect the dialect of interest\n@param facetType the dialect facet type of interest\n@return {@code true} in case the given dialect implements the specified facet, {@code false} otherwise"
] |
Subsets and Splits