query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public static PacketType validateHeader(DatagramPacket packet, int port) {
byte[] data = packet.getData();
if (data.length < PACKET_TYPE_OFFSET) {
logger.warn("Packet is too short to be a Pro DJ Link packet; must be at least " + PACKET_TYPE_OFFSET +
" bytes long, was only " + data.length + ".");
return null;
}
if (!getMagicHeader().equals(ByteBuffer.wrap(data, 0, MAGIC_HEADER.length))) {
logger.warn("Packet did not have correct nine-byte header for the Pro DJ Link protocol.");
return null;
}
final Map<Byte, PacketType> portMap = PACKET_TYPE_MAP.get(port);
if (portMap == null) {
logger.warn("Do not know any Pro DJ Link packets that are received on port " + port + ".");
return null;
}
final PacketType result = portMap.get(data[PACKET_TYPE_OFFSET]);
if (result == null) {
logger.warn("Do not know any Pro DJ Link packets received on port " + port + " with type " +
String.format("0x%02x", data[PACKET_TYPE_OFFSET]) + ".");
}
return result;
} | [
"Check to see whether a packet starts with the standard header bytes, followed by a known byte identifying it.\nIf so, return the kind of packet that has been recognized.\n\n@param packet a packet that has just been received\n@param port the port on which the packet has been received\n\n@return the type of packet that was recognized, or {@code null} if the packet was not recognized"
] | [
"Handles the response of the getVersion request.\n@param incomingMessage the response message to process.",
"Creates a new resource.\n@param cmsObject The CmsObject of the current request context.\n@param newLink A string, specifying where which new content should be created.\n@param locale The locale for which the\n@param sitePath site path of the currently edited content.\n@param modelFileName not used.\n@param mode optional creation mode\n@param postCreateHandler optional class name of an {@link I_CmsCollectorPostCreateHandler} which is invoked after the content has been created.\nThe fully qualified class name can be followed by a \"|\" symbol and a handler specific configuration string.\n@return The site-path of the newly created resource.",
"This method is used to initiate a release staging process using the Artifactory Release Staging API.",
"Modify the meta-data for a photoset.\n\n@param photosetId\nThe photoset ID\n@param title\nA new title\n@param description\nA new description (can be null)\n@throws FlickrException",
"Empirical data from 3.x, actual =40",
"Converts the string representation of the days bit field into an integer.\n\n@param days string bit field\n@return integer bit field",
"Initializes OJB for the purposes of this task.\n\n@return The metadata manager used by OJB",
"Creates a method signature.\n\n@param method Method instance\n@return method signature",
"Start the timer."
] |
public static authenticationvserver_authenticationtacacspolicy_binding[] get(nitro_service service, String name) throws Exception{
authenticationvserver_authenticationtacacspolicy_binding obj = new authenticationvserver_authenticationtacacspolicy_binding();
obj.set_name(name);
authenticationvserver_authenticationtacacspolicy_binding response[] = (authenticationvserver_authenticationtacacspolicy_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch authenticationvserver_authenticationtacacspolicy_binding resources of given name ."
] | [
"Set the list of supported resolutions. Each resolution is specified in map units per pixel.\n\n@param resolutions\nresolutions\n@deprecated use {@link #setZoomLevels()}",
"Swaps two specified partitions.\n\nPair-wase partition swapping may be more prone to local minima than\nlarger perturbations. Could consider \"swapping\" a list of\n<nodeId/partitionId>. This would allow a few nodes to be identified\n(random # btw 2-5?) and then \"swapped\" (shuffled? rotated?).\n\n@return modified cluster metadata.",
"Extracts the rank of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The rank of the decomposed matrix.",
"Rollback an app to a specific release.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param releaseUuid Release UUID. See {@link #listReleases} for a list of the app's releases.\n@return the release object",
"This is the probability density function for the Gaussian\ndistribution.",
"Get the features collection from a GeoJson URL.\n\n@param template the template\n@param geoJsonUrl what to parse\n@return the feature collection",
"When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command returns all the elements in the sorted set with a value in the given range.\nIf the elements in the sorted set have different scores, the returned elements are unspecified.\n@param lexRange\n@return the range of elements",
"Generates a schedule based on some meta data. The schedule generation\nconsiders short periods. Date rolling is ignored.\n\n@param referenceDate The date which is used in the schedule to internally convert dates to doubles, i.e., the date where t=0.\n@param startDate The start date of the first period.\n@param frequency The frequency.\n@param maturity The end date of the last period.\n@param daycountConvention The daycount convention.\n@param shortPeriodConvention If short period exists, have it first or last.\n@return The corresponding schedule\n@deprecated Will be removed in version 2.3",
"Determines if the key replicates to the given node\n\n@param key\n@param nodeId\n@return true if the key belongs to the node as some replica"
] |
public static cmppolicylabel[] get(nitro_service service) throws Exception{
cmppolicylabel obj = new cmppolicylabel();
cmppolicylabel[] response = (cmppolicylabel[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the cmppolicylabel resources that are configured on netscaler."
] | [
"Runs the shell script for committing and optionally pushing the changes in the module.\n@return exit code of the script.",
"flush all messages to disk\n\n@param force flush anyway(ignore flush interval)",
"Add an element assigned with its score\n@param member the member to add\n@param score the score to assign\n@return <code>true</code> if the set has been changed",
"Reads a color value represented by three bytes, for R, G, and B\ncomponents, plus a flag byte indicating if this is an automatic color.\nReturns null if the color type is \"Automatic\".\n\n@param data byte array of data\n@param offset offset into array\n@return new Color instance",
"Marks inbox message as read for given messageId\n@param messageId String messageId\n@return boolean value depending on success of operation",
"Creates PollingState from the json string.\n\n@param serializedPollingState polling state as json string\n@param <ResultT> the result that the poll operation produces\n@return the polling state",
"Use this API to fetch statistics of spilloverpolicy_stats resource of given name .",
"Replace HTML entities\n@param content Content\n@param map Map\n@return Replaced content",
"Use this API to unlink sslcertkey resources."
] |
@Override
public Token recoverInline(Parser recognizer) throws RecognitionException
{
// SINGLE TOKEN DELETION
Token matchedSymbol = singleTokenDeletion(recognizer);
if (matchedSymbol != null)
{
// we have deleted the extra token.
// now, move past ttype token as if all were ok
recognizer.consume();
return matchedSymbol;
}
// SINGLE TOKEN INSERTION
if (singleTokenInsertion(recognizer))
{
return getMissingSymbol(recognizer);
}
// BeetlException exception = new BeetlParserException(BeetlException.PARSER_MISS_ERROR);
// exception.pushToken(this.getGrammarToken(recognizer.getCurrentToken()));
// throw exception;
throw new InputMismatchException(recognizer);
} | [
"Make sure we don't attempt to recover inline; if the parser\nsuccessfully recovers, it won't throw an exception."
] | [
"Returns the simplified name of the type of the specified object.",
"Returns the default safety level preference for the user.\n\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_MODERATE\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_RESTRICTED\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_SAFE\n@return The current users safety-level\n@throws FlickrException",
"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.",
"If credentials are incorrect or not provided for Basic Auth, then Android\nmay throw this exception when an HTTP 401 is received. A separate exception\nis thrown for proxy authentication errors. Checking for this response and\nreturning the proper status.\n@param ex the exception raised from Android\n@return HTTP Status Code",
"Release the connection back to the pool.\n\n@throws SQLException Never really thrown",
"Create a counter if one is not defined already, otherwise return the existing one.\n\n@param counterName unique name for the counter\n@param initialValue initial value for the counter\n@return a {@link StrongCounter}",
"Reads timephased assignment data.\n\n@param calendar current calendar\n@param assignment assignment data\n@param type flag indicating if this is planned or complete work\n@return list of timephased resource assignment instances",
"Returns the single abstract method of a class node, if it is a SAM type, or null otherwise.\n@param type a type for which to search for a single abstract method\n@return the method node if type is a SAM type, null otherwise",
"checking availability of ClassInfo.setFlags method is just workaround for JANDEX-37"
] |
private <T> Observable<PollingState<T>> updateStateFromLocationHeaderOnPutAsync(final PollingState<T> pollingState) {
return pollAsync(pollingState.locationHeaderLink(), pollingState.loggingContext())
.flatMap(new Func1<Response<ResponseBody>, Observable<PollingState<T>>>() {
@Override
public Observable<PollingState<T>> call(Response<ResponseBody> response) {
int statusCode = response.code();
if (statusCode == 202) {
pollingState.withResponse(response);
pollingState.withStatus(AzureAsyncOperation.IN_PROGRESS_STATUS, statusCode);
} else if (statusCode == 200 || statusCode == 201) {
try {
pollingState.updateFromResponseOnPutPatch(response);
} catch (CloudException | IOException e) {
return Observable.error(e);
}
}
return Observable.just(pollingState);
}
});
} | [
"Polls from the location header and updates the polling state with the\npolling response for a PUT operation.\n\n@param pollingState the polling state for the current operation.\n@param <T> the return type of the caller."
] | [
"Sets the publish queue shutdown time.\n\n@param publishQueueShutdowntime the shutdown time to set, parsed as <code>int</code>",
"Stops the server. This method does nothing if the server is stopped already.",
"Processes the template for all class definitions.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Method to close the file caseManager. It is called just one time, by the\nMASReader, once every test and stroy have been added.\n\n@param caseManager",
"This private method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions. It assumes\nthat the caller has already calculated the day of the week on which\nthe given day falls.\n\n@param date Date to be tested\n@param day Day of the week for the date under test\n@return boolean flag",
"Returns a UTMDetail object which consists of UTM parameters like source, medium & campaign\n@return The {@link UTMDetail} object",
"Issue the database statements to drop the table associated with a table configuration.\n\n<p>\n<b>WARNING:</b> This is [obviously] very destructive and is unrecoverable.\n</p>\n\n@param connectionSource\nAssociated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@param ignoreErrors\nIf set to true then try each statement regardless of {@link SQLException} thrown previously.\n@return The number of statements executed to do so.",
"Stops the playback of a sound and destroys the corresponding Sound Object or Soundfield.",
"Throw IllegalArgumentException if the value is null.\n\n@param name the parameter name.\n@param value the value that should not be null.\n@param <T> the value type.\n@throws IllegalArgumentException if value is null."
] |
public BeanDefinitionInfo toDto(BeanDefinition beanDefinition) {
if (beanDefinition instanceof GenericBeanDefinition) {
GenericBeanDefinitionInfo info = new GenericBeanDefinitionInfo();
info.setClassName(beanDefinition.getBeanClassName());
if (beanDefinition.getPropertyValues() != null) {
Map<String, BeanMetadataElementInfo> propertyValues = new HashMap<String, BeanMetadataElementInfo>();
for (PropertyValue value : beanDefinition.getPropertyValues().getPropertyValueList()) {
Object obj = value.getValue();
if (obj instanceof BeanMetadataElement) {
propertyValues.put(value.getName(), toDto((BeanMetadataElement) obj));
} else {
throw new IllegalArgumentException("Type " + obj.getClass().getName()
+ " is not a BeanMetadataElement for property: " + value.getName());
}
}
info.setPropertyValues(propertyValues);
}
return info;
} else {
throw new IllegalArgumentException("Conversion to DTO of " + beanDefinition.getClass().getName()
+ " not implemented");
}
} | [
"Convert from an internal Spring bean definition to a DTO.\n\n@param beanDefinition The internal Spring bean definition.\n@return Returns a DTO representation."
] | [
"Adds a class to the unit.",
"Rebuild logging systems with updated mode\n@param newMode log mode",
"Factory method that returns an Identity object created from a serializated representation.\n\n@param anArray The serialized representation\n@return The identity\n@see {@link #serialize}.\n@deprecated",
"Filters a dot at the end of the passed package name if present.\n\n@param pkgName\na package name\n@return a filtered package name",
"This method is called to format a duration.\n\n@param value duration value\n@return formatted duration value",
"Creates a new resource.\n@param cmsObject The CmsObject of the current request context.\n@param newLink A string, specifying where which new content should be created.\n@param locale The locale for which the\n@param sitePath site path of the currently edited content.\n@param modelFileName not used.\n@param mode optional creation mode\n@param postCreateHandler optional class name of an {@link I_CmsCollectorPostCreateHandler} which is invoked after the content has been created.\nThe fully qualified class name can be followed by a \"|\" symbol and a handler specific configuration string.\n@return The site-path of the newly created resource.",
"Print the String features generated from a IN",
"Adds a clause that checks whether ANY set bits in a bitmask are present\nin a numeric expression.\n\n@param expr\nSQL numeric expression to check.\n@param bits\nInteger containing the bits for which to check.",
"Main method of RendererAdapter. This method has the responsibility of update the\nRendererBuilder values and create or recycle a new Renderer. Once the renderer has been\nobtained the RendereBuilder will call the render method in the renderer and will return the\nRenderer root view to the ListView.\n\nIf rRendererBuilder returns a null Renderer this method will throw a\nNullRendererBuiltException.\n\n@param position to render.\n@param convertView to use to recycle.\n@param parent used to inflate views.\n@return view rendered."
] |
public void processReference(String template, Properties attributes) throws XDocletException
{
String name = OjbMemberTagsHandler.getMemberName();
XClass type = OjbMemberTagsHandler.getMemberType();
int dim = OjbMemberTagsHandler.getMemberDimension();
ReferenceDescriptorDef refDef = _curClassDef.getReference(name);
String attrName;
if (refDef == null)
{
refDef = new ReferenceDescriptorDef(name);
_curClassDef.addReference(refDef);
}
LogHelper.debug(false, OjbTagsHandler.class, "processReference", " Processing reference "+refDef.getName());
for (Enumeration attrNames = attributes.propertyNames(); attrNames.hasMoreElements(); )
{
attrName = (String)attrNames.nextElement();
refDef.setProperty(attrName, attributes.getProperty(attrName));
}
// storing default info for later use
if (type == null)
{
throw new XDocletException(Translator.getString(XDocletModulesOjbMessages.class,
XDocletModulesOjbMessages.COULD_NOT_DETERMINE_TYPE_OF_MEMBER,
new String[]{name}));
}
if (dim > 0)
{
throw new XDocletException(Translator.getString(XDocletModulesOjbMessages.class,
XDocletModulesOjbMessages.MEMBER_CANNOT_BE_A_REFERENCE,
new String[]{name, _curClassDef.getName()}));
}
refDef.setProperty(PropertyHelper.OJB_PROPERTY_VARIABLE_TYPE, type.getQualifiedName());
// searching for default type
String typeName = searchForPersistentSubType(type);
if (typeName != null)
{
refDef.setProperty(PropertyHelper.OJB_PROPERTY_DEFAULT_CLASS_REF, typeName);
}
_curReferenceDef = refDef;
generate(template);
_curReferenceDef = null;
} | [
"Sets the current reference 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 reference as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"auto-delete\" optional=\"true\" description=\"Whether to automatically delete the\nreferenced object on object deletion\"\[email protected] name=\"auto-retrieve\" optional=\"true\" description=\"Whether to automatically retrieve\nthe referenced object\"\[email protected] name=\"auto-update\" optional=\"true\" description=\"Whether to automatically update the\nreferenced object\"\[email protected] name=\"class-ref\" optional=\"true\" description=\"The fully qualified name of the class\nowning the referenced field\"\[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 reference\"\[email protected] name=\"foreignkey\" optional=\"true\" description=\"The fields in the current type used for\nimplementing the reference\"\[email protected] name=\"otm-dependent\" optional=\"true\" description=\"Whether the reference is dependent on otm\"\[email protected] name=\"proxy\" optional=\"true\" description=\"Whether to use a proxy for the reference\"\[email protected] name=\"proxy-prefetching-limit\" optional=\"true\" description=\"Specifies the amount of objects to prefetch\"\[email protected] name=\"refresh\" optional=\"true\" description=\"Whether to automatically refresh the\nreference\"\[email protected] name=\"remote-foreignkey\" optional=\"true\" description=\"The fields in the referenced type\ncorresponding to the local fields (is only used for the table definition)\""
] | [
"This method extracts calendar data from a GanttProject file.\n\n@param ganttProject Root node of the GanttProject file",
"Checks if the dependency server is available\n\n@return true if the server is reachable, false otherwise",
"Use this API to fetch all the aaaparameter resources that are configured on netscaler.",
"Remember the order of execution",
"Indicates if a bean is proxyable\n\n@param bean The bean to test\n@return True if proxyable, false otherwise",
"Sets an error message that will be displayed in a popup when the EditText has focus along\nwith an icon displayed at the right-hand side.\n\n@param error error message to show",
"Handle the serialization of String, Integer and boolean parameters.\n\n@param param to serialize\n@return Object",
"Return the current working directory\n\n@return the current working directory",
"Removes double-quotes from around a string\n@param str\n@return"
] |
public int[] next()
{
boolean hasNewPerm = false;
escape:while( level >= 0) {
// boolean foundZero = false;
for( int i = iter[level]; i < data.length; i = iter[level] ) {
iter[level]++;
if( data[i] == -1 ) {
level++;
data[i] = level-1;
if( level >= data.length ) {
// a new permutation has been created return the results.
hasNewPerm = true;
System.arraycopy(data,0,ret,0,ret.length);
level = level-1;
data[i] = -1;
break escape;
} else {
valk[level] = i;
}
}
}
data[valk[level]] = -1;
iter[level] = 0;
level = level-1;
}
if( hasNewPerm )
return ret;
return null;
} | [
"Creates the next permutation in the sequence.\n\n@return An array containing the permutation. The returned array is modified each time this function is called."
] | [
"Creates an upper triangular matrix whose values are selected from a uniform distribution. If hessenberg\nis greater than zero then a hessenberg matrix of the specified degree is created instead.\n\n@param dimen Number of rows and columns in the matrix..\n@param hessenberg 0 for triangular matrix and > 0 for hessenberg matrix.\n@param min minimum value an element can be.\n@param max maximum value an element can be.\n@param rand random number generator used.\n@return The randomly generated matrix.",
"Populates a resource.\n\n@param resource resource instance\n@param record MPX record\n@throws MPXJException",
"Retrieves list of inbox messages based on given userId\n@param userId String userid\n@return ArrayList of {@link CTMessageDAO}",
"Adopts an xml dom element to the owner document of this element if necessary.\n\n@param elementToAdopt the element to adopt",
"Process a file.\n\n@param file the file to be processed\n@param mode the patching mode\n@throws IOException",
"Record the resource request queue length\n\n@param dest Destination of the socket for which resource request is\nenqueued. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param queueLength The number of entries in the \"asynchronous\" resource\nrequest queue.",
"Returns the y-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the y coordinate",
"Saves a screenshot of every new state.",
"Entry point for the example.\n\n@param args Command-line arguments for the example. To use samplemachine.xml from resources, send\nno arguments. To use other file, send a filename without xml extension)."
] |
public List<FailedEventInvocation> getFailedInvocations() {
synchronized (this.mutex) {
if (this.failedEvents == null) {
return Collections.emptyList();
}
return Collections.unmodifiableList(this.failedEvents);
}
} | [
"Gets the list of failed invocations that has been collected by this collector.\n\n@return The failed invocations."
] | [
"Starts all streams.",
"This method log given exception in specified listener",
"Use this API to export appfwlearningdata resources.",
"Constructs credentials for the given account and key file.\n\n@param serviceAccountId service account ID (typically an e-mail address).\n@param privateKeyFile the file name from which to get the private key.\n@param serviceAccountScopes Collection of OAuth scopes to use with the the service\naccount flow or {@code null} if not.\n@return valid credentials or {@code null}",
"Use this API to update autoscaleaction.",
"ten less than Cube Q",
"Answer a List of InCriteria based on values, each InCriteria\ncontains only inLimit values\n@param attribute\n@param values\n@param negative\n@param inLimit the maximum number of values for IN (-1 for no limit)\n@return List of InCriteria",
"Assigns a retention policy to all items with a given metadata template, optionally matching on fields.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param templateID the ID of the metadata template to assign the policy to.\n@param filter optional fields to match against in the metadata template.\n@return info about the created assignment.",
"Create a structured Record instance from the flat text data.\nNull is returned if errors are encountered during parse.\n\n@param text flat text data\n@return Record instance"
] |
public void setTextureBufferSize(final int size) {
mRootViewGroup.post(new Runnable() {
@Override
public void run() {
mRootViewGroup.setTextureBufferSize(size);
}
});
} | [
"Set the default size of the texture buffers. You can call this to reduce the buffer size\nof views with anti-aliasing issue.\n\nThe max value to the buffer size should be the Math.max(width, height) of attached view.\n\n@param size buffer size. Value > 0 and <= Math.max(width, height)."
] | [
"Port forward missing module changes for each layer.\n\n@param patch the current patch\n@param context the patch context\n@throws PatchingException\n@throws IOException\n@throws XMLStreamException",
"Returns a representation of the date from the value attributes as ISO\n8601 encoding.\n\n@param value\n@return ISO 8601 value (String)",
"Resets the calendar",
"Throw fault.\n\n@param code the fault code\n@param message the message\n@param t the throwable type\n@throws PutEventsFault",
"Look up record by identity.",
"Retrieve all Collection attributes of a given instance, and make all of the Proxy Collections\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true, loading is forced even if cld differs",
"Delete a server group by id\n\n@param id server group ID",
"Returns a RowColumn following the current one\n\n@return RowColumn following this one",
"Initialize the style generators for the messages table."
] |
@Override
public String toNormalizedWildcardString() {
String result;
if(hasNoStringCache() || (result = stringCache.normalizedWildcardString) == null) {
if(hasZone()) {
stringCache.normalizedWildcardString = result = toNormalizedString(IPv6StringCache.wildcardNormalizedParams);
} else {
result = getSection().toNormalizedWildcardString();//the cache is shared so no need to update it here
}
}
return result;
} | [
"note this string is used by hashCode"
] | [
"Creates a future that will send a request to the reporting host and call\nthe handler with the response\n\n@param path the path at the reporting host which the request will be made\n@param reportingHandler the handler to receive the response once executed\nand recieved\n@return a {@link java.util.concurrent.Future} for handing the request",
"Set HTTP client\n\n@param httpClient\nAn instance of OkHttpClient\n@return Api Client",
"Registers an image to the images cache, so that it can be captured by the build-info proxy.\n\n@param imageId\n@param imageTag\n@param targetRepo\n@param buildInfoId\n@throws IOException",
"Start the timer.",
"Readable yyyyMMdd representation of a day, which is also sortable.",
"Detach a scope from its parent, this will trigger the garbage collection of this scope and it's\nsub-scopes\nif they are not referenced outside of Toothpick.\n\n@param name the name of the scope to close.",
"Use this API to fetch all the sslpolicylabel resources that are configured on netscaler.",
"Load the layers based on the default setup.\n\n@param jbossHome the jboss home directory\n@param productConfig the product config\n@param repoRoots the repository roots\n@return the available layers\n@throws IOException",
"Saves a matrix to disk using Java binary serialization.\n\n@param A The matrix being saved.\n@param fileName Name of the file its being saved at.\n@throws java.io.IOException"
] |
public double[] eigenToSampleSpace( double[] eigenData ) {
if( eigenData.length != numComponents )
throw new IllegalArgumentException("Unexpected sample length");
DMatrixRMaj s = new DMatrixRMaj(A.getNumCols(),1);
DMatrixRMaj r = DMatrixRMaj.wrap(numComponents,1,eigenData);
CommonOps_DDRM.multTransA(V_t,r,s);
DMatrixRMaj mean = DMatrixRMaj.wrap(A.getNumCols(),1,this.mean);
CommonOps_DDRM.add(s,mean,s);
return s.data;
} | [
"Converts a vector from eigen space into sample space.\n\n@param eigenData Eigen space data.\n@return Sample space projection."
] | [
"Retrieve the correct calendar for a resource.\n\n@param calendarID calendar ID\n@return calendar for resource",
"Use this API to fetch all the nslimitselector resources that are configured on netscaler.",
"Use this API to fetch all the nsconfig resources that are configured on netscaler.",
"Use this API to delete clusterinstance resources.",
"Wrap CallableStatement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a Callablestatement.",
"Use this API to fetch transformpolicylabel resource of given name .",
"Set the dates for the specified photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo ID\n@param datePosted\nThe date the photo was posted or null\n@param dateTaken\nThe date the photo was taken or null\n@param dateTakenGranularity\nThe granularity of the taken date or null\n@throws FlickrException",
"Replace the current with a new generated identity object and\nreturns the old one.",
"Converts an absolute rectangle to a relative one wrt to the current coordinate system.\n\n@param rect absolute rectangle\n@return relative rectangle"
] |
private void updateCurrencyFormats(ProjectProperties properties, char decimalSeparator, char thousandsSeparator)
{
String prefix = "";
String suffix = "";
String currencySymbol = quoteFormatCharacters(properties.getCurrencySymbol());
switch (properties.getSymbolPosition())
{
case AFTER:
{
suffix = currencySymbol;
break;
}
case BEFORE:
{
prefix = currencySymbol;
break;
}
case AFTER_WITH_SPACE:
{
suffix = " " + currencySymbol;
break;
}
case BEFORE_WITH_SPACE:
{
prefix = currencySymbol + " ";
break;
}
}
StringBuilder pattern = new StringBuilder(prefix);
pattern.append("#0");
int digits = properties.getCurrencyDigits().intValue();
if (digits > 0)
{
pattern.append('.');
for (int i = 0; i < digits; i++)
{
pattern.append("0");
}
}
pattern.append(suffix);
String primaryPattern = pattern.toString();
String[] alternativePatterns = new String[7];
alternativePatterns[0] = primaryPattern + ";(" + primaryPattern + ")";
pattern.insert(prefix.length(), "#,#");
String secondaryPattern = pattern.toString();
alternativePatterns[1] = secondaryPattern;
alternativePatterns[2] = secondaryPattern + ";(" + secondaryPattern + ")";
pattern.setLength(0);
pattern.append("#0");
if (digits > 0)
{
pattern.append('.');
for (int i = 0; i < digits; i++)
{
pattern.append("0");
}
}
String noSymbolPrimaryPattern = pattern.toString();
alternativePatterns[3] = noSymbolPrimaryPattern;
alternativePatterns[4] = noSymbolPrimaryPattern + ";(" + noSymbolPrimaryPattern + ")";
pattern.insert(0, "#,#");
String noSymbolSecondaryPattern = pattern.toString();
alternativePatterns[5] = noSymbolSecondaryPattern;
alternativePatterns[6] = noSymbolSecondaryPattern + ";(" + noSymbolSecondaryPattern + ")";
m_currencyFormat.applyPattern(primaryPattern, alternativePatterns, decimalSeparator, thousandsSeparator);
} | [
"Update the currency format.\n\n@param properties project properties\n@param decimalSeparator decimal separator\n@param thousandsSeparator thousands separator"
] | [
"This method generates a list of lists. Each list represents the data\nfor an embedded object, and contains set set of RTFEmbeddedObject instances\nthat make up the embedded object. This method will return null\nif there are no embedded objects in the RTF document.\n\n@param text RTF document\n@return list of lists of RTFEmbeddedObject instances",
"note this string is used by hashCode",
"If the Artifact does not exist, it will add it to the database. Nothing if it already exit.\n\n@param fromClient DbArtifact",
"Compare the controlDOM and testDOM and save and return the differences in a list.\n\n@return list with differences",
"Creates custom Http Client connection pool to be used by Http Client\n\n@return {@link PoolingHttpClientConnectionManager}",
"Position the child inside the layout based on the offset and axis-s factors\n@param dataIndex data index",
"Use this API to fetch vpnvserver_appcontroller_binding resources of given name .",
"Unilaterally merge an update description into this update description.\n@param otherDescription the update description to merge into this\n@return this merged update description",
"Checks the preconditions for creating a new LMinMax processor.\n\n@param min\nthe minimum value (inclusive)\n@param max\nthe maximum value (inclusive)\n@throws IllegalArgumentException\nif {@code max < min}"
] |
public static <E> Set<E> diff(Set<E> s1, Set<E> s2) {
Set<E> s = new HashSet<E>();
for (E o : s1) {
if (!s2.contains(o)) {
s.add(o);
}
}
return s;
} | [
"Returns the difference of sets s1 and s2."
] | [
"Determine if the exception is relative based on the recurrence type integer value.\n\n@param value integer value\n@return true if the recurrence is relative",
"Un-serialize a Json into Organization\n@param organization String\n@return Organization\n@throws IOException",
"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.",
"Used to populate Map with given annotations\n\n@param annotations initial value for annotations",
"Curries a procedure that takes three 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 two arguments. Never <code>null</code>.",
"Returns whether this address section represents a subnet block of addresses associated its prefix length.\n\nReturns false if it has no prefix length, if it is a single address with a prefix length (ie not a subnet), or if it is a range of addresses that does not include\nthe entire subnet block for its prefix length.\n\nIf {@link AddressNetwork#getPrefixConfiguration} is set to consider all prefixes as subnets, this returns true for any grouping with prefix length.\n\n@return",
"Answer the orderBy of all Criteria and Sub Criteria\nthe elements are of class Criteria.FieldHelper\n@return List",
"Changes the index buffer associated with this mesh.\n@param ibuf new index buffer to use\n@see #setIndices(int[])\n@see #getIndexBuffer()\n@see #getIntIndices()",
"Main entry point used to determine the format used to write\ncalendar exceptions.\n\n@param calendar parent calendar\n@param dayList list of calendar days\n@param exceptions list of exceptions"
] |
@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."
] | [
"Changes to a new sub-view and stores a report to be displayed by that subview.<p<\n\n@param newState the new state\n@param thread the report thread which should be displayed in the sub view\n@param label the label to display for the report",
"This method is used to change the credentials of CleverTap account Id, token and region programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token\n@param region Clever Tap Account Region",
"Deletes this collaboration.",
"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.",
"Compute 1-dimensional Perlin noise.\n@param x the x value\n@return noise value at x in the range -1..1",
"Edit the text of a comment as the currently authenticated user.\n\nThis method requires authentication with 'write' permission.\n\n@param commentId\nThe id of the comment to edit.\n@param commentText\nUpdate the comment to this text.\n@throws FlickrException",
"Parse rate.\n\n@param value rate value\n@return Rate instance",
"Distributed process finish.\n\n@param rb the rb\n@param mtasFields the mtas fields\n@throws IOException Signals that an I/O exception has occurred.",
"Set the TableAlias for aPath\n@param aPath\n@param hintClasses\n@param TableAlias"
] |
public Stats getPhotosetStats(String photosetId, Date date) throws FlickrException {
return getStats(METHOD_GET_PHOTOSET_STATS, "photoset_id", photosetId, date);
} | [
"Get the number of views, comments and favorites on a photoset for a given date.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param photosetId\n(Required) The id of the photoset to get stats for.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotosetStats.htm\""
] | [
"Generate a currency format.\n\n@param position currency symbol position\n@return currency format",
"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.",
"Use this API to fetch all the dospolicy resources that are configured on netscaler.",
"If directory doesn't exists try to create it.\n\n@param directory given directory to check\n@throws ReportGenerationException if can't create specified directory",
"Use this API to delete dnstxtrec resources.",
"Read task baseline values.\n\n@param row result set row",
"submit the adminClient after usage is completed.\nBehavior is undefined, if checkin is called with objects not retrieved\nfrom checkout.\n\n@param client AdminClient retrieved from checkout",
"Sets the texture this render target will render to.\nIf no texture is provided, the render target will\nnot render anything.\n@param texture GVRRenderTexture to render to.",
"Runs the example program.\n\n@param args\n@throws IOException\nif there was a problem in writing the output file"
] |
public static <T> Set<T> asImmutable(Set<? extends T> self) {
return Collections.unmodifiableSet(self);
} | [
"A convenience method for creating an immutable list.\n\n@param self a Set\n@return an immutable Set\n@see java.util.Collections#unmodifiableSet(java.util.Set)\n@since 1.0"
] | [
"Propagate onNoPick events to listeners\n@param picker GVRPicker which generated the event",
"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",
"This method is called by the ++ operator for the class CharSequence.\nIt increments the last character in the given CharSequence. If the last\ncharacter in the CharSequence is Character.MAX_VALUE a Character.MIN_VALUE\nwill be appended. The empty CharSequence is incremented to a string\nconsisting of the character Character.MIN_VALUE.\n\n@param self a CharSequence\n@return a value obtained by incrementing the toString() of the CharSequence\n@since 1.8.2",
"Checks whether the compilation has been canceled and reports the given progress to the compiler progress.",
"Calculates the middle point between two points and multiplies its coordinates with the given\nsmoothness _Mulitplier.\n@param _P1 First point\n@param _P2 Second point\n@param _Result Resulting point\n@param _Multiplier Smoothness multiplier",
"Add a calendar node.\n\n@param parentNode parent node\n@param calendar calendar",
"Add a column to be set to a value for UPDATE statements. This will generate something like columnName = 'value'\nwith the value escaped if necessary.",
"Gathers all parameters' annotations for the given method, starting from the third parameter.",
"Remove a connection from all keys.\n\n@param connection\nthe connection"
] |
public void startServer() throws Exception {
if (!externalDatabaseHost) {
try {
this.port = Utils.getSystemPort(Constants.SYS_DB_PORT);
server = Server.createTcpServer("-tcpPort", String.valueOf(port), "-tcpAllowOthers").start();
} catch (SQLException e) {
if (e.toString().contains("java.net.UnknownHostException")) {
logger.error("Startup failure. Potential bug in OSX & Java7. Workaround: add name of local machine to '/etc/hosts.'");
logger.error("Example: 127.0.0.1 MacBook");
throw e;
}
}
}
} | [
"Only meant to be called once\n\n@throws Exception exception"
] | [
"Notify all WorkerListeners currently registered for the given WorkerEvent.\n@param event the WorkerEvent that occurred\n@param worker the Worker that the event occurred in\n@param queue the queue the Worker is processing\n@param job the Job related to the event (only supply for JOB_PROCESS, JOB_EXECUTE, JOB_SUCCESS, and\nJOB_FAILURE events)\n@param runner the materialized object that the Job specified (only supply for JOB_EXECUTE and\nJOB_SUCCESS events)\n@param result the result of the successful execution of the Job (only set for JOB_SUCCESS and if the Job was\na Callable that returned a value)\n@param t the Throwable that caused the event (only supply for JOB_FAILURE and ERROR events)",
"Returns the directory of the URL.\n\n@param urlString URL of the file.\n@return The directory string.\n@throws IllegalArgumentException if URL is malformed",
"returns true if a job was queued within a timeout",
"Extract resource provider from a resource ID string.\n@param id the resource ID string\n@return the resource group name",
"absolute for advancedJDBCSupport\n@param row",
"Checks length and compare order of field names with declared PK fields in metadata.",
"Notifies all listeners that the data is about to be loaded.",
"Returns the query string of a URL from a parameter list.\n\n@param params\nMap with parameters\n@return query string",
"Initialization method.\n\n@param t1\n@param t2"
] |
@Override
public Object getCurrentVersion(Serializable id, SharedSessionContractImplementor session) throws HibernateException {
if ( log.isTraceEnabled() ) {
log.trace( "Getting version: " + MessageHelper.infoString( this, id, getFactory() ) );
}
final Tuple resultset = getFreshTuple( EntityKeyBuilder.fromPersister( this, id, session ), session );
if ( resultset == null ) {
return null;
}
else {
return gridVersionType.nullSafeGet( resultset, getVersionColumnName(), session, null );
}
} | [
"Retrieve the version number"
] | [
"Extracts value from map if given value is null.\n@param value current value\n@param props properties to extract value from\n@param key property name to extract\n@return initial value or value extracted from map",
"Given a string which is either the name of a predefined tab configuration or a configuration string, returns\nthe corresponding tab configuration.\n\n@param configStr a configuration string or predefined configuration name\n\n@return the gallery tab configuration",
"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",
"Returns the index of a key in the set.\n\n@param key The key to search for.\n@return Returns the index of the key if it exists, else a negative integer.",
"Set whether the player holding the waveform is playing, which changes the indicator color to white from red.\nThis method can only be used in situations where the component is tied to a single player, and therefore has\na single playback position.\n\n@param playing if {@code true}, draw the position marker in white, otherwise red\n\n@see #setPlaybackState",
"Adds a metadata classification to the specified file.\n\n@param classificationType the metadata classification type.\n@return the metadata classification type added to the file.",
"Generate and return the list of statements to create a database table and any associated features.",
"Get the first controller of a specified type\n@param type controller type to search for\n@return controller found or null if no controllers of the given type",
"Finds the magnitude of the largest element in the row\n@param A Complex matrix\n@param row Row in A\n@param col0 First column in A to be copied\n@param col1 Last column in A + 1 to be copied\n@return magnitude of largest element"
] |
private static LblTree createTree(TreeWalker walker) {
Node parent = walker.getCurrentNode();
LblTree node = new LblTree(parent.getNodeName(), -1); // treeID = -1
for (Node n = walker.firstChild(); n != null; n = walker.nextSibling()) {
node.add(createTree(walker));
}
walker.setCurrentNode(parent);
return node;
} | [
"Recursively construct a LblTree from DOM tree\n\n@param walker tree walker for DOM tree traversal\n@return tree represented by DOM tree"
] | [
"Displays text which shows the valid command line parameters, and then exits.",
"Private used static method for creation of a RemoteWebDriver. Taking care of the default\nCapabilities and using the HttpCommandExecutor.\n\n@param hubUrl the url of the hub to use.\n@return the RemoteWebDriver instance.",
"Returns the list of people who have favorited a given photo.\n\nThis method does not require authentication.\n\n@param photoId\n@param perPage\n@param page\n@return List of {@link com.flickr4java.flickr.people.User}",
"Configures the log context.\n\n@param configFile the configuration file\n@param classLoader the class loader to use for the configuration\n@param logContext the log context to configure\n\n@return {@code true} if the log context was successfully configured, otherwise {@code false}\n\n@throws DeploymentUnitProcessingException if the configuration fails",
"Deserialize a directory of javascript design documents to a List of DesignDocument objects.\n\n@param directory the directory containing javascript files\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read",
"Starts all streams.",
"Validates this string is a valid address, and if not, throws an exception with a descriptive message indicating why it is not.\n@throws AddressStringException",
"Use this API to fetch server_service_binding resources of given name .",
"Runs the record linkage process."
] |
private void checkBindings(EnhancedAnnotation<T> annotatedAnnotation) {
Set<Annotation> bindings = annotatedAnnotation.getMetaAnnotations(Qualifier.class);
if (bindings.size() > 0) {
for (Annotation annotation : bindings) {
if (!annotation.annotationType().equals(Named.class)) {
throw MetadataLogger.LOG.qualifierOnStereotype(annotatedAnnotation);
}
}
}
} | [
"Validates the binding types"
] | [
"Extract data for a single resource assignment.\n\n@param task parent task\n@param row Synchro resource assignment",
"Curries a procedure that takes one argument.\n\n@param procedure\nthe original procedure. May not be <code>null</code>.\n@param argument\nthe fixed argument.\n@return a procedure that takes no arguments. Never <code>null</code>.",
"Returns the index of the first invalid character of the zone, or -1 if the zone is valid\n\n@param sequence\n@return",
"Use this API to fetch all the dnspolicylabel resources that are configured on netscaler.",
"Randomize the gradient.",
"Get an ObjectReferenceDescriptor by name BRJ\n@param name\n@return ObjectReferenceDescriptor or null",
"Use this API to add sslaction resources.",
"Creates a db handling object.\n\n@return The db handling object\n@throws BuildException If the handling is invalid",
"Returns a module\n\n@param moduleId String\n@return DbModule"
] |
void execute(ExecutableBuilder builder,
int timeout,
TimeUnit unit) throws
CommandLineException,
InterruptedException, ExecutionException, TimeoutException {
Future<Void> task = executorService.submit(() -> {
builder.build().execute();
return null;
});
try {
if (timeout <= 0) { //Synchronous
task.get();
} else { // Guarded execution
try {
task.get(timeout, unit);
} catch (TimeoutException ex) {
// First make the context unusable
CommandContext c = builder.getCommandContext();
if (c instanceof TimeoutCommandContext) {
((TimeoutCommandContext) c).timeout();
}
// Then cancel the task.
task.cancel(true);
throw ex;
}
}
} catch (InterruptedException ex) {
// Could have been interrupted by user (Ctrl-C)
Thread.currentThread().interrupt();
cancelTask(task, builder.getCommandContext(), null);
// Interrupt running operation.
CommandContext c = builder.getCommandContext();
if (c instanceof TimeoutCommandContext) {
((TimeoutCommandContext) c).interrupted();
}
throw ex;
}
} | [
"The CommandContext can be retrieved thatnks to the ExecutableBuilder."
] | [
"Find and return the appropriate setter method for field.\n\n@return Set method or null (or throws IllegalArgumentException) if none found.",
"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.",
"Retrieve the recurrence type.\n\n@param value integer value\n@return RecurrenceType instance",
"Calculates the legend bounds for a custom list of legends.",
"Use this API to delete sslcertkey resources of given names.",
"Creates a non-binary media type with the given type, subtype, and charSet\n@throws com.tngtech.jgiven.exception.JGivenWrongUsageException if any of the given arguments is {@code null}",
"Put the given value to the appropriate id in the stack, using the version\nof the current list node identified by that id.\n\n@param id\n@param element element to set\n@return element that was replaced by the new element\n@throws ObsoleteVersionException when an update fails",
"Returns true if the string matches the name of a function",
"Builds a instance of the class for a map containing the values, without specifying the handler for differences\n\n@param clazz The class to build instance\n@param values The values map\n@return The instance\n@throws InstantiationException Error instantiating\n@throws IllegalAccessException Access error\n@throws IntrospectionException Introspection error\n@throws IllegalArgumentException Argument invalid\n@throws InvocationTargetException Invalid target"
] |
private static Date getSentDate(MimeMessage msg, Date defaultVal) {
if (msg == null) {
return defaultVal;
}
try {
Date sentDate = msg.getSentDate();
if (sentDate == null) {
return defaultVal;
} else {
return sentDate;
}
} catch (MessagingException me) {
return new Date();
}
} | [
"Compute \"sent\" date\n\n@param msg Message to take sent date from. May be null to use default\n@param defaultVal Default if sent date is not present\n@return Sent date or now if no date could be found"
] | [
"Get a collection of methods declared on this object by method name and parameter count.\n\n@param name the name of the method\n@param paramCount the number of parameters\n@return the (possibly empty) collection of methods with the given name and parameter count",
"Use this API to update nd6ravariables.",
"Set the order in which sets are returned for the user.\n\nThis method requires authentication with 'write' permission.\n\n@param photosetIds\nAn array of Ids\n@throws FlickrException",
"The entity instance is already in the session cache\n\nCopied from Loader#instanceAlreadyLoaded",
"Loads the columns for this table into the alChildren list.",
"As already described, but if separator is not null, then objects\nsuch as TaggedWord\n\n@param separator The string used to separate Word and Tag\nin TaggedWord, etc",
"Retrieve the value of a field using its alias.\n\n@param alias field alias\n@return field value",
"Maps an integer field ID to a field type.\n\n@param field field ID\n@return field type",
"Disable certificate verification.\n\n@throws KeyManagementException\nthe key management exception\n@throws NoSuchAlgorithmException\nthe no such algorithm exception"
] |
public static nsacl6[] get(nitro_service service) throws Exception{
nsacl6 obj = new nsacl6();
nsacl6[] response = (nsacl6[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the nsacl6 resources that are configured on netscaler."
] | [
"Writes this address as a single hexadecimal value with always the exact same number of characters, with or without a preceding 0x prefix.",
"If the variable is a local temporary variable it will be resized so that the operation can complete. If not\ntemporary then it will not be reshaped\n@param mat Variable containing the matrix\n@param numRows Desired number of rows\n@param numCols Desired number of columns",
"Returns all keys of all rows contained within this association.\n\n@return all keys of all rows contained within this association",
"Begin writing a named object attribute.\n\n@param name attribute name",
"Print duration in thousandths of minutes.\n\n@param duration Duration instance\n@return duration in thousandths of minutes",
"Create an object of the given type using a constructor that matches the\nsupplied arguments.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@return a new object of the given type, initialized with the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments\n@throws ReflectiveOperationException\nif any of the reflective operations throw an exception",
"Obtain plugin information\n\n@return",
"Writes triples to determine the statements with the highest rank.",
"Gets Widget bounds height\n@return height"
] |
@PostConstruct
public void initDatabase() {
MongoDBInit.LOGGER.info("initializing MongoDB");
String dbName = System.getProperty("mongodb.name");
if (dbName == null) {
throw new RuntimeException("Missing database name; Set system property 'mongodb.name'");
}
MongoDatabase db = this.mongo.getDatabase(dbName);
try {
PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
Resource[] resources = resolver.getResources("classpath*:mongodb/*.ndjson");
MongoDBInit.LOGGER.info("Scanning for collection data");
for (Resource res : resources) {
String filename = res.getFilename();
String collection = filename.substring(0, filename.length() - 7);
MongoDBInit.LOGGER.info("Found collection file: {}", collection);
MongoCollection<DBObject> dbCollection = db.getCollection(collection, DBObject.class);
try (Scanner scan = new Scanner(res.getInputStream(), "UTF-8")) {
int lines = 0;
while (scan.hasNextLine()) {
String json = scan.nextLine();
Object parse = JSON.parse(json);
if (parse instanceof DBObject) {
DBObject dbObject = (DBObject) parse;
dbCollection.insertOne(dbObject);
} else {
MongoDBInit.LOGGER.error("Invalid object found: {}", parse);
throw new RuntimeException("Invalid object");
}
lines++;
}
MongoDBInit.LOGGER.info("Imported {} objects into collection {}", lines, collection);
}
}
} catch (IOException e) {
throw new RuntimeException("Error importing objects", e);
}
} | [
"init database with demo data"
] | [
"Log column data.\n\n@param column column data",
"Processes changes on aliases, updating the planned state of the item.\n\n@param addAliases\naliases that should be added to the document\n@param deleteAliases\naliases that should be removed from the document",
"Get http response",
"Returns the query string of a URL from a parameter list.\n\n@param params\nMap with parameters\n@return query string",
"Use this API to fetch all the snmpalarm resources that are configured on netscaler.",
"Returns the modules paths used on the command line.\n\n@return the paths separated by the {@link File#pathSeparator path separator}",
"Add an appliable \"post-run\" dependent for this task item.\n\n@param appliable the appliable \"post-run\" dependent.\n@return the key to be used as parameter to taskResult(string) method to retrieve updated \"post-run\" dependent",
"Process normal calendar working and non-working days.\n\n@param calendar parent calendar",
"Calculate the child size along the axis\n@param dataIndex data index\n@param axis {@link Axis}\n@return child size"
] |
public Optional<SoyMsgBundle> resolve(final Optional<Locale> locale) throws IOException {
if (!locale.isPresent()) {
return Optional.absent();
}
synchronized (msgBundles) {
SoyMsgBundle soyMsgBundle = null;
if (isHotReloadModeOff()) {
soyMsgBundle = msgBundles.get(locale.get());
}
if (soyMsgBundle == null) {
soyMsgBundle = createSoyMsgBundle(locale.get());
if (soyMsgBundle == null) {
soyMsgBundle = createSoyMsgBundle(new Locale(locale.get().getLanguage()));
}
if (soyMsgBundle == null && fallbackToEnglish) {
soyMsgBundle = createSoyMsgBundle(Locale.ENGLISH);
}
if (soyMsgBundle == null) {
return Optional.absent();
}
if (isHotReloadModeOff()) {
msgBundles.put(locale.get(), soyMsgBundle);
}
}
return Optional.fromNullable(soyMsgBundle);
}
} | [
"Based on a provided locale return a SoyMsgBundle file.\n\nIf a passed in locale object is \"Optional.absent()\",\nthe implementation will return Optional.absent() as well\n@param locale - maybe locale\n@return maybe soy msg bundle"
] | [
"Encodes the given source into an encoded String using the rules specified\nby the given component and with the given options.\n@param source the source string\n@param encoding the encoding of the source string\n@param type the URI component for the source\n@return the encoded URI\n@throws IllegalArgumentException when the given uri parameter is not a valid URI",
"Filter for public tweets on these languages.\n\n@param languages\nValid BCP 47 (http://tools.ietf.org/html/bcp47) language identifiers,\nand may represent any of the languages listed on Twitter's advanced search page\n(https://twitter.com/search-advanced), or \"und\" if no language could be detected.\nThese strings should NOT be url-encoded.\n@return this",
"Checks if a parameter exists. If it exists, it is left untouched. If it doesn't, it is created. Only works for parameters which key\nis unique. Must be called from within an open transaction.",
"Checks if the specified longitude is correct.\n\n@param name the name of the longitude field\n@param longitude the value of the longitude field\n@return the longitude",
"Get the canonical method declared on this object.\n\n@param method the method to look up\n@return the canonical method object, or {@code null} if no matching method exists",
"Conditionally read a nested table based in the value of a boolean flag which precedes the table data.\n\n@param readerClass reader class\n@return table rows or empty list if table not present",
"Gets type from super class's type parameter.",
"Use this API to fetch all the clusternodegroup resources that are configured on netscaler.",
"Permanently deletes a trashed file.\n@param fileID the ID of the trashed folder to permanently delete."
] |
protected void processStop(Endpoint endpoint, EventTypeEnum eventType) {
if (!sendLifecycleEvent) {
return;
}
Event event = createEvent(endpoint, eventType);
monitoringServiceClient.putEvents(Collections.singletonList(event));
if (LOG.isLoggable(Level.INFO)) {
LOG.info("Send " + eventType + " event to SAM Server successful!");
}
} | [
"Process stop.\n\n@param endpoint the endpoint\n@param eventType the event type"
] | [
"Returns the Java command to use.\n\n@param javaHome the Java Home, if {@code null} an attempt to determine the command will be done\n\n@return the Java executable command",
"Sets the given value on an the receivers's accessible field with the given name.\n\n@param receiver the receiver, never <code>null</code>\n@param fieldName the field's name, never <code>null</code>\n@param value the value to set\n\n@throws NoSuchFieldException see {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#set(Object, Object)}\n@throws IllegalArgumentException see {@link Field#set(Object, Object)}",
"Enables lifecycle callbacks for Android devices\n@param application App's Application object",
"Sets the size of a UIObject",
"Creates a code location URL from a file path\n\n@param filePath the file path\n@return A URL created from File\n@throws InvalidCodeLocation if URL creation fails",
"This method formats a time unit.\n\n@param timeUnit time unit instance\n@return formatted time unit instance",
"Get the spatial object from the cache.\n\n@param key key to get object for\n@param type type of object which should be returned\n@return object for key or null if object does not exist or is a different type",
"Configures a text field to look like a filter box for a table.\n\n@param searchBox the text field to configure",
"Extract the parameters from a method using the Jmx annotation if present,\nor just the raw types otherwise\n\n@param m The method to extract parameters from\n@return An array of parameter infos"
] |
@Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<PaxDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<PaxDate>) super.localDateTime(temporal);
} | [
"Obtains a Pax local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Pax local date-time, not null\n@throws DateTimeException if unable to create the date-time"
] | [
"Finds the missing value. Seems to lose a degree of freedom, but it\ndoesn't. That degree of freedom is already lost by the sensor.",
"If the Artifact does not exist, it will add it to the database. Nothing if it already exit.\n\n@param fromClient DbArtifact",
"Sets the quaternion of the keyframe.",
"Adds a file to your assembly but automatically generates the field name of the file.\n\n@param file {@link File} the file to be uploaded.",
"Determine which type of percent complete is used on on this task,\nand calculate the required value.\n\n@param row task data\n@return percent complete value",
"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",
"Creates the conversion server that is specified by this builder.\n\n@return The conversion server that is specified by this builder.",
"Returns all the URL that should be inside the classpath. This includes the jar itself if any.\n\n@throws JqmPayloadException",
"Specify the class represented by this `ClassNode` extends\na class with the name specified\n@param name the name of the parent class\n@return this `ClassNode` instance"
] |
public void insert( Token where , Token token ) {
if( where == null ) {
// put at the front of the list
if( size == 0 )
push(token);
else {
first.previous = token;
token.previous = null;
token.next = first;
first = token;
size++;
}
} else if( where == last || null == last ) {
push(token);
} else {
token.next = where.next;
token.previous = where;
where.next.previous = token;
where.next = token;
size++;
}
} | [
"Inserts 'token' after 'where'. if where is null then it is inserted to the beginning of the list.\n@param where Where 'token' should be inserted after. if null the put at it at the beginning\n@param token The token that is to be inserted"
] | [
"This is an assertion method that can be used by a thread to confirm that\nthe thread isn't already holding lock for an object, before acquiring a\nlock\n\n@param object\nobject to test for lock\n@param name\ntag associated with the lock",
"Join with another query builder. This will add into the SQL something close to \" INNER JOIN other-table ...\".\nEither the object associated with the current QueryBuilder or the argument QueryBuilder must have a foreign field\nof the other one. An exception will be thrown otherwise.\n\n<p>\n<b>NOTE:</b> This will do combine the WHERE statement of the two query builders with a SQL \"AND\". See\n{@link #joinOr(QueryBuilder)}.\n</p>",
"Mutate the gradient.\n@param amount the amount in the range zero to one",
"Use this API to fetch statistics of lbvserver_stats resource of given name .",
"Utility function that fetches system store definitions\n\n@return The map container that maps store names to store definitions",
"Specifies the angle of the effect.\n\n@param angle the angle of the effect.\n@angle",
"This method is called to format a units value.\n\n@param value numeric value\n@return currency value",
"Performs a request against a Stitch app server determined by the deployment model\nof the underlying app. Throws a Stitch specific exception if the request fails.\n\n@param stitchReq the request to perform.\n@return a {@link Response} to the request.",
"Creates and start an engine representing the node named as the given parameter.\n\n@param name\nname of the node, as present in the configuration (case sensitive)\n@param handler\ncan be null. A set of callbacks hooked on different engine life cycle events.\n@return an object allowing to stop the engine."
] |
public static CRFClassifier getClassifier(InputStream in) throws IOException, ClassCastException,
ClassNotFoundException {
CRFClassifier crf = new CRFClassifier();
crf.loadClassifier(in);
return crf;
} | [
"Loads a CRF classifier from an InputStream, and returns it. This method\ndoes not buffer the InputStream, so you should have buffered it before\ncalling this method.\n\n@param in\nInputStream to load classifier from\n@return The CRF classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data"
] | [
"The third method to write caseManager. Its task is to write the call to\nthe story to be run.\n\n@param caseManager\nthe file where the test must be written\n@param storyName\nthe name of the story\n@param test_path\nthe path where the story can be found\n@param user\nthe user requesting the story\n@param feature\nthe feature requested by the user\n@param benefit\nthe benefit provided by the feature\n@throws BeastException",
"Gets whether the given server can be updated.\n\n@param server the id of the server. Cannot be <code>null</code>\n\n@return <code>true</code> if the server can be updated; <code>false</code>\nif the update should be cancelled\n\n@throws IllegalStateException if this policy is not expecting a request\nto update the given server",
"Returns the bounding sphere of the vertices.\n@param sphere destination array to get bounding sphere.\nThe first entry is the radius, the next\nthree are the center.\n@return radius of bounding sphere or 0.0 if no vertices",
"Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory",
"Returns the chunk id for the file name\n\n@param fileName The file name\n@return Chunk id",
"Use to generate a file based on generator node.",
"Write project properties.\n\n@param record project properties\n@throws IOException",
"Use this API to add authenticationradiusaction resources.",
"Obtain collection of profiles\n\n@param model\n@return\n@throws Exception"
] |
private void deliverMasterYieldCommand(int toPlayer) {
for (final MasterHandoffListener listener : getMasterHandoffListeners()) {
try {
listener.yieldMasterTo(toPlayer);
} catch (Throwable t) {
logger.warn("Problem delivering master yield command to listener", t);
}
}
} | [
"Send a master handoff yield command to all registered listeners.\n\n@param toPlayer the device number to which we are being instructed to yield the tempo master role"
] | [
"Gets information about this collaboration.\n\n@return info about this collaboration.",
"Use this API to fetch nssimpleacl resource of given name .",
"Calculates the next snapshot version based on the current release version\n\n@param fromVersion The version to bump to next development version\n@return The next calculated development (snapshot) version",
"Validates the producer method",
"Retrieve a Double from an input stream.\n\n@param is input stream\n@return Double instance",
"Reports that a node is faulted.\n\n@param faulted the node faulted\n@param throwable the reason for fault",
"Change the color of the center which indicates the new color.\n\n@param color int of the color.",
"Webkit based browsers require that we set the webkit-user-drag style\nattribute to make an element draggable.",
"Get parent digest of an image.\n\n@param digest\n@param host\n@return"
] |
public static String getStringOption(Map<String, String> configOptions, String optionKey, String defaultValue) {
String result = configOptions.get(optionKey);
return null != result ? result : defaultValue;
} | [
"Returns the value of an option, or the default if the value is null or the key is not part of the map.\n@param configOptions the map with the config options.\n@param optionKey the option to get the value of\n@param defaultValue the default value to return if the option is not set.\n@return the value of an option, or the default if the value is null or the key is not part of the map."
] | [
"Reads a row of a CSV file and populates the bean, using the supplied name mapping to map column values to the\nappropriate fields. If processors are supplied then they are used, otherwise the raw String values will be used.\n\n@param bean\nthe bean to populate\n@param nameMapping\nthe name mapping array\n@param processors\nthe (optional) cell processors\n@return the populated bean, or null if EOF was reached\n@throws IllegalArgumentException\nif nameMapping.length != number of CSV columns read\n@throws IOException\nif an I/O error occurred\n@throws NullPointerException\nif bean or nameMapping are null\n@throws SuperCsvConstraintViolationException\nif a CellProcessor constraint failed\n@throws SuperCsvException\nif there was a general exception while reading/processing\n@throws SuperCsvReflectionException\nif there was an reflection exception while mapping the values to the bean",
"Indicates if a set of types are all proxyable\n\n@param types The types to test\n@return True if proxyable, false otherwise",
"Performs the closure within a transaction using a cached connection.\nIf the closure takes a single argument, it will be called\nwith the connection, otherwise it will be called with no arguments.\n\n@param closure the given closure\n@throws SQLException if a database error occurs",
"Joins the given ints using the given separator into a single string.\n\n@return the joined string or an empty string if the int array is null",
"Processes all entities in a Wikidata dump using the given entity\nprocessor. By default, the most recent JSON dump will be used. In offline\nmode, only the most recent previously downloaded file is considered.\n\n@param entityDocumentProcessor\nthe object to use for processing entities in this dump",
"Log original incoming request\n\n@param requestType\n@param request\n@param history",
"Puts a single byte if the buffer is not yet full.\n\n@return true if the byte was put, or false if the buffer is full",
"Returns true if the specified name is NOT allowed. It isn't allowed if it matches a built in operator\nor if it contains a restricted character.",
"A variant of the gamma function.\n@param a the number to apply gain to\n@param b the gain parameter. 0.5 means no change, smaller values reduce gain, larger values increase gain.\n@return the output value"
] |
public static void close(Statement stmt) {
try {
Connection conn = stmt.getConnection();
try {
if (!stmt.isClosed())
stmt.close();
} catch (UnsupportedOperationException e) {
// not all JDBC drivers implement the isClosed() method.
// ugly, but probably the only way to get around this.
// http://stackoverflow.com/questions/12845385/duke-fast-deduplication-java-lang-unsupportedoperationexception-operation-not
stmt.close();
}
if (conn != null && !conn.isClosed())
conn.close();
} catch (SQLException e) {
throw new DukeException(e);
}
} | [
"Closes the JDBC statement and its associated connection."
] | [
"Appends the accumulated words to the resulting words. Trailing whitespace is removed because of the\npostprocessing that inserts custom whitespace\n\n@param currentWords is the {@link StringBuilder} of the accumulated words\n@param formattedWords is the list that is being appended to",
"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",
"Stores template parameters for OpenShiftAssistantTemplate.\n\n@param name template parameter name\n@param value template parameter value",
"Calculates the bar width and bar margin based on the _DataSize and settings and starts the boundary\ncalculation in child classes.\n@param _DataSize Amount of data sets",
"Initialize all components of this URI builder with the components of the given URI.\n@param uri the URI\n@return this UriComponentsBuilder",
"Read file content to string.\n\n@param filePath\nthe file path\n@return the string\n@throws IOException\nSignals that an I/O exception has occurred.",
"Build a String representation of given arguments.",
"Convert from a DTO to an internal Spring bean definition.\n\n@param beanDefinitionDto The DTO object.\n@return Returns a Spring bean definition.",
"Executes the given supplier within the context of a read lock.\n\n@param <E> The result type.\n@param sup The supplier.\n@return The result of {@link Supplier#get()}."
] |
public Equation process( String equation , boolean debug ) {
compile(equation,true,debug).perform();
return this;
} | [
"Compiles and performs the provided equation.\n\n@param equation String in simple equation format"
] | [
"Retrieve the FeatureSource object from the data store.\n\n@return An OpenGIS FeatureSource object;\n@throws LayerException\noops",
"Store a comment based on comment text, gavc and user information\n\n@param gavc - entity id\n@param commentText - comment text\n@param credential - user credentials\n@param entityType - type of the entity",
"Indicates whether or not an event ID is a duplicate.\n\n<p>This method can be overridden by a subclass in order to provide custom de-duping logic.</p>\n\n@param eventID the event ID.\n@return true if the event is a duplicate; otherwise false.",
"Finish the initialization.\n\n@param container\n@param isShutdownHookEnabled",
"Close all JDBC objects related to this connection.",
"Checks if a given number is in the range of a short.\n\n@param number\na number which should be in the range of a short (positive or negative)\n\n@see java.lang.Short#MIN_VALUE\n@see java.lang.Short#MAX_VALUE\n\n@return number as a short (rounding might occur)",
"Stop finding waveforms for all active players.",
"Return the list of licenses attached to an artifact\n\n@param gavc String\n@param filters FiltersHolder\n@return List<DbLicense>",
"Return a new client that may be cached or not. Given properties are always use when not cached, and only used at creation time for\ncached clients.\n\n@param name\nif null, default client. Otherwise, helpful to retrieve cached clients later.\n@param p\na set of properties. Implementation specific. Unknown properties are silently ignored.\n@param cached\nif false, the client will not be cached and subsequent calls with the same name will return different objects."
] |
public Object materializeObject(ClassDescriptor cld, Identity oid)
throws PersistenceBrokerException
{
final StatementManagerIF sm = broker.serviceStatementManager();
final SelectStatement sql = broker.serviceSqlGenerator().getPreparedSelectByPkStatement(cld);
Object result = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try
{
stmt = sm.getSelectByPKStatement(cld);
if (stmt == null)
{
logger.error("getSelectByPKStatement returned a null statement");
throw new PersistenceBrokerException("getSelectByPKStatement returned a null statement");
}
/*
arminw: currently a select by PK could never be a stored procedure,
thus we can always set 'false'. Is this correct??
*/
sm.bindSelect(stmt, oid, cld, false);
rs = stmt.executeQuery();
// data available read object, else return null
ResultSetAndStatement rs_stmt = new ResultSetAndStatement(broker.serviceStatementManager(), stmt, rs, sql);
if (rs.next())
{
Map row = new HashMap();
cld.getRowReader().readObjectArrayFrom(rs_stmt, row);
result = cld.getRowReader().readObjectFrom(row);
}
// close resources
rs_stmt.close();
}
catch (PersistenceBrokerException e)
{
// release resources on exception
sm.closeResources(stmt, rs);
logger.error("PersistenceBrokerException during the execution of materializeObject: " + e.getMessage(), e);
throw e;
}
catch (SQLException e)
{
// release resources on exception
sm.closeResources(stmt, rs);
throw ExceptionHelper.generateException(e, sql.getStatement(), cld, logger, null);
}
return result;
} | [
"performs a primary key lookup operation against RDBMS and materializes\nan object from the resulting row. Only skalar attributes are filled from\nthe row, references are not resolved.\n@param oid contains the primary key info.\n@param cld ClassDescriptor providing mapping information.\n@return the materialized object, null if no matching row was found or if\nany error occured."
] | [
"Returns an iterator that iterates over all elements greater or equal to key in ascending order\n\n@param key key\n@return iterator",
"Runs the shell script for committing and optionally pushing the changes in the module.\n@return exit code of the script.",
"Gets the i-th half-edge associated with the face.\n\n@param i\nthe half-edge index, in the range 0-2.\n@return the half-edge",
"Removes an existing metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return this metadata object.",
"Verifies that the given query can be properly scattered.\n\n@param query the query to verify\n@throws IllegalArgumentException if the query is invalid.",
"Close the open stream.\n\nClose the stream if it was opened before",
"Abort and close the transaction.\nCalling abort abandons all persistent object modifications and releases the\nassociated locks.\nIf transaction is not in progress a TransactionNotInProgressException is thrown",
"Constructs the convex hull of a set of points whose coordinates are given\nby an array of doubles.\n\n@param coords\nx, y, and z coordinates of each input point. The length of\nthis array must be at least three times <code>nump</code>.\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe number of input points is less than four or greater than\n1/3 the length of <code>coords</code>, or the points appear\nto be coincident, colinear, or coplanar.",
"Adds a patch operation.\n@param op the operation type. Must be add, replace, remove, or test.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value to be set."
] |
public void diffUpdate(List<T> newList) {
if (getCollection().size() == 0) {
addAll(newList);
notifyDataSetChanged();
} else {
DiffCallback diffCallback = new DiffCallback(collection, newList);
DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(diffCallback);
clear();
addAll(newList);
diffResult.dispatchUpdatesTo(this);
}
} | [
"Provides a ready to use diff update for our adapter based on the implementation of the\nstandard equals method from Object.\n\n@param newList to refresh our content"
] | [
"Gets the property by key converted to lowercase if requested\n@param key property key\n@param lowerCase convert property to lowercase if it is true, keep the original one if it is\nfalse\n@return node property",
"Set the enum representing the type of this column.\n\n@param tableType type of table to which this column belongs",
"Try Oracle update batching and call executeUpdate or revert to\nJDBC update batching.\n@param stmt the statement beeing added to the batch\n@throws PlatformException upon JDBC failure",
"Finish initializing.\n\n@throws GeomajasException oops",
"Generates a JSON patch for transforming the source node into the target node.\n\n@param source the node to be patched\n@param target the expected result after applying the patch\n@param replaceMode the replace mode to be used\n@return the patch as a {@link JsonPatch}",
"Return the list of corporate GroupId prefix configured for an organization.\n\n@param organizationId String Organization name\n@return Response A list of corporate groupId prefix in HTML or JSON",
"This method allows a pre-existing resource calendar to be attached to a\nresource.\n\n@param calendar resource calendar",
"Read custom fields for a GanttProject task.\n\n@param gpTask GanttProject task\n@param mpxjTask MPXJ Task instance",
"Returns the value of found in the model.\n\n@param model the model that contains the key and value.\n@param expressionResolver the expression resolver to use to resolve expressions\n\n@return the directory grouping found in the model.\n\n@throws IllegalArgumentException if the {@link org.jboss.as.controller.descriptions.ModelDescriptionConstants#DIRECTORY_GROUPING directory grouping}\nwas not found in the model."
] |
@SuppressWarnings("WeakerAccess")
public int findBeatAtTime(long milliseconds) {
int found = Arrays.binarySearch(timeWithinTrackValues, milliseconds);
if (found >= 0) { // An exact match, just change 0-based array index to 1-based beat number
return found + 1;
} else if (found == -1) { // We are before the first beat
return found;
} else { // We are after some beat, report its beat number
return -(found + 1);
}
} | [
"Finds the beat in which the specified track position falls.\n\n@param milliseconds how long the track has been playing\n\n@return the beat number represented by that time, or -1 if the time is before the first beat"
] | [
"Use this API to fetch the statistics of all ipseccounters_stats resources that are configured on netscaler.",
"Sets the ssh priv key relative path.\nNote that must be relative path for now.\nThis default to no need of passphrase for the private key.\nWill also auto set the login type to key based.\n\n@param privKeyRelativePath\nthe priv key relative path\n@return the parallel task builder",
"Emit an enum event with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(Enum, Object...)",
"Computes either the vector p-norm or the induced matrix p-norm depending on A\nbeing a vector or a matrix respectively.\n\n@param A Vector or matrix whose norm is to be computed.\n@param p The p value of the p-norm.\n@return The computed norm.",
"why isn't this functionality in enum?",
"Write the domain controller's data to an output stream.\n\n@param outstream the output stream\n@throws Exception",
"Method to get the file writer required for the .story files\n\n@param scenarioName\n@param aux_package_path\n@param dest_dir\n@return The file writer that generates the .story files for each test\n@throws BeastException",
"Deletes a path from the filesystem\n\nIf the path is a directory its contents\nwill be recursively deleted before it itself\nis deleted.\n\nNote that removal of a directory is not an atomic-operation\nand so if an error occurs during removal, some of the directories\ndescendants may have already been removed\n\n@throws IOException if an error occurs whilst removing a file or directory",
"Indicates that contextual session bean instance has been constructed."
] |
private static void addCauseToBacktrace(final Throwable cause, final List<String> bTrace) {
if (cause.getMessage() == null) {
bTrace.add(BT_CAUSED_BY_PREFIX + cause.getClass().getName());
} else {
bTrace.add(BT_CAUSED_BY_PREFIX + cause.getClass().getName() + ": " + cause.getMessage());
}
for (final StackTraceElement ste : cause.getStackTrace()) {
bTrace.add(BT_PREFIX + ste.toString());
}
if (cause.getCause() != null) {
addCauseToBacktrace(cause.getCause(), bTrace);
}
} | [
"Add a cause to the backtrace.\n\n@param cause\nthe cause\n@param bTrace\nthe backtrace list"
] | [
"Use this API to fetch sslcertkey_sslvserver_binding resources of given name .",
"Create a WebDriver backed EmbeddedBrowser.\n\n@param driver The WebDriver to use.\n@param filterAttributes the attributes to be filtered from DOM.\n@param crawlWaitReload the period to wait after a reload.\n@param crawlWaitEvent the period to wait after an event is fired.\n@return The EmbeddedBrowser.",
"Operators which affect the variables to its left and right",
"Determines if this value is the default value for the given field type.\n\n@param type field type\n@param value value\n@return true if the value is not default",
"Joins the given parts to recover the original secret.\n\n<p><b>N.B.:</b> There is no way to determine whether or not the returned value is actually the\noriginal secret. If the parts are incorrect, or are under the threshold value used to split the\nsecret, a random value will be returned.\n\n@param parts a map of part IDs to part values\n@return the original secret\n@throws IllegalArgumentException if {@code parts} is empty or contains values of varying\nlengths",
"Whether the address is IPv4-mapped\n\n::ffff:x:x/96 indicates IPv6 address mapped to IPv4",
"Converts this object to JSON.\n\n@return the JSON representation\n\n@throws JSONException if JSON operations fail",
"Sets the last operation response.\n\n@param response the last operation response.",
"Abort and close the transaction. Calling abort abandons all persistent\nobject modifications and releases the associated locks. Aborting a\ntransaction does not restore the state of modified transient objects"
] |
public float getPositionX(int vertex) {
if (!hasPositions()) {
throw new IllegalStateException("mesh has no positions");
}
checkVertexIndexBounds(vertex);
return m_vertices.getFloat(vertex * 3 * SIZEOF_FLOAT);
} | [
"Returns the x-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the x coordinate"
] | [
"Iterates through the given InputStream line by line using the specified\nencoding, splitting each line using the given separator. The list of tokens\nfor each line is then passed to the given closure. Finally, the stream\nis closed.\n\n@param stream an InputStream\n@param regex the delimiting regular expression\n@param charset opens the stream with a specified charset\n@param closure a closure\n@return the last value returned by the closure\n@throws IOException if an IOException occurs.\n@throws java.util.regex.PatternSyntaxException\nif the regular expression's syntax is invalid\n@see #splitEachLine(java.io.Reader, java.lang.String, groovy.lang.Closure)\n@since 1.5.5",
"Add the provided document to the cache.",
"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",
"Adds all items from the iterator to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed",
"Unescape and unquote the path. Ready for translation.",
"Use this API to fetch all the nslimitselector resources that are configured on netscaler.",
"Validates bic.\n\n@param bic to be validated.\n@throws BicFormatException if bic is invalid.\nUnsupportedCountryException if bic's country is not supported.",
"This method removes trailing delimiter characters.\n\n@param buffer input sring buffer",
"Adds all items from the iterable to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed"
] |
private void updateLetsEncrypt() {
getReport().println(Messages.get().container(Messages.RPT_STARTING_LETSENCRYPT_UPDATE_0));
CmsLetsEncryptConfiguration config = OpenCms.getLetsEncryptConfig();
if ((config == null) || !config.isValidAndEnabled()) {
return;
}
CmsSiteConfigToLetsEncryptConfigConverter converter = new CmsSiteConfigToLetsEncryptConfigConverter(config);
boolean ok = converter.run(getReport(), OpenCms.getSiteManager());
if (ok) {
getReport().println(
org.opencms.ui.apps.Messages.get().container(org.opencms.ui.apps.Messages.RPT_LETSENCRYPT_FINISHED_0),
I_CmsReport.FORMAT_OK);
}
} | [
"Updates LetsEncrypt configuration."
] | [
"Use this API to add clusterinstance.",
"Returns true if the given item document lacks a label for at least one of\nthe languages covered.\n\n@param itemDocument\n@return true if some label is missing",
"Delete an object from the database by id.",
"Calculate the highlight color. Saturate at 0xff to make sure that high values\ndon't result in aliasing.\n\n@param _Slice The Slice which will be highlighted.",
"Invite a user to an enterprise.\n@param api the API connection to use for the request.\n@param userLogin the login of the user to invite.\n@param enterpriseID the ID of the enterprise to invite the user to.\n@return the invite info.",
"Saves the state of this connection to a string so that it can be persisted and restored at a later time.\n\n<p>Note that proxy settings aren't automatically saved or restored. This is mainly due to security concerns\naround persisting proxy authentication details to the state string. If your connection uses a proxy, you will\nhave to manually configure it again after restoring the connection.</p>\n\n@see #restore\n@return the state of this connection.",
"Perform a normal scan",
"Image scale method\n@param imageToScale The image to be scaled\n@param dWidth Desired width, the new image object is created to this size\n@param dHeight Desired height, the new image object is created to this size\n@param fWidth What to multiply the width by. value < 1 scales down, and value > one scales up\n@param fHeight What to multiply the height by. value < 1 scales down, and value > one scales up\n@return A scaled image",
"Plots a list of charts in matrix with 2 columns.\n@param charts"
] |
private void populateRecurringException(ProjectCalendarException mpxjException, Exceptions.Exception xmlException)
{
RecurringData data = mpxjException.getRecurring();
xmlException.setEnteredByOccurrences(Boolean.TRUE);
xmlException.setOccurrences(NumberHelper.getBigInteger(data.getOccurrences()));
switch (data.getRecurrenceType())
{
case DAILY:
{
xmlException.setType(BigInteger.valueOf(7));
xmlException.setPeriod(NumberHelper.getBigInteger(data.getFrequency()));
break;
}
case WEEKLY:
{
xmlException.setType(BigInteger.valueOf(6));
xmlException.setPeriod(NumberHelper.getBigInteger(data.getFrequency()));
xmlException.setDaysOfWeek(getDaysOfTheWeek(data));
break;
}
case MONTHLY:
{
xmlException.setPeriod(NumberHelper.getBigInteger(data.getFrequency()));
if (data.getRelative())
{
xmlException.setType(BigInteger.valueOf(5));
xmlException.setMonthItem(BigInteger.valueOf(data.getDayOfWeek().getValue() + 2));
xmlException.setMonthPosition(BigInteger.valueOf(NumberHelper.getInt(data.getDayNumber()) - 1));
}
else
{
xmlException.setType(BigInteger.valueOf(4));
xmlException.setMonthDay(NumberHelper.getBigInteger(data.getDayNumber()));
}
break;
}
case YEARLY:
{
xmlException.setMonth(BigInteger.valueOf(NumberHelper.getInt(data.getMonthNumber()) - 1));
if (data.getRelative())
{
xmlException.setType(BigInteger.valueOf(3));
xmlException.setMonthItem(BigInteger.valueOf(data.getDayOfWeek().getValue() + 2));
xmlException.setMonthPosition(BigInteger.valueOf(NumberHelper.getInt(data.getDayNumber()) - 1));
}
else
{
xmlException.setType(BigInteger.valueOf(2));
xmlException.setMonthDay(NumberHelper.getBigInteger(data.getDayNumber()));
}
}
}
} | [
"Writes the details of a recurring exception.\n\n@param mpxjException source MPXJ calendar exception\n@param xmlException target MSPDI exception"
] | [
"This method merges together assignment data for the same cost.\n\n@param list assignment data",
"Generates the Base64 encoded SHA-1 hash for content available in the stream.\nIt can be used to calculate the hash of a file.\n@param stream the input stream of the file or data.\n@return the Base64 encoded hash string.",
"Roll the java.util.Time forward or backward.\n\n@param startDate - The start date\n@param period Calendar.YEAR etc\n@param amount - Negative to rollbackwards.",
"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",
"Set a proxy for REST-requests.\n\n@param proxyHost\n@param proxyPort",
"Synchronize the geotools transaction with the platform transaction, if such a transaction is active.\n\n@param featureStore\n@param dataSource",
"Encodes the given URI query with the given encoding.\n@param query the query to be encoded\n@param encoding the character encoding to encode to\n@return the encoded query\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"returns a sorted array of enum constants",
"Determine the enum value corresponding to the first play state found in the packet.\n\n@return the proper value"
] |
public static final String printTime(Date value)
{
return (value == null ? null : TIME_FORMAT.get().format(value));
} | [
"Print a time value.\n\n@param value time value\n@return time value"
] | [
"Option check, forwards options to the standard doclet, if that one refuses them,\nthey are sent to UmlGraph",
"Utility function that fetches node ids.\n\n@param adminClient An instance of AdminClient points to given cluster\n@return Node ids in cluster",
"Convert a Planner date-time value into a Java date.\n\n20070222T080000Z\n\n@param value Planner date-time\n@return Java Date instance",
"Returns the first product found in the vector of calibration products\nwhich matches the given symbol, where symbol is the String set in\nthe calibrationSpecs.\n\n@param symbol A given symbol string.\n@return The product associated with that symbol.",
"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)",
"Computes annualized seasonal adjustments from given monthly realized CPI values.\n\n@param realizedCPIValues An array of consecutive monthly CPI values (minimum size is 12*numberOfYearsToAverage))\n@param lastMonth The index of the last month in the sequence of realizedCPIValues (corresponding to the enums in <code>{@link java.time.Month}</code>).\n@param numberOfYearsToAverage The number of years to go back in the array of realizedCPIValues.\n@return Array of annualized seasonal adjustments, where [0] corresponds to the adjustment for from December to January.",
"Add properties to 'properties' map on transaction start\n@param type - of transaction",
"Moves the elements contained in \"band\" in the Y axis \"yOffset\"\n@param yOffset\n@param band",
"Add tables to the tree.\n\n@param parentNode parent tree node\n@param file tables container"
] |
static PatchingResult executeTasks(final IdentityPatchContext context, final IdentityPatchContext.FinalizeCallback callback) throws Exception {
final List<PreparedTask> tasks = new ArrayList<PreparedTask>();
final List<ContentItem> conflicts = new ArrayList<ContentItem>();
// Identity
prepareTasks(context.getIdentityEntry(), context, tasks, conflicts);
// Layers
for (final IdentityPatchContext.PatchEntry layer : context.getLayers()) {
prepareTasks(layer, context, tasks, conflicts);
}
// AddOns
for (final IdentityPatchContext.PatchEntry addOn : context.getAddOns()) {
prepareTasks(addOn, context, tasks, conflicts);
}
// If there were problems report them
if (!conflicts.isEmpty()) {
throw PatchLogger.ROOT_LOGGER.conflictsDetected(conflicts);
}
// Execute the tasks
for (final PreparedTask task : tasks) {
// Unless it's excluded by the user
final ContentItem item = task.getContentItem();
if (item != null && context.isExcluded(item)) {
continue;
}
// Run the task
task.execute();
}
return context.finalize(callback);
} | [
"Execute all recorded tasks.\n\n@param context the patch context\n@param callback the finalization callback\n@throws Exception"
] | [
"Returns next and previous favorites for a photo in a user's favorites\n\n@param photoId\nThe photo id\n@param userId\nThe user's ID\n@see <a href=\"http://www.flickr.com/services/api/flickr.favorites.getContext.html\">flickr.favorites.getContext</a>",
"Reads a time value. The time is represented as tenths of a\nminute since midnight.\n\n@param data byte array of data\n@param offset location of data as offset into the array\n@return time value",
"Sends the JSON-formatted spellchecking results to the client.\n\n@param res The HttpServletResponse object.\n@param request The spellchecking request object.\n\n@throws IOException in case writing the response fails",
"Insert syntax for our special table\n@param sequenceName\n@param maxKey\n@return sequence insert statement",
"Log a fatal message.",
"Determines the number bytes required to store a variable length\n\n@param i length of Bytes\n@return number of bytes needed",
"Generates an expression from a variable\n@param var The variable from which to generate the expression\n@return A expression that represents the given variable",
"Post the specified photo to a blog. Note that the Photo.title and Photo.description are used for the blog entry title and body respectively.\n\n@param photo\nThe photo metadata\n@param blogId\nThe blog ID\n@param blogPassword\nThe blog password\n@throws FlickrException",
"Call commit on the underlying connection."
] |
private ModelNode createJVMNode() throws OperationFailedException {
ModelNode jvm = new ModelNode().setEmptyObject();
jvm.get(NAME).set(getProperty("java.vm.name"));
jvm.get(JAVA_VERSION).set(getProperty("java.vm.specification.version"));
jvm.get(JVM_VERSION).set(getProperty("java.version"));
jvm.get(JVM_VENDOR).set(getProperty("java.vm.vendor"));
jvm.get(JVM_HOME).set(getProperty("java.home"));
return jvm;
} | [
"Create a ModelNode representing the JVM the instance is running on.\n\n@return a ModelNode representing the JVM the instance is running on.\n@throws OperationFailedException"
] | [
"Print priority.\n\n@param priority Priority instance\n@return priority value",
"Returns the names of the involved fields when post processing.\n\n@return the names of the involved fields",
"On complete.\nSave response headers when needed.\n\n@param response\nthe response\n@return the response on single request",
"Clears the Parameters before performing a new search.\n@return this.true;",
"Scroll to specific page. The final page might be different from the requested one if the\nrequested page is larger than the last page. To process the scrolling by pages\nLayoutScroller must be constructed with a pageSize greater than zero.\n@param pageNumber page to scroll to\n@return the new current item after the scrolling processed.",
"Sets the target translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator\n@return this to allow chaining",
"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",
"Use this API to fetch all the clusternodegroup resources that are configured on netscaler.",
"Retrieve the document with the specified ID from the database and deserialize to an\ninstance of the POJO of type T.\n\n@param <T> object type\n@param classType the class of type T\n@param id the document id\n@return an object of type T\n@throws NoDocumentException if the document is not found in the database\n@see #find(Class, String, String)\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/document.html#read\"\ntarget=\"_blank\">Documents - read</a>"
] |
public static base_responses disable(nitro_service client, String trapname[]) throws Exception {
base_responses result = null;
if (trapname != null && trapname.length > 0) {
snmpalarm disableresources[] = new snmpalarm[trapname.length];
for (int i=0;i<trapname.length;i++){
disableresources[i] = new snmpalarm();
disableresources[i].trapname = trapname[i];
}
result = perform_operation_bulk_request(client, disableresources,"disable");
}
return result;
} | [
"Use this API to disable snmpalarm resources of given names."
] | [
"Enables or disabled shadow casting for a direct light.\nEnabling shadows attaches a GVRShadowMap component to the\nGVRSceneObject which owns the light and provides the\ncomponent with an orthographic camera for shadow casting.\n@param enableFlag true to enable shadow casting, false to disable",
"Convert a wavelength to an RGB value.\n@param wavelength wavelength in nanometres\n@return the RGB value",
"Filter events.\n\n@param events the events\n@return the list of filtered events",
"Creates a directory at the given path if it does not exist yet and if the\ndirectory manager was not configured for read-only access.\n\n@param path\n@throws IOException\nif it was not possible to create a directory at the given\npath",
"Exchange an auth token from the old Authentication API, to an OAuth access token.\n\nCalling this method will delete the auth token used to make the request.\n\n@param authToken\n@throws FlickrException\n@see \"http://www.flickr.com/services/api/flickr.auth.oauth.getAccessToken.html\"",
"Use this API to delete nsip6.",
"Use this API to count nstrafficdomain_bridgegroup_binding resources configued on NetScaler.",
"Computes annualized seasonal adjustments from given monthly realized CPI values.\n\n@param realizedCPIValues An array of consecutive monthly CPI values (minimum size is 12*numberOfYearsToAverage))\n@param lastMonth The index of the last month in the sequence of realizedCPIValues (corresponding to the enums in <code>{@link java.time.Month}</code>).\n@param numberOfYearsToAverage The number of years to go back in the array of realizedCPIValues.\n@return Array of annualized seasonal adjustments, where [0] corresponds to the adjustment for from December to January.",
"Updates the model. Ensures that we reset the columns widths.\n\n@param model table model"
] |
protected Object[] getFieldObjects(Object data) throws SQLException {
Object[] objects = new Object[argFieldTypes.length];
for (int i = 0; i < argFieldTypes.length; i++) {
FieldType fieldType = argFieldTypes[i];
if (fieldType.isAllowGeneratedIdInsert()) {
objects[i] = fieldType.getFieldValueIfNotDefault(data);
} else {
objects[i] = fieldType.extractJavaFieldToSqlArgValue(data);
}
if (objects[i] == null) {
// NOTE: the default value could be null as well
objects[i] = fieldType.getDefaultValue();
}
}
return objects;
} | [
"Return the array of field objects pulled from the data object."
] | [
"calculate distance of two points\n\n@param a\n@param b\n@return",
"Create an instance from the given config.\n\n@param param Grid param from the request.",
"Constructs the appropriate MenuDrawer based on the position.",
"Calculates a md5 hash for an url\n\nIf a passed in url is absent then this method will return absent as well\n\n@param url - an url to a soy template file\n@return - md5 checksum of a template file\n@throws IOException - in a case there is an IO error calculating md5 checksum",
"Get the upload parameters.\n@return",
"Copy a path recursively.\n@param source a Path pointing to a file or a directory that must exist\n@param target a Path pointing to a directory where the contents will be copied.\n@param overwrite overwrite existing files - if set to false fails if the target file already exists.\n@throws IOException",
"Make all elements of a String array upper case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements upper case",
"compute Exp using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Result.",
"Adds a foreignkey to this table.\n\n@param relationName The name of the relation represented by the foreignkey\n@param remoteTable The referenced table\n@param localColumns The local columns\n@param remoteColumns The remote columns"
] |
public Date getEnd() {
if (null != m_explicitEnd) {
return isWholeDay() ? adjustForWholeDay(m_explicitEnd, true) : m_explicitEnd;
}
if ((null == m_end) && (m_series.getInstanceDuration() != null)) {
m_end = new Date(m_start.getTime() + m_series.getInstanceDuration().longValue());
}
return isWholeDay() && !m_series.isWholeDay() ? adjustForWholeDay(m_end, true) : m_end;
} | [
"Returns the end time of the event.\n@return the end time of the event."
] | [
"Obtains a local date in Coptic 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 Coptic local date, not null\n@throws DateTimeException if unable to create the date",
"Send an event to other applications\n\n@param context context in which to send the broadcast\n@param event event to send",
"Select a List of values from a Matcher using a Collection\nto identify the indices to be selected.\n\n@param self a Matcher\n@param indices a Collection of indices\n@return a String of the values at the given indices\n@since 1.6.0",
"Makes a CRFDatum by producing features and a label from input data at a\nspecific position, using the provided factory.\n\n@param info\nThe input data\n@param loc\nThe position to build a datum at\n@param featureFactory\nThe FeatureFactory to use to extract features\n@return The constructed CRFDatum",
"Returns the body of the request. This method is used to read posted JSON data.\n\n@param request The request.\n\n@return String representation of the request's body.\n\n@throws IOException in case reading the request fails",
"Setter for blob handle value.\n\n@param txn enclosing transaction\n@param localId entity local id.\n@param blobId blob id\n@param value property value.",
"Adds a new row after the given one.\n\n@param row the row after which a new one should be added",
"get the result speech recognize and find match in strings file.\n\n@param speechResult",
"Returns with a view of all scopes known by this manager."
] |
@JmxGetter(name = "avgUpdateEntriesNetworkTimeMs", description = "average time spent on network, for streaming operations")
public double getAvgUpdateEntriesNetworkTimeMs() {
return networkTimeCounterMap.get(Operation.UPDATE_ENTRIES).getAvgEventValue()
/ Time.NS_PER_MS;
} | [
"Mbeans for UPDATE_ENTRIES"
] | [
"Add new control at the control bar with specified touch listener, resource and position.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener\n@param position control position in the bar",
"1-D Gaussian function.\n\n@param x value.\n@return Function's value at point x.",
"Create the patching task based on the definition.\n\n@param definition the task description\n@param provider the content provider\n@param context the task context\n@return the created task",
"Convert the message to a FinishRequest",
"Returns the number of history entries for a client\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param searchFilter unused\n@return number of history entries",
"This method is called to format a percentage value.\n\n@param value numeric value\n@return percentage value",
"Process the standard working hours for a given day.\n\n@param mpxjCalendar MPXJ Calendar instance\n@param uniqueID unique ID sequence generation\n@param day Day instance\n@param typeList Planner list of days",
"Read properties from the active profiles.\n\nGoes through all active profiles (in the order the\nprofiles are defined in settings.xml) and extracts\nthe desired properties (if present). The prefix is\nused when looking up properties in the profile but\nnot in the returned map.\n\n@param prefix The prefix to use or null if no prefix should be used\n@param properties The properties to read\n\n@return A map containing the values for the properties that were found",
"Read the given number of bytes into a long\n\n@param bytes The byte array to read from\n@param offset The offset at which to begin reading\n@param numBytes The number of bytes to read\n@return The long value read"
] |
protected void updateNorms( int j ) {
boolean foundNegative = false;
for( int col = j; col < numCols; col++ ) {
double e = dataQR[col][j-1];
double v = normsCol[col] -= e*e;
if( v < 0 ) {
foundNegative = true;
break;
}
}
// if a negative sum has been found then clearly too much precision has been lost
// and it should recompute the column norms from scratch
if( foundNegative ) {
for( int col = j; col < numCols; col++ ) {
double u[] = dataQR[col];
double actual = 0;
for( int i=j; i < numRows; i++ ) {
double v = u[i];
actual += v*v;
}
normsCol[col] = actual;
}
}
} | [
"Performs an efficient update of each columns' norm"
] | [
"Processes the template for all index descriptors 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\"",
"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",
"Return the knot at a given position.\n@param x the position\n@return the knot number, or 1 if no knot found",
"Displays a localized warning.\n@param caption the caption of the warning.\n@param description the description of the warning.",
"Saves the messages for all languages that were opened in the editor.\n\n@throws CmsException thrown if saving fails.",
"Infer app name from entry class\n\n@param entryClass\nthe entry class\n@return\napp name inferred from the entry class",
"Convert a Throwable into a list containing all of its causes.\n@param t The throwable for which the causes are to be returned.\n@return A (possibly empty) list of {@link Throwable}s.",
"Retrieve URL without parameters\n\n@param sourceURI source URI\n@return URL without parameters",
"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."
] |
private void allInput(List<FileModel> vertices, GraphRewrite event, ParameterStore store)
{
if (StringUtils.isBlank(getInputVariablesName()) && this.filenamePattern == null)
{
FileService fileModelService = new FileService(event.getGraphContext());
for (FileModel fileModel : fileModelService.findAll())
{
vertices.add(fileModel);
}
}
} | [
"Generating the input vertices is quite complex. Therefore there are multiple methods that handles the input vertices\nbased on the attribute specified in specific order. This method generates all the vertices if there is no other way how to handle\nthe input."
] | [
"Returns the name of the current member which is the name in the case of a field, or the property name for an\naccessor method.\n\n@return The member name\n@exception XDocletException if an error occurs",
"Get a timer of the given string name and todos for the current thread. If\nno such timer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@return timer",
"Read the header from the Phoenix file.\n\n@param stream input stream\n@return raw header data",
"Returns the instance.\n@return InterceptorFactory",
"Query zipcode from Yahoo to find associated WOEID",
"Removes elements from begin to end from the list, inclusive. Returns a new list which\nis composed of the removed elements",
"Add calendars to the tree.\n\n@param parentNode parent tree node\n@param file calendar container",
"Rollback the last applied patch.\n\n@param contentPolicy the content policy\n@param resetConfiguration whether to reset the configuration\n@param modification the installation modification\n@return the patching result\n@throws PatchingException",
"Set an enterprise text value.\n\n@param index text index (1-40)\n@param value text value"
] |
public static base_responses delete(nitro_service client, String network[]) throws Exception {
base_responses result = null;
if (network != null && network.length > 0) {
route6 deleteresources[] = new route6[network.length];
for (int i=0;i<network.length;i++){
deleteresources[i] = new route6();
deleteresources[i].network = network[i];
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | [
"Use this API to delete route6 resources of given names."
] | [
"Perform the entire sort operation",
"2-D Complex Gabor function.\n\n@param x X axis coordinate.\n@param y Y axis coordinate.\n@param wavelength Wavelength.\n@param orientation Orientation.\n@param phaseOffset Phase offset.\n@param gaussVariance Gaussian variance.\n@param aspectRatio Aspect ratio.\n@return Gabor response.",
"Use this API to unset the properties of systemuser resources.\nProperties that need to be unset are specified in args array.",
"Use this API to update nd6ravariables resources.",
"Searches the type and its sub types for the nearest ojb-persistent type and returns its name.\n\n@param type The type to search\n@return The qualified name of the found type or <code>null</code> if no type has been found",
"Removes the task from the specified project. The task will still exist\nin the system, but it will not be in the project anymore.\n\nReturns an empty data block.\n\n@param task The task to remove from a project.\n@return Request object",
"delete topic never used\n\n@param topic topic name\n@param password password\n@return number of partitions deleted\n@throws IOException if an I/O error",
"Find the number of Strings matched to the given Matcher.\n\n@param matcher a Matcher\n@return int the number of Strings matched to the given matcher.\n@since 1.0",
"Use this API to convert sslpkcs12."
] |
public static base_responses Import(nitro_service client, sslfipskey resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslfipskey Importresources[] = new sslfipskey[resources.length];
for (int i=0;i<resources.length;i++){
Importresources[i] = new sslfipskey();
Importresources[i].fipskeyname = resources[i].fipskeyname;
Importresources[i].key = resources[i].key;
Importresources[i].inform = resources[i].inform;
Importresources[i].wrapkeyname = resources[i].wrapkeyname;
Importresources[i].iv = resources[i].iv;
Importresources[i].exponent = resources[i].exponent;
}
result = perform_operation_bulk_request(client, Importresources,"Import");
}
return result;
} | [
"Use this API to Import sslfipskey resources."
] | [
"Flag that the processor has completed execution.\n\n@param processorGraphNode the node that has finished.",
"Returns a resource wrapper created from the input.\n\nThe wrapped result of {@link #convertRawResource(CmsObject, Object)} is returned.\n\n@param cms the current OpenCms user context\n@param input the input to create a resource from\n\n@return a resource wrapper created from the given Object\n\n@throws CmsException in case of errors accessing the OpenCms VFS for reading the resource",
"Build control archive of the deb\n\n@param packageControlFile the package control file\n@param controlFiles the other control information files (maintainer scripts, etc)\n@param dataSize the size of the installed package\n@param checksums the md5 checksums of the files in the data archive\n@param output\n@return\n@throws java.io.FileNotFoundException\n@throws java.io.IOException\n@throws java.text.ParseException",
"Save the current file as the given type.\n\n@param file target file\n@param type file type",
"Use this API to fetch lbmonitor_binding resource of given name .",
"Resend the confirmation for a user to the given email.\n\n@param email the email of the user.\n@return A {@link Task} that completes when the resend request completes/fails.",
"Set the week day.\n@param weekDayStr the week day to set.",
"Removes the duplicate node list.\n\n@param list\nthe list\n@return the int",
"Option check, forwards options to the standard doclet, if that one refuses them,\nthey are sent to UmlGraph"
] |
public static boolean isArray(Type type) {
return (type instanceof GenericArrayType) || (type instanceof Class<?> && ((Class<?>) type).isArray());
} | [
"Determines whether the given type is an array type.\n\n@param type the given type\n@return true if the given type is a subclass of java.lang.Class or implements GenericArrayType"
] | [
"Set the end type as derived from other values.",
"Use this API to fetch gslbsite resource of given name .",
"Compute the location of the generated file from the given trace file.",
"Re-initializes the shader texture used to fill in\nthe Circle upon drawing.",
"Detect numbers using comma as a decimal separator and replace with period.\n\n@param value original numeric value\n@return corrected numeric value",
"Un-serialize a Json into Module\n@param module String\n@return Module\n@throws IOException",
"Returns the list of Solr fields a search result must have to initialize the gallery search result correctly.\n@return the list of Solr fields.",
"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",
"Reads a command \"tag\" from the request."
] |
private Resolvable createMetadataProvider(Class<?> rawType) {
Set<Type> types = Collections.<Type>singleton(rawType);
return new ResolvableImpl(rawType, types, declaringBean, qualifierInstances, delegate);
} | [
"just as facade but we keep the qualifiers so that we can recognize Bean from @Intercepted Bean."
] | [
"Adds folders to perform the search in.\n@param folders Folders to search in.",
"When the JRField needs properties, use this method.\n@param propertyName\n@param value\n@return",
"Remove all existing subscriptions",
"Returns s if it's at most maxWidth chars, otherwise chops right side to fit.",
"Compute 1-dimensional Perlin noise.\n@param x the x value\n@return noise value at x in the range -1..1",
"Convert a field value to something suitable to be stored in the database.",
"Return a copy of the new fragment and set the variable above.",
"Returns if this maps the specified cell.\n\n@param cell the cell name\n@return {@code true} if this maps the column, {@code false} otherwise",
"Stop listening for device announcements. Also discard any announcements which had been received, and\nnotify any registered listeners that those devices have been lost."
] |
@Override
public void onBrowserEvent(Event event) {
super.onBrowserEvent(event);
switch (DOM.eventGetType(event)) {
case Event.ONMOUSEUP:
Event.releaseCapture(m_slider.getElement());
m_capturedMouse = false;
break;
case Event.ONMOUSEDOWN:
Event.setCapture(m_slider.getElement());
m_capturedMouse = true;
//$FALL-THROUGH$
case Event.ONMOUSEMOVE:
if (m_capturedMouse) {
event.preventDefault();
float x = ((event.getClientX() - (m_colorUnderlay.getAbsoluteLeft())) + Window.getScrollLeft());
float y = ((event.getClientY() - (m_colorUnderlay.getAbsoluteTop())) + Window.getScrollTop());
if (m_parent != null) {
m_parent.onMapSelected(x, y);
}
setSliderPosition(x, y);
}
//$FALL-THROUGH$
default:
}
} | [
"Fired whenever a browser event is received.\n@param event Event to process"
] | [
"Used to read the domain model when a slave host connects to the DC\n\n@param transformers the transformers for the host\n@param transformationInputs parameters for the transformation\n@param ignoredTransformationRegistry registry of resources ignored by the transformation target\n@param domainRoot the root resource for the domain resource tree\n@return a read master domain model util instance",
"returns all methods not in the group\n\n@param groupId Id of group\n@return List of Methods for a group\n@throws Exception exception",
"Create a Renderer getting a copy from the prototypes collection.\n\n@param content to render.\n@param parent used to inflate the view.\n@return a new renderer.",
"Open the event stream\n\n@return true if successfully opened, false if not",
"Set the property on the given object to the new value.\n\n@param object on which to set the property\n@param newValue the new value of the property\n@throws RuntimeException if the property could not be set",
"Find a column by its name\n\n@param columnName the name of the column\n@return the given Column, or <code>null</code> if not found",
"This method is called to alert project listeners to the fact that\na resource has been read from a project file.\n\n@param resource resource instance",
"Find a toBuilder method, if the user has provided one.",
"Checks if the specified bytecode version string represents a JDK 1.5+ compatible\nbytecode version.\n@param bytecodeVersion the bytecode version string (1.4, 1.5, 1.6, 1.7 or 1.8)\n@return true if the bytecode version is JDK 1.5+"
] |
public static void configureLogging() {
// Create the appender that will write log messages to the console.
ConsoleAppender consoleAppender = new ConsoleAppender();
// Define the pattern of log messages.
// Insert the string "%c{1}:%L" to also show class name and line.
String pattern = "%d{yyyy-MM-dd HH:mm:ss} %-5p - %m%n";
consoleAppender.setLayout(new PatternLayout(pattern));
// Change to Level.ERROR for fewer messages:
consoleAppender.setThreshold(Level.INFO);
consoleAppender.activateOptions();
Logger.getRootLogger().addAppender(consoleAppender);
} | [
"Defines how messages should be logged. This method can be modified to\nrestrict the logging messages that are shown on the console or to change\ntheir formatting. See the documentation of Log4J for details on how to do\nthis."
] | [
"Generated the report.",
"Indicates if a set of types are all proxyable\n\n@param types The types to test\n@return True if proxyable, false otherwise",
"Create a random permutation of the numbers 0, ..., size - 1.\n\nsee Algorithm P, D.E. Knuth: The Art of Computer Programming, Vol. 2, p. 145",
"Post the specified photo to a blog. Note that the Photo.title and Photo.description are used for the blog entry title and body respectively.\n\n@param photo\nThe photo metadata\n@param blogId\nThe blog ID\n@param blogPassword\nThe blog password\n@throws FlickrException",
"Store the given data and return a uuid for later retrieval of the data\n\n@param data\n@return unique id for the stored data",
"Used by dataformats if they need to load a class\n\n@param classname the name of the\n@param dataFormat\n@return",
"Read a long int from a byte array.\n\n@param data byte array\n@param offset start offset\n@return long value",
"Sets the protocol.\n@param protocol The protocol to be set.",
"Get a collection of methods declared on this object by method name and parameter count.\n\n@param name the name of the method\n@param paramCount the number of parameters\n@return the (possibly empty) collection of methods with the given name and parameter count"
] |
public double inverseCumulativeDistribution(double x) {
double p = Math.exp(-lambda);
double dp = p;
int k = 0;
while(x > p) {
k++;
dp *= lambda / k;
p += dp;
}
return k;
} | [
"Return the inverse cumulative distribution function at x.\n\n@param x Argument\n@return Inverse cumulative distribution function at x."
] | [
"Validations specific to PUT",
"Scans all Forge addons for classes accepted by given filter.\n\nTODO: Could be refactored - scan() is almost the same.",
"Put the core auto-code algorithm here so an external class can call it",
"Adds the given service provider factory to the set of\nproviders for the service.\n\n@param serviceName\nThe fully qualified name of the service interface.\n@param factory\nA factory for creating a specific type of service\nprovider. May be <tt>null</tt> in which case this\nmethod does nothing.\n@throws IllegalArgumentException if serviceName is <tt>null</tt>",
"1-D Gaussian kernel.\n\n@param size Kernel size (should be odd), [3, 101].\n@return Returns 1-D Gaussian kernel of the specified size.",
"Creates an element that represents a rectangle drawn at the specified coordinates in the page.\n@param x the X coordinate of the rectangle\n@param y the Y coordinate of the rectangle\n@param width the width of the rectangle\n@param height the height of the rectangle\n@param stroke should there be a stroke around?\n@param fill should the rectangle be filled?\n@return the resulting DOM element",
"Removes the supplied marker from the map.\n\n@param marker",
"Returns the log conditional likelihood of the given dataset.\n\n@return The log conditional likelihood of the given dataset.",
"Sets the path name for this ID\n\n@param pathId ID of path\n@param pathName Name of path"
] |
private void setPropertyFilters(String filters) {
this.filterProperties = new HashSet<>();
if (!"-".equals(filters)) {
for (String pid : filters.split(",")) {
this.filterProperties.add(Datamodel
.makeWikidataPropertyIdValue(pid));
}
}
} | [
"Sets the set of property filters based on the given string.\n\n@param filters\ncomma-separates list of property ids, or \"-\" to filter all\nstatements"
] | [
"Returns a sampling of the source at the specified line and column,\nof null if it is unavailable.",
"Post-configure retreival of server engine.",
"Writes the entire remaining contents of the buffer to the channel. May complete in one operation, but the\ndocumentation is vague, so this keeps going until we are sure.\n\n@param buffer the data to be written\n@param channel the channel to which we want to write data\n\n@throws IOException if there is a problem writing to the channel",
"Cancel on target hosts.\n\n@param targetHosts\nthe target hosts\n@return true, if successful",
"Checks to see if the rows of the provided matrix are linearly independent.\n\n@param A Matrix whose rows are being tested for linear independence.\n@return true if linearly independent and false otherwise.",
"Get the URI for the given property in the given context.\n\n@param propertyIdValue\nthe property id for which to create a URI\n@param propertyContext\nthe context for which the URI will be needed\n@return the URI",
"Print an extended attribute currency value.\n\n@param value currency value\n@return string representation",
"Set the on-finish callback.\n\nThe basic {@link GVROnFinish} callback will notify you when the animation\nruns to completion. This is a good time to do things like removing\nnow-invisible objects from the scene graph.\n\n<p>\nThe extended {@link GVROnRepeat} callback will be called after every\niteration of an indefinite (repeat count less than 0) animation, giving\nyou a way to stop the animation when it's not longer appropriate.\n\n@param callback\nA {@link GVROnFinish} or {@link GVROnRepeat} implementation.\n<p>\n<em>Note</em>: Supplying a {@link GVROnRepeat} callback will\n{@linkplain #setRepeatCount(int) set the repeat count} to a\nnegative number. Calling {@link #setRepeatCount(int)} with a\nnon-negative value after setting a {@link GVROnRepeat}\ncallback will effectively convert the callback to a\n{@link GVROnFinish}.\n@return {@code this}, so you can chain setProperty() calls.",
"Checks if the provided artifactQuery is valid\n\n@param artifactQuery ArtifactQuery\n@throws WebApplicationException if the data is corrupted"
] |
public List<CmsProject> getAllAccessibleProjects(CmsObject cms, String ouFqn, boolean includeSubOus)
throws CmsException {
CmsOrganizationalUnit orgUnit = readOrganizationalUnit(cms, ouFqn);
return (m_securityManager.getAllAccessibleProjects(cms.getRequestContext(), orgUnit, includeSubOus));
} | [
"Returns all accessible projects of the given organizational unit.\n\nThat is all projects which are owned by the current user or which are\naccessible for the group of the user.<p>\n\n@param cms the opencms context\n@param ouFqn the fully qualified name of the organizational unit to get projects for\n@param includeSubOus if all projects of sub-organizational units should be retrieved too\n\n@return all <code>{@link org.opencms.file.CmsProject}</code> objects in the organizational unit\n\n@throws CmsException if operation was not successful"
] | [
"Called by the engine to trigger the cleanup at the end of a payload thread.",
"Read custom property definitions for resources.\n\n@param gpResources GanttProject resources",
"Use this API to fetch dnspolicy_dnsglobal_binding resources of given name .",
"Traces the time taken just by the fat client inside Coordinator to\nprocess this request\n\n\n@param operationType\n@param OriginTimeInMs - Original request time in Http Request\n@param RequestStartTimeInMs - Time recorded just before fat client\nstarted processing\n@param ResponseReceivedTimeInMs - Time when Response was received from\nfat client\n@param keyString - Hex denotation of the key(s)\n@param numVectorClockEntries - represents the sum of entries size of all\nvector clocks received in response. Size of a single vector clock\nrepresents the number of entries(nodes) in the vector",
"Joins a collection in a string using a delimiter\n@param col Collection\n@param delim Delimiter\n@return String",
"This may cost twice what it would in the original Map because we have to find\nthe original value for this key.\n\n@param key key with which the specified value is to be associated.\n@param value value to be associated with the specified key.\n@return previous value associated with specified key, or <tt>null</tt>\nif there was no mapping for key. A <tt>null</tt> return can\nalso indicate that the map previously associated <tt>null</tt>\nwith the specified key, if the implementation supports\n<tt>null</tt> values.",
"Sets the appropriate headers to response of this request.\n\n@param response The HttpServletResponse response object.",
"Gets a design document using the id and revision from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@param rev the document revision\n@return {@link DesignDocument}",
"Get result of one of the task that belongs to this task's task group.\n\n@param key the task key\n@param <T> the actual type of the task result\n@return the task result, null will be returned if task has not produced a result yet"
] |
public static wisite_farmname_binding[] get(nitro_service service, String sitepath) throws Exception{
wisite_farmname_binding obj = new wisite_farmname_binding();
obj.set_sitepath(sitepath);
wisite_farmname_binding response[] = (wisite_farmname_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch wisite_farmname_binding resources of given name ."
] | [
"Creates a code location URL from a file path\n\n@param filePath the file path\n@return A URL created from File\n@throws InvalidCodeLocation if URL creation fails",
"Start the operation by instantiating the first job instance in a separate Thread.\n\n@param arguments {@inheritDoc}",
"generate a message for loglevel INFO\n\n@param pObject the message Object",
"Get a list of all methods.\n\n@return The method names\n@throws FlickrException",
"Retrieves the monthly or yearly relative day of the week.\n\n@return day of the week",
"Convenience extension, to generate traced code.",
"Select a List of characters from a CharSequence using a Collection\nto identify the indices to be selected.\n\n@param self a CharSequence\n@param indices a Collection of indices\n@return a String consisting of the characters at the given indices\n@since 1.0",
"Specifies the container object class to be instantiated\n\n@param containerObjectClass\ncontainer object class to be instantiated\n\n@return the current builder instance",
"Assembles an avro format string that contains multiple fat client configs\nfrom map of store to properties\n\n@param mapStoreToProps A map of store names to their properties\n@return Avro string that contains multiple store configs"
] |
public Weld addPackage(boolean scanRecursively, Class<?> packageClass) {
packages.add(new PackInfo(packageClass, scanRecursively));
return this;
} | [
"A package of the specified class will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClass\n@return self"
] | [
"Load a list of entities using the information in the context\n\n@param session The session\n@param lockOptions The locking details\n@param ogmContext The context with the information to load the entities\n@return the list of entities corresponding to the given context",
"Returns the title according to the given locale.\n@param locale the locale for which the title should be read.\n@return the title according to the given locale",
"Process the graphical indicator data.",
"Remember execution time for all executed suites.",
"Use this API to fetch lbvserver_scpolicy_binding resources of given name .",
"Given a Task instance, this task determines if it should be written to the\nPM XML file as an activity or as a WBS item, and calls the appropriate\nmethod.\n\n@param task Task instance",
"Pauses the playback of a sound.",
"Get the SPIProviderResolver instance using the provided classloader for lookup\n\n@param cl classloader to use for lookup\n@return instance of this class",
"Returns all the deployment runtime names associated with an overlay accross all server groups.\n\n@param context the current OperationContext.\n@param overlay the name of the overlay.\n@return all the deployment runtime names associated with an overlay accross all server groups."
] |
public final void end() {
final Thread thread = threadRef;
if (thread != null) {
thread.interrupt();
try {
thread.join();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
this.threadRef = null;
} | [
"Stops the scavenger."
] | [
"gets a class from the class cache. This cache contains only classes loaded through\nthis class loader or an InnerLoader instance. If no class is stored for a\nspecific name, then the method should return null.\n\n@param name of the class\n@return the class stored for the given name\n@see #removeClassCacheEntry(String)\n@see #setClassCacheEntry(Class)\n@see #clearCache()",
"Removes the value from the Collection mapped to by this key, leaving the\nrest of the collection intact.\n\n@param key\nthe key to the Collection to remove the value from\n@param value\nthe value to remove",
"Overridden to add transform.",
"Fetch the next event from a given stream\n@return the next event\n@throws IOException any io exception that could occur",
"Helper method to check if log4j is already configured",
"Takes a numeric string value and converts it to a integer between 0 and 100.\n\nreturns 0 if the string is not numeric.\n\n@param percentage - A numeric string value\n@return a integer between 0 and 100",
"Use this API to fetch dnstxtrec resources of given names .",
"Receive a notification that the channel was closed.\n\nThis is used for the {@link ManagementClientChannelStrategy.Establishing} since it might use multiple channels.\n\n@param closed the closed resource\n@param e the exception which occurred during close, if any",
"Trade the request token for an access token, this is step three of authorization.\n@param oAuthRequestToken\nthis is the token returned by the {@link AuthInterface#getRequestToken} call.\n@param verifier"
] |
private void processCurrency(Row row)
{
String currencyName = row.getString("curr_short_name");
DecimalFormatSymbols symbols = new DecimalFormatSymbols();
symbols.setDecimalSeparator(row.getString("decimal_symbol").charAt(0));
symbols.setGroupingSeparator(row.getString("digit_group_symbol").charAt(0));
DecimalFormat nf = new DecimalFormat();
nf.setDecimalFormatSymbols(symbols);
nf.applyPattern("#.#");
m_currencyMap.put(currencyName, nf);
if (currencyName.equalsIgnoreCase(m_defaultCurrencyName))
{
m_numberFormat = nf;
m_defaultCurrencyData = row;
}
} | [
"Process a currency definition.\n\n@param row record from XER file"
] | [
"Processes the template for all reference definitions 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 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",
"Plots the MSD curve for trajectory t\n@param t Trajectory to calculate the msd curve\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param msdeval Evaluates the mean squared displacment",
"Reads OAuth 2.0 with JWT app configurations from the reader. The file should be in JSON format.\n\n@param reader a reader object which points to a JSON formatted configuration file\n@return a new Instance of BoxConfig\n@throws IOException when unable to access the mapping file's content of the reader",
"Counts the number of documents in the collection.\n\n@return a task containing the number of documents in the collection",
"returns the total count of objects in the GeneralizedCounter.",
"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.",
"Creates a field map for resources.\n\n@param props props data",
"Sets the initial pivot ordering and compute the F-norm squared for each column"
] |
public T create(BeanInstance beanInstance) {
final T proxy = (System.getSecurityManager() == null) ? run() : AccessController.doPrivileged(this);
((ProxyObject) proxy).weld_setHandler(new ProxyMethodHandler(contextId, beanInstance, bean));
return proxy;
} | [
"Method to create a new proxy that wraps the bean instance.\n\n@param beanInstance the bean instance\n@return a new proxy object"
] | [
"should not be public",
"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",
"Method must be invoked upon completion of a rebalancing task. It is the\ntask's responsibility to do so.\n\n@param stealerId\n@param donorId",
"Helper method to create a Dao object without having to define a class. Dao classes are supposed to be convenient\nbut if you have a lot of classes, they can seem to be a pain.\n\n<p>\n<b>NOTE:</b> You should use {@link DaoManager#createDao(ConnectionSource, DatabaseTableConfig)} instead of this\nmethod so you won't have to create the DAO multiple times.\n</p>",
"Return true if the processor of the node is currently being executed.\n\n@param processorGraphNode the node to test.",
"Execute JavaScript in the browser.\n\n@param code The code to execute.\n@return The return value of the JavaScript.\n@throws CrawljaxException when javascript execution failed.",
"Looks for sequences of integer lists and combine them into one big sequence",
"Use this API to add sslocspresponder resources.",
"this method is basically checking whether we can return \"this\" for getNetworkSection"
] |
public final static int readXMLUntil(final StringBuilder out, final String in, final int start, final char... end)
{
int pos = start;
boolean inString = false;
char stringChar = 0;
while (pos < in.length())
{
final char ch = in.charAt(pos);
if (inString)
{
if (ch == '\\')
{
out.append(ch);
pos++;
if (pos < in.length())
{
out.append(ch);
pos++;
}
continue;
}
if (ch == stringChar)
{
inString = false;
out.append(ch);
pos++;
continue;
}
}
switch (ch)
{
case '"':
case '\'':
inString = true;
stringChar = ch;
break;
}
if (!inString)
{
boolean endReached = false;
for (int n = 0; n < end.length; n++)
{
if (ch == end[n])
{
endReached = true;
break;
}
}
if (endReached)
{
break;
}
}
out.append(ch);
pos++;
}
return (pos == in.length()) ? -1 : pos;
} | [
"Reads characters until any 'end' character is encountered, ignoring\nescape sequences.\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."
] | [
"Returns the curve resulting from the local linear regression with discrete kernel.\n\n@return The regression curve.",
"Use to generate a file based on generator node.",
"Configures a worker pool for the converter.\n\n@param corePoolSize The core pool size of the worker pool.\n@param maximumPoolSize The maximum pool size of the worker pool.\n@param keepAliveTime The keep alive time of the worker pool.\n@param unit The time unit of the specified keep alive time.\n@return This builder instance.",
"Return the name of the current conf set\n@return the conf set name",
"Use this API to fetch sslservicegroup_sslcertkey_binding resources of given name .",
"Get the names of the currently registered format providers.\n\n@return the provider names, never null.",
"Return the discount factor within a given model context for a given maturity.\n@param model The model used as a context (not required for this class).\n@param maturity The maturity in terms of ACT/365 daycount form this curve reference date. Note that this parameter might get rescaled to a different time parameter.\n@see net.finmath.marketdata.model.curves.DiscountCurveInterface#getDiscountFactor(net.finmath.marketdata.model.AnalyticModelInterface, double)",
"Determines if a point is inside a box.",
"Checks the second, hour, month, day, month and year are equal."
] |
public static Module unserializeModule(final String module) throws IOException {
final ObjectMapper mapper = new ObjectMapper();
mapper.disable(MapperFeature.USE_GETTERS_AS_SETTERS);
return mapper.readValue(module, Module.class);
} | [
"Un-serialize a Json into Module\n@param module String\n@return Module\n@throws IOException"
] | [
"Return as a string the tagged values associated with c\n@param opt the Options used to guess font names\n@param c the Doc entry to look for @tagvalue\n@param prevterm the termination string for the previous element\n@param term the termination character for each tagged value",
"URLEncode a string\n@param s\n@return",
"Calculates the world matrix based on the local matrix.",
"Returns an English label for a given datatype.\n\n@param datatype\nthe datatype to label\n@return the label",
"Write notes.\n\n@param recordNumber record number\n@param text note text\n@throws IOException",
"Process any StepEvent. You can change last added to stepStorage\nstep using this method.\n\n@param event to process",
"Pushes a basic event.\n\n@param eventName The name of the event",
"Return the releaseId\n\n@return releaseId",
"Parses the comma delimited address into model nodes.\n\n@param profileName the profile name for the domain or {@code null} if not a domain\n@param inputAddress the address.\n\n@return a collection of the address nodes."
] |
public final void notifyFooterItemMoved(int fromPosition, int toPosition) {
if (fromPosition < 0 || toPosition < 0 || fromPosition >= footerItemCount || toPosition >= footerItemCount) {
throw new IndexOutOfBoundsException("The given fromPosition " + fromPosition
+ " or toPosition " + toPosition + " is not within the position bounds for footer items [0 - "
+ (footerItemCount - 1) + "].");
}
notifyItemMoved(fromPosition + headerItemCount + contentItemCount, toPosition + headerItemCount + contentItemCount);
} | [
"Notifies that an existing footer item is moved to another position.\n\n@param fromPosition the original position.\n@param toPosition the new position."
] | [
"If users want to implement clone on all their objects, we can use this\nto make copies. This is hazardous as user may mess it up, but it is also\npotentially the fastest way of making a copy.\n\nUsually the OjbCloneable interface should just be delegating to the clone()\noperation that the user has implemented.\n\n@see org.apache.ojb.otm.copy.ObjectCopyStrategy#copy(Object)",
"Checks if a property's type is valid to be included in the report.\n@param _property the property.\n@return true if the property is is of a valid type.",
"Use this API to add autoscaleaction.",
"Get a property as a string or throw an exception.\n\n@param key the property name",
"overridden in ipv6 to handle zone",
"Visit this and all child nodes.\n\n@param visitor The visitor to use.",
"Inserts a CharSequence value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a CharSequence, or null\n@return this bundler instance to chain method calls",
"Compares two annotated parameters and returns true if they are equal",
"Parses a String comprised of 0 or more comma-delimited key=value pairs.\n\n@param s the string to parse\n@return the Map of parsed key value pairs"
] |
public static AccrueType getInstance(String type, Locale locale)
{
AccrueType result = null;
String[] typeNames = LocaleData.getStringArray(locale, LocaleData.ACCRUE_TYPES);
for (int loop = 0; loop < typeNames.length; loop++)
{
if (typeNames[loop].equalsIgnoreCase(type) == true)
{
result = AccrueType.getInstance(loop + 1);
break;
}
}
if (result == null)
{
result = AccrueType.PRORATED;
}
return (result);
} | [
"This method takes the textual version of an accrue type name\nand populates the class instance appropriately. Note that unrecognised\nvalues are treated as \"Prorated\".\n\n@param type text version of the accrue type\n@param locale target locale\n@return AccrueType class instance"
] | [
"Returns a list of objects for each line in the spreadsheet, of the specified type.\n\n<p>\nIf the class is a view model then the objects will be properly instantiated (that is, using\n{@link DomainObjectContainer#newViewModelInstance(Class, String)}, with the correct\nview model memento); otherwise the objects will be simple transient objects (that is, using\n{@link DomainObjectContainer#newTransientInstance(Class)}).\n</p>",
"return a prepared Insert Statement fitting for the given ClassDescriptor",
"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.",
"set the textColor of the ColorHolder to an drawable\n\n@param ctx\n@param drawable",
"Read an optional int value form a JSON value.\n@param val the JSON value that should represent the int.\n@return the int from the JSON or 0 reading the int fails.",
"Ignore some element from the AST\n\n@param element\n@return",
"Attaches meta info about the current state of the device to an event.\nTypically, this meta is added only to the ping event.",
"This method is called to alert project listeners to the fact that\na resource assignment has been written to a project file.\n\n@param resourceAssignment resourceAssignment instance",
"Split input text into sentences.\n\n@param text Input text.\n@return List of Sentence objects."
] |
protected void _format(EObject obj, IFormattableDocument document) {
for (EObject child : obj.eContents())
document.format(child);
} | [
"Fall-back for types that are not handled by a subclasse's dispatch method."
] | [
"If directory doesn't exists try to create it.\n\n@param directory given directory to check\n@throws ReportGenerationException if can't create specified directory",
"if you want to convert some string to an object, you have an argument to parse",
"Set the weeks of the month the events should occur.\n@param weeksOfMonth the weeks of month to set (first to fifth, where fifth means last).",
"Resolves current full path with .yml and .yaml extensions\n\n@param fullpath\nwithout extension.\n\n@return Path of existing definition or null",
"Use this API to fetch all the systemsession resources that are configured on netscaler.",
"This method retrieves the UID for a calendar associated with a task.\n\n@param mpx MPX Task instance\n@return calendar UID",
"Tries to load the custom error page at the given rootPath.\n@param cms {@link CmsObject} used for reading the resource (site root and uri get adjusted!)\n@param req the current request\n@param res the current response\n@param rootPath the VFS root path to the error page resource\n@return a flag, indicating if the error page could be loaded",
"This method extracts data for a single resource from a Planner file.\n\n@param plannerResource Resource data",
"do delete given object. Should be used by all intern classes to delete\nobjects."
] |
public static base_response add(nitro_service client, vpnsessionaction resource) throws Exception {
vpnsessionaction addresource = new vpnsessionaction();
addresource.name = resource.name;
addresource.httpport = resource.httpport;
addresource.winsip = resource.winsip;
addresource.dnsvservername = resource.dnsvservername;
addresource.splitdns = resource.splitdns;
addresource.sesstimeout = resource.sesstimeout;
addresource.clientsecurity = resource.clientsecurity;
addresource.clientsecuritygroup = resource.clientsecuritygroup;
addresource.clientsecuritymessage = resource.clientsecuritymessage;
addresource.clientsecuritylog = resource.clientsecuritylog;
addresource.splittunnel = resource.splittunnel;
addresource.locallanaccess = resource.locallanaccess;
addresource.rfc1918 = resource.rfc1918;
addresource.spoofiip = resource.spoofiip;
addresource.killconnections = resource.killconnections;
addresource.transparentinterception = resource.transparentinterception;
addresource.windowsclienttype = resource.windowsclienttype;
addresource.defaultauthorizationaction = resource.defaultauthorizationaction;
addresource.authorizationgroup = resource.authorizationgroup;
addresource.clientidletimeout = resource.clientidletimeout;
addresource.proxy = resource.proxy;
addresource.allprotocolproxy = resource.allprotocolproxy;
addresource.httpproxy = resource.httpproxy;
addresource.ftpproxy = resource.ftpproxy;
addresource.socksproxy = resource.socksproxy;
addresource.gopherproxy = resource.gopherproxy;
addresource.sslproxy = resource.sslproxy;
addresource.proxyexception = resource.proxyexception;
addresource.proxylocalbypass = resource.proxylocalbypass;
addresource.clientcleanupprompt = resource.clientcleanupprompt;
addresource.forcecleanup = resource.forcecleanup;
addresource.clientoptions = resource.clientoptions;
addresource.clientconfiguration = resource.clientconfiguration;
addresource.sso = resource.sso;
addresource.ssocredential = resource.ssocredential;
addresource.windowsautologon = resource.windowsautologon;
addresource.usemip = resource.usemip;
addresource.useiip = resource.useiip;
addresource.clientdebug = resource.clientdebug;
addresource.loginscript = resource.loginscript;
addresource.logoutscript = resource.logoutscript;
addresource.homepage = resource.homepage;
addresource.icaproxy = resource.icaproxy;
addresource.wihome = resource.wihome;
addresource.citrixreceiverhome = resource.citrixreceiverhome;
addresource.wiportalmode = resource.wiportalmode;
addresource.clientchoices = resource.clientchoices;
addresource.epaclienttype = resource.epaclienttype;
addresource.iipdnssuffix = resource.iipdnssuffix;
addresource.forcedtimeout = resource.forcedtimeout;
addresource.forcedtimeoutwarning = resource.forcedtimeoutwarning;
addresource.ntdomain = resource.ntdomain;
addresource.clientlessvpnmode = resource.clientlessvpnmode;
addresource.emailhome = resource.emailhome;
addresource.clientlessmodeurlencoding = resource.clientlessmodeurlencoding;
addresource.clientlesspersistentcookie = resource.clientlesspersistentcookie;
addresource.allowedlogingroups = resource.allowedlogingroups;
addresource.securebrowse = resource.securebrowse;
addresource.storefronturl = resource.storefronturl;
addresource.kcdaccount = resource.kcdaccount;
return addresource.add_resource(client);
} | [
"Use this API to add vpnsessionaction."
] | [
"Sets the right padding character for all cells in the table.\n@param paddingRightChar new padding character, ignored if null\n@return this to allow chaining",
"Signals that the processor to finish and waits until it finishes.",
"Filter event if word occurs in wordsToFilter.\n\n@param event the event\n@return true, if successful",
"Un-serialize a Json into Module\n@param module String\n@return Module\n@throws IOException",
"Parse a filter expression.\n\n@param filter the filter expression\n@return compiled nodes",
"private HttpServletResponse headers;",
"Sets the name of the designated bone.\n\n@param boneindex zero based index of bone to rotate.\n@param bonename string with name of bone.\n. * @see #getBoneName",
"Scans the jar file and returns the paths that match the includes and excludes.\n\n@return A List of paths\n@throws An IllegalStateException when an I/O error occurs in reading the jar file.",
"Create an MD5 hash of a string.\n\n@param input Input string.\n@return Hash of input.\n@throws IllegalArgumentException if {@code input} is blank."
] |
@SuppressWarnings("serial")
private Component createCloseButton() {
Button closeBtn = CmsToolBar.createButton(
FontOpenCms.CIRCLE_INV_CANCEL,
m_messages.key(Messages.GUI_BUTTON_CANCEL_0));
closeBtn.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
closeAction();
}
});
return closeBtn;
} | [
"Create the close button UI Component.\n@return the close button."
] | [
"Use this API to add vpnsessionaction.",
"Reads a \"date-time\" argument from the request.",
"Create and register the declaration of class D with the given metadata.\n\n@param metadata the metadata to create the declaration\n@return the created declaration of class D",
"Calls the specified Stitch function, and decodes the response into an instance of the specified\ntype. The response will be decoded using the codec registry given.\n\n@param name the name of the Stitch function to call.\n@param args the arguments to pass to the Stitch function.\n@param requestTimeout the number of milliseconds the client should wait for a response from the\nserver before failing with an error.\n@param resultClass the class that the Stitch response should be decoded as.\n@param <T> the type into which the Stitch response will be decoded.\n@param codecRegistry the codec registry that will be used to encode/decode the function call.\n@return the decoded value.",
"Removes the task from the specified project. The task will still exist\nin the system, but it will not be in the project anymore.\n\nReturns an empty data block.\n\n@param task The task to remove from a project.\n@return Request object",
"Use this API to fetch sslcipher_individualcipher_binding resources of given name .",
"Add a point to this curveFromInterpolationPoints. The method will throw an exception if the point\nis already part of the curveFromInterpolationPoints.\n\n@param time The x<sub>i</sub> in <sub>i</sub> = f(x<sub>i</sub>).\n@param value The y<sub>i</sub> in <sub>i</sub> = f(x<sub>i</sub>).\n@param isParameter If true, then this point is served via {@link #getParameter()} and changed via {@link #getCloneForParameter(RandomVariable[])}, i.e., it can be calibrated.",
"Find the length of the block starting from 'start'.",
"Draw the specified geometry.\n\n@param geometry geometry to draw\n@param symbol symbol for geometry\n@param fillColor fill colour\n@param strokeColor stroke colour\n@param lineWidth line width\n@param clipRect clipping rectangle"
] |
private static void readAndAddDocumentsFromStream(
final SolrClient client,
final String lang,
final InputStream is,
final List<SolrInputDocument> documents,
final boolean closeStream) {
final BufferedReader br = new BufferedReader(new InputStreamReader(is));
try {
String line = br.readLine();
while (null != line) {
final SolrInputDocument document = new SolrInputDocument();
// Each field is named after the schema "entry_xx" where xx denotes
// the two digit language code. See the file spellcheck/conf/schema.xml.
document.addField("entry_" + lang, line);
documents.add(document);
// Prevent OutOfMemoryExceptions ...
if (documents.size() >= MAX_LIST_SIZE) {
addDocuments(client, documents, false);
documents.clear();
}
line = br.readLine();
}
} catch (IOException e) {
LOG.error("Could not read spellcheck dictionary from input stream.");
} catch (SolrServerException e) {
LOG.error("Error while adding documents to Solr server. ");
} finally {
try {
if (closeStream) {
br.close();
}
} catch (Exception e) {
// Nothing to do here anymore ....
}
}
} | [
"Parses the dictionary from an InputStream.\n\n@param client The SolrClient instance object.\n@param lang The language of the dictionary.\n@param is The InputStream object.\n@param documents List to put the assembled SolrInputObjects into.\n@param closeStream boolean flag that determines whether to close the inputstream\nor not."
] | [
"Call the Coverage Task.",
"Returns timezone offset from a session instance. The offset is\nin minutes to UTC time\n\n@param session\nthe session instance\n@return the offset to UTC time in minutes",
"Expands all parents in a range of indices in the list of parents.\n\n@param startParentPosition The index at which to to start expanding parents\n@param parentCount The number of parents to expand",
"Returns first enum constant found..\n\n@param styleName Space-separated list of styles\n@param enumClass Type of enum\n@param defaultValue Default value of no match was found\n@return First enum constant found or default value",
"Say whether this character is an annotation introducing\ncharacter.\n\n@param ch The character to check\n@return Whether it is an annotation introducing character",
"Read an int from the byte array starting at the given offset\n\n@param bytes The byte array to read from\n@param offset The offset to start reading at\n@return The int read",
"Sum of the elements.\n\n@param data Data.\n@return Sum(data).",
"Remove any protocol-level headers from the clients request that\ndo not apply to the new request we are sending to the remote server.\n\n@param request\n@param destination",
"Get the primitive attributes for the associated object.\n\n@return attributes for associated objects\n@deprecated replaced by {@link #getAllAttributes()} after introduction of nested associations"
] |
public void setValue(int numStrings, String[] newValues) {
value.clear();
if (numStrings == newValues.length) {
for (int i = 0; i < newValues.length; i++) {
value.add(newValues[i]);
}
}
else {
Log.e(TAG, "X3D MFString setValue() numStrings not equal total newValues");
}
} | [
"Assign a new value to this field.\n@param numStrings - number of strings\n@param newValues - the new strings"
] | [
"Check if the current node is part of routing request based on cluster.xml\nor throw an exception.\n\n@param key The key we are checking\n@param routingStrategy The routing strategy\n@param currentNode Current node",
"Update the central directory signature of a .jar.\n\n@param file the file to process\n@param searchPattern the search patter to use\n@param badSkipBytes the bad bytes skip table\n@param newSig the new signature\n@param endSig the expected signature\n@throws IOException",
"Returns a new created connection\n\n@param jcd the connection descriptor\n@return an instance of Connection from the drivermanager",
"Given the current and final cluster dumps it into the output directory\n\n@param currentCluster Initial cluster metadata\n@param finalCluster Final cluster metadata\n@param outputDirName Output directory where to dump this file\n@throws IOException",
"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",
"Use this API to fetch a tmglobal_tmsessionpolicy_binding resources.",
"Sums up the square of each element in the matrix. This is equivalent to the\nFrobenius norm squared.\n\n@param m Matrix.\n@return Sum of elements squared.",
"Returns true if the activity is a milestone.\n\n@param activity Phoenix activity\n@return true if the activity is a milestone",
"Use this API to fetch ipset_nsip6_binding resources of given name ."
] |
public String nstring(ImapRequestLineReader request) throws ProtocolException {
char next = request.nextWordChar();
switch (next) {
case '"':
return consumeQuoted(request);
case '{':
return consumeLiteral(request);
default:
String value = atom(request);
if ("NIL".equals(value)) {
return null;
} else {
throw new ProtocolException("Invalid nstring value: valid values are '\"...\"', '{12} CRLF *CHAR8', and 'NIL'.");
}
}
} | [
"Reads an argument of type \"nstring\" from the request."
] | [
"Read file content to string.\n\n@param filePath\nthe file path\n@return the string\n@throws IOException\nSignals that an I/O exception has occurred.",
"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.",
"Use this API to disable clusterinstance of given name.",
"Computes the null space using QR decomposition. This is much faster than using SVD\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space",
"Creates a metadata cache archive file of all tracks in the specified slot on the specified player. Any\nprevious contents of the specified file will be replaced.\n\n@param slot the slot in which the media to be cached can be found\n@param playlistId the id of playlist to be cached, or 0 of all tracks should be cached\n@param cache the file into which the metadata cache should be written\n\n@throws Exception if there is a problem communicating with the player or writing the cache file.",
"Convenience method dispatches the specified event to the source appender,\nwhich will result in the custom event data being appended to the new file.\n\n@param customLoggingEvent\nThe custom Log4J event to be appended.",
"This implementation checks whether a File can be opened,\nfalling back to whether an InputStream can be opened.\nThis will cover both directories and content resources.",
"Generates a column for the given field and adds it to the table.\n\n@param fieldDef The field\n@param tableDef The table\n@return The column def",
"Add image in the document.\n\n@param context\nPDF context\n@param imageResult\nimage\n@throws BadElementException\nPDF construction problem\n@throws IOException\nPDF construction problem"
] |
public void delete(String photoId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_DELETE);
parameters.put("photo_id", photoId);
// Note: This method requires an HTTP POST request.
Response response = transport.post(transport.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
// This method has no specific response - It returns an empty
// sucess response if it completes without error.
} | [
"Delete a photo from flickr.\n\nThis method requires authentication with 'delete' permission.\n\n@param photoId\n@throws FlickrException"
] | [
"Returns an Object array of all FK field values of the specified object.\nIf the specified object is an unmaterialized Proxy, it will be materialized\nto read the FK values.\n\n@throws MetadataException if an error occours while accessing ForeingKey values on obj",
"This method retrieves ONLY the ROOT actions",
"Gets the status text from given session.\n\n@param lastActivity miliseconds since last activity\n@return status string",
"A simple convinience function that decomposes the matrix but automatically checks the input ti make\nsure is not being modified.\n\n@param decomp Decomposition which is being wrapped\n@param M THe matrix being decomposed.\n@param <T> Matrix type.\n@return If the decomposition was successful or not.",
"Creates a favorite widget for a favorite entry.\n\n@param entry the favorite entry\n@return the favorite widget\n\n@throws CmsException if something goes wrong",
"Remove a partition from the node provided\n\n@param node The node from which we're removing the partition\n@param donatedPartition The partitions to remove\n@return The new node without the partition",
"Retrieve an instance of the ResourceField class based on the data read from an\nMS Project file.\n\n@param value value from an MS Project file\n@return ResourceField instance",
"Returns true if the class node represents a the class node for the Class class\nand if the parametrized type is a neither a placeholder or a wildcard. For example,\nthe class node Class<Foo> where Foo is a class would return true, but the class\nnode for Class<?> would return false.\n@param classNode a class node to be tested\n@return true if it is the class node for Class and its generic type is a real class",
"Try to extract a numeric version from a collection of strings.\n\n@param versionStrings Collection of string properties.\n@return The version string if exists in the collection."
] |
private void logError(LifecycleListener listener, Exception e) {
LOGGER.error("Error for listener " + listener.getClass(), e);
} | [
"This method log given exception in specified listener"
] | [
"Get the literal value for an expression.\n\n@param expression expression\n@return literal value",
"Stores an new entry in the cache.",
"Create a transactional protocol client.\n\n@param channelAssociation the channel handler\n@return the transactional protocol client",
"Specifies the timeout for a network request.\n\n@param timeout The timeout for a network request.\n@param unit The time unit of the specified timeout.\n@return This builder instance.",
"Used to determine if a particular day of the week is normally\na working day.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day Day instance\n@return boolean flag",
"Reconnect the context if the RedirectException is valid.",
"Switches DB type.\n\n@param dbName the database type\n@param webapp the webapp name",
"Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for",
"Determines if entry is accepted. For normal usage, this means confirming that the key is\nneeded. For orphan usage, this simply means confirming the key belongs to the node.\n\n@param key\n@return true iff entry is accepted."
] |
public ListResponse listTemplates(Map<String, Object> options)
throws RequestException, LocalOperationException {
Request request = new Request(this);
return new ListResponse(request.get("/templates", options));
} | [
"Returns a list of all templates under the user account\n\n@param options {@link Map} extra options to send along with the request.\n@return {@link ListResponse}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations."
] | [
"Use this API to fetch all the vpath resources that are configured on netscaler.",
"Connects to the comm port and starts send and receive threads.\n@param serialPortName the port name to open\n@throws SerialInterfaceException when a connection error occurs.",
"Retrieve timephased baseline cost. Note that index 0 represents \"Baseline\",\nindex 1 represents \"Baseline1\" and so on.\n\n@param index baseline index\n@return timephased work, or null if no baseline is present",
"Figure out the starting waveform segment that corresponds to the specified coordinate in the window.\n\n@param x the column being drawn\n\n@return the offset into the waveform at the current scale and playback time that should be drawn there",
"Retrieves the work variance.\n\n@return work variance",
"Emit a event object with parameters and force all listeners to be called asynchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(EventObject, Object...)",
"Calculate start dates for a monthly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Starts this EventStream and begins long polling the API.\n@throws IllegalStateException if the EventStream is already started.",
"This method is used to automatically generate a value\nfor the WBS field of this task.\n\n@param parent Parent Task"
] |
private BigInteger printExtendedAttributeDurationFormat(Object value)
{
BigInteger result = null;
if (value instanceof Duration)
{
result = DatatypeConverter.printDurationTimeUnits(((Duration) value).getUnits(), false);
}
return (result);
} | [
"Converts a duration to duration time units.\n\n@param value duration value\n@return duration time units"
] | [
"Prints a balance analysis to a file.\n\n@param outputDirName\n@param baseFileName suffix '.analysis' is appended to baseFileName.\n@param partitionBalance",
"Readable yyyyMMdd int representation of a day, which is also sortable.",
"Converts a batch indexing into the sample, to a batch indexing into the\noriginal function.\n\n@param batch The batch indexing into the sample.\n@return A new batch indexing into the original function, containing only\nthe indices from the sample.",
"Remove script for a given ID\n\n@param id ID of script\n@throws Exception exception",
"Given a GanttProject priority value, turn this into an MPXJ Priority instance.\n\n@param gpPriority GanttProject priority\n@return Priority instance",
"This method sends the same message to many agents.\n\n@param agent_name\nThe id of the agents that receive the message\n@param msgtype\n@param message_content\nThe content of the message\n@param connector\nThe connector to get the external access",
"Write the given number of bytes out to the array\n\n@param bytes The array to write to\n@param value The value to write from\n@param offset the offset into the array\n@param numBytes The number of bytes to write",
"Used internally to find the solution to a single column vector.",
"Returns code number of Task field supplied.\n\n@param field - name\n@return - code no"
] |
public JSONObject toJson() throws JSONException {
JSONObject result = new JSONObject();
if (m_detailId != null) {
result.put(JSON_DETAIL, "" + m_detailId);
}
if (m_siteRoot != null) {
result.put(JSON_SITEROOT, m_siteRoot);
}
if (m_structureId != null) {
result.put(JSON_STRUCTUREID, "" + m_structureId);
}
if (m_projectId != null) {
result.put(JSON_PROJECT, "" + m_projectId);
}
if (m_type != null) {
result.put(JSON_TYPE, "" + m_type.getJsonId());
}
return result;
} | [
"Converts this object to JSON.\n\n@return the JSON representation\n\n@throws JSONException if JSON operations fail"
] | [
"Return a product descriptor for a specific strike.\n\n@param referenceDate The reference date (translating the maturity floating point date to dates.\n@param index The index corresponding to the strike grid.\n@return a product descriptor for a specific strike.\n@throws ArrayIndexOutOfBoundsException Thrown if index is out of bound.",
"Remove the corresponding object from session AND application cache.",
"Given a list of store definitions return a list of store names\n\n@param storeDefList The list of store definitions\n@return Returns a list of store names",
"Retrieves the registar linked to the bus.\nCreates a new registar is not present.\n\n@param bus\n@return",
"Handling out request.\n\n@param message\nthe message\n@throws Fault\nthe fault",
"Convert an Object of type Class to an Object.",
"Load the layers based on the default setup.\n\n@param jbossHome the jboss home directory\n@param productConfig the product config\n@param repoRoots the repository roots\n@return the available layers\n@throws IOException",
"Get the bone index for the bone with the given name.\n\n@param bonename string identifying the bone whose index you want\n@return 0 based bone index or -1 if bone with that name is not found.",
"Creates a new status update on the project.\n\nReturns the full record of the newly created project status update.\n\n@param project The project on which to create a status update.\n@return Request object"
] |
private void createCodeMappings(MtasTokenIdFactory mtasTokenIdFactory,
Level level, String stringValue, int offsetStart, int offsetEnd,
int realOffsetStart, int realOffsetEnd, List<Integer> codePositions)
throws IOException {
String[] stringValues = MtasPennTreebankReader.createStrings(stringValue,
Pattern.quote(STRING_SPLITTER));
MtasToken token = new MtasTokenString(mtasTokenIdFactory.createTokenId(),
level.node, filterString(stringValues[0].trim()));
token.setOffset(offsetStart, offsetEnd);
token.setRealOffset(realOffsetStart, realOffsetEnd);
token.addPositions(codePositions.stream().mapToInt(i -> i).toArray());
tokenCollection.add(token);
level.tokens.add(token);
} | [
"Creates the code mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param realOffsetStart\nthe real offset start\n@param realOffsetEnd\nthe real offset end\n@param codePositions\nthe code positions\n@throws IOException\nSignals that an I/O exception has occurred."
] | [
"Store a comment based on comment text, gavc and user information\n\n@param gavc - entity id\n@param commentText - comment text\n@param credential - user credentials\n@param entityType - type of the entity",
"Removes the given value to the set.\n\n@return true if the value was actually removed",
"Creates the container for a bundle descriptor.\n@return the container for a bundle descriptor.",
"Constructs a new ClientBuilder for building a CloudantClient instance to connect to the\nCloudant server with the specified account.\n\n@param account the Cloudant account name to connect to e.g. \"example\" is the account name\nfor the \"example.cloudant.com\" endpoint\n@return a new ClientBuilder for the account\n@throws IllegalArgumentException if the specified account name forms an invalid endpoint URL",
"Use this API to Shutdown shutdown.",
"Builds the mapping table.",
"Process the layers.conf file.\n\n@param repoRoot the root\n@return the layers conf\n@throws java.io.IOException",
"Determines the offset code of a forward contract from the name of a forward curve.\nThis method will extract a group of one or more digits together with the first letter behind them, if any.\nIf there are multiple groups of digits in the name, this method will extract the last.\nIf there is no number in the string, this method will return null.\n\n@param curveName The name of the curve.\n@return The offset code as String",
"Append Join for SQL92 Syntax without parentheses"
] |
public static void enableHost(String hostName) throws Exception {
Registry myRegistry = LocateRegistry.getRegistry("127.0.0.1", port);
com.groupon.odo.proxylib.hostsedit.rmi.Message impl = (com.groupon.odo.proxylib.hostsedit.rmi.Message) myRegistry.lookup(SERVICE_NAME);
impl.enableHost(hostName);
} | [
"Enable a host\n\n@param hostName\n@throws Exception"
] | [
"Returns the number of consecutive trailing one or zero bits.\nIf network is true, returns the number of consecutive trailing zero bits.\nOtherwise, returns the number of consecutive trailing one bits.\n\n@param network\n@return",
"Return the AnnotationNode for the named annotation, or else null.\nSupports Groovy 1.5 and Groovy 1.6.\n@param node - the AnnotatedNode\n@param name - the name of the annotation\n@return the AnnotationNode or else null",
"Adds tags to the If-Match header.\n\n@param tag the tag to add, may be null. This means the same as adding {@link Tag#ALL}\n@throws IllegalArgumentException if ALL is supplied more than once, or you add a null tag more than once.\n@return a new Conditionals object with the If-Match tag added.",
"Starts advertising on Hyperbahn at a fixed interval.\n\n@return a future that resolves to the response of the first advertise request",
"Get distance between geographical coordinates\n@param point1 Point1\n@param point2 Point2\n@return Distance (double)",
"Notify the widget that refresh state has changed. Do not call this when\nrefresh is triggered by a swipe gesture.\n\n@param refreshing Whether or not the view should show refresh progress.",
"Writes this JAR to an output stream, and closes the stream.",
"set the layout which will host the ScrimInsetsFrameLayout and its layoutParams\n\n@param container\n@param layoutParams\n@return",
"Creates a file\n\n@param folder File\n@param fileName String\n@throws IOException"
] |
public static vpnglobal_auditnslogpolicy_binding[] get(nitro_service service) throws Exception{
vpnglobal_auditnslogpolicy_binding obj = new vpnglobal_auditnslogpolicy_binding();
vpnglobal_auditnslogpolicy_binding response[] = (vpnglobal_auditnslogpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch a vpnglobal_auditnslogpolicy_binding resources."
] | [
"Randomize the gradient.",
"Read exactly buffer.length bytes from the stream into the buffer\n\n@param stream The stream to read from\n@param buffer The buffer to read into",
"Array of fieldNames for which counts should be produced\n\n@param countsfields array of the field names\n@return this for additional parameter setting or to query",
"Configure all UI elements in the \"ending\"-options panel.",
"Stops the currently running animation, if any.\n@see GVRAvatar#start(String)\n@see GVRAnimationEngine#stop(GVRAnimation)",
"Read an optional boolean value form a JSON value.\n@param val the JSON value that should represent the boolean.\n@return the boolean from the JSON or null if reading the boolean fails.",
"Get the parameters of determining this parametric\ncovariance model. The parameters are usually free parameters\nwhich may be used in calibration.\n\n@return Parameter vector.",
"Create all the links possible between the Declaration and all the ImporterService matching the.\nImporterServiceFilter of the Linker.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration",
"Replace a photo from a File.\n\n@param file\n@param flickrId\n@param async\n@return photoId or ticketId\n@throws FlickrException"
] |
public static boolean isFormatCorrect(String fileName, ReadOnlyStorageFormat format) {
switch(format) {
case READONLY_V0:
case READONLY_V1:
if(fileName.matches("^[\\d]+_[\\d]+\\.(data|index)")) {
return true;
} else {
return false;
}
case READONLY_V2:
if(fileName.matches("^[\\d]+_[\\d]+_[\\d]+\\.(data|index)")) {
return true;
} else {
return false;
}
default:
throw new VoldemortException("Format type not supported");
}
} | [
"Given a file name and read-only storage format, tells whether the file\nname format is correct\n\n@param fileName The name of the file\n@param format The RO format\n@return true if file format is correct, else false"
] | [
"Process the module and bundle roots and cross check with the installed information.\n\n@param conf the installed configuration\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the processed layers\n@throws IOException",
"Update the central directory signature of a .jar.\n\n@param file the file to process\n@param searchPattern the search patter to use\n@param badSkipBytes the bad bytes skip table\n@param newSig the new signature\n@param endSig the expected signature\n@throws IOException",
"Returns the compact records for all sections in the specified project.\n\n@param project The project to get sections from.\n@return Request object",
"Remove multiple fields from the map\n@param fields the fields to remove\n@return the number of fields removed",
"Retrieves and validates the content length from the REST request.\n\n@return true if has content length",
"Get a property as a double or defaultValue.\n\n@param key the property name\n@param defaultValue the default value",
"Construct an InterestRateSwapProductDescriptor from a node in a FpML file.\n\n@param trade The node containing the swap.\n@return Descriptor of the swap.",
"When the JRField needs properties, use this method.\n@param propertyName\n@param value\n@return",
"Returns the value of found in the model.\n\n@param model the model that contains the key and value.\n@param expressionResolver the expression resolver to use to resolve expressions\n\n@return the directory grouping found in the model.\n\n@throws IllegalArgumentException if the {@link org.jboss.as.controller.descriptions.ModelDescriptionConstants#DIRECTORY_GROUPING directory grouping}\nwas not found in the model."
] |
private void checkOrMarkPrivateAccess(Expression source, MethodNode mn) {
if (mn==null) {
return;
}
ClassNode declaringClass = mn.getDeclaringClass();
ClassNode enclosingClassNode = typeCheckingContext.getEnclosingClassNode();
if (declaringClass != enclosingClassNode || typeCheckingContext.getEnclosingClosure() != null) {
int mods = mn.getModifiers();
boolean sameModule = declaringClass.getModule() == enclosingClassNode.getModule();
String packageName = declaringClass.getPackageName();
if (packageName==null) {
packageName = "";
}
if ((Modifier.isPrivate(mods) && sameModule)
|| (Modifier.isProtected(mods) && !packageName.equals(enclosingClassNode.getPackageName()))) {
addPrivateFieldOrMethodAccess(source, sameModule? declaringClass : enclosingClassNode, StaticTypesMarker.PV_METHODS_ACCESS, mn);
}
}
} | [
"Given a method node, checks if we are calling a private method from an inner class."
] | [
"Returns the resolution of resolving the conflict between a local and remote event using\nthe given conflict resolver.\n\n@param conflictResolver the conflict resolver to use.\n@param documentId the document id related to the conflicted events.\n@param localEvent the conflicted local event.\n@param remoteEvent the conflicted remote event.\n@return the resolution to the conflict.",
"commit all envelopes against the current broker",
"Computes the decomposition of the provided matrix. If no errors are detected then true is returned,\nfalse otherwise.\n@param A The matrix that is being decomposed. Not modified.\n@return If it detects any errors or not.",
"Load a cubemap texture asynchronously.\n\nThis is the implementation of\n{@link GVRAssetLoader#loadCubemapTexture(GVRAndroidResource.TextureCallback, GVRAndroidResource, int)}\n- it will usually be more convenient (and more efficient) to call that\ndirectly.\n\n@param context\nThe GVRF context\n@param textureCache\nTexture cache - may be {@code null}\n@param callback\nAsynchronous notifications\n@param resource\nBasically, a stream containing a compressed texture. Taking a\n{@link GVRAndroidResource} parameter eliminates six overloads.\n@param priority\nThis request's priority. Please see the notes on asynchronous\npriorities in the <a href=\"package-summary.html#async\">package\ndescription</a>.\n@return A {@link Future} that you can pass to methods like\n{@link GVRShaderData#setMainTexture(Future)}",
"Determine the raw type for the given generic parameter type.\n@param genericType the generic type to resolve\n@param typeVariableMap the TypeVariable Map to resolved against\n@return the resolved raw type",
"Return a list of place IDs for a query string.\n\nThe flickr.places.find method is not a geocoder. It will round \"up\" to the nearest place type to which place IDs apply. For example, if you pass it a\nstreet level address it will return the city that contains the address rather than the street, or building, itself.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param query\n@return PlacesList\n@throws FlickrException",
"Update server mapping's host header\n\n@param serverMappingId ID of server mapping\n@param hostHeader value of host header\n@return updated ServerRedirect",
"Check if a dependency matches the filters\n\n@param dependency\n\n@return boolean",
"Derives the OJB platform to use for a database that is connected via a url using the specified\nsubprotocol, and where the specified jdbc driver is used.\n\n@param jdbcSubProtocol The JDBC subprotocol used to connect to the database\n@param jdbcDriver The JDBC driver used to connect to the database\n@return The platform identifier or <code>null</code> if no platform could be found"
] |
private void wrongUsage() {
String usage = "Usage: java -cp $PATH_TO_OPENCMS_JAR org.opencms.rmi.CmsRemoteShellClient\n"
+ " -script=[path to script] (optional) \n"
+ " -registryPort=[port of RMI registry] (optional, default is "
+ CmsRemoteShellConstants.DEFAULT_PORT
+ ")\n"
+ " -additional=[additional commands class name] (optional)";
System.out.println(usage);
System.exit(1);
} | [
"Displays text which shows the valid command line parameters, and then exits."
] | [
"Converts the text stream data to HTML form.\n\n@param content the content to convert\n@return the HTML version of the content",
"Fetch the next event from a given stream\n@return the next event\n@throws IOException any io exception that could occur",
"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",
"Computes the likelihood of the random draw\n\n@return The likelihood.",
"Generate attachment extension from mime type\n\n@param type valid mime-type\n@return extension if it's known for specified mime-type, or empty string\notherwise",
"Receive some bytes from the player we are requesting metadata from.\n\n@param is the input stream associated with the player metadata socket.\n@return the bytes read.\n\n@throws IOException if there is a problem reading the response",
"Retrieves state and metrics information for individual channel.\n\n@param name channel name\n@return channel information",
"This must be called with the write lock held.\n@param requirement the requirement",
"Update the given resource in the persistent configuration model based on the values in the given operation.\n\n@param operation the operation\n@param resource the resource that corresponds to the address of {@code operation}\n\n@throws OperationFailedException if {@code operation} is invalid or populating the model otherwise fails"
] |
public static final BigInteger printPriority(Priority priority)
{
int result = Priority.MEDIUM;
if (priority != null)
{
result = priority.getValue();
}
return (BigInteger.valueOf(result));
} | [
"Print priority.\n\n@param priority Priority instance\n@return priority value"
] | [
"Compares two vectors and determines if they are numeric equals,\nindependent of its type.\n\n@param vector1\nthe first vector\n@param vector2\nthe second vector\n@return true if the vectors are numeric equals",
"Use this API to fetch all the sslaction resources that are configured on netscaler.",
"Scroll to the specific position\n@param position\n@return the new current item after the scrolling processed.",
"Populates data in this Options from the character stream.\n@param in The Reader\n@throws IOException If there is a problem reading data",
"Use this API to fetch policydataset resource of given name .",
"Get the cached entry or null if no valid cached entry is found.",
"returns a sorted array of properties",
"Adds the worker thread pool attributes to the subysystem add method",
"Set the month.\n@param monthStr the month to set."
] |
public static Operation createDeployOperation(final DeploymentDescription deployment) {
Assert.checkNotNullParam("deployment", deployment);
final CompositeOperationBuilder builder = CompositeOperationBuilder.create(true);
addDeployOperationStep(builder, deployment);
return builder.build();
} | [
"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"
] | [
"Ask the specified player for a Track 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 track menu\n\n@throws Exception if there is a problem obtaining the menu",
"Evaluate the criteria and return a boolean result.\n\n@param container field container\n@param promptValues responses to prompts\n@return boolean flag",
"Sets ID field value.\n\n@param val value",
"Use this API to unset the properties of systemuser resource.\nProperties that need to be unset are specified in args array.",
"Populates a calendar instance.\n\n@param record MPX record\n@param calendar calendar instance\n@param isBaseCalendar true if this is a base calendar",
"Removes any child object that has the given name by performing\ncase-sensitive search.\n\n@param name name of scene object to be removed.\n\n@return number of removed objects, 0 if none was found.",
"Walks from the most outer embeddable to the most inner one\nlook for all columns contained in these embeddables\nand exclude the embeddables that have a non null column\nbecause of caching, the algorithm is only run once per column parameter",
"Set default values for the TimeAndSizeRollingAppender appender\n\n@param appender",
"Use this API to fetch vpnsessionpolicy_aaauser_binding resources of given name ."
] |
public void ojbAdd(Object anObject)
{
DSetEntry entry = prepareEntry(anObject);
entry.setPosition(elements.size());
elements.add(entry);
} | [
"add a single Object to the Collection. This method is used during reading Collection elements\nfrom the database. Thus it is is save to cast anObject to the underlying element type of the\ncollection."
] | [
"Extract the generic type from the given Class object.\n@param clazz the Class to check\n@param source the expected raw source type (can be {@code null})\n@param typeIndex the index of the actual type argument\n@param nestingLevel the nesting level of the target type\n@param currentLevel the current nested level\n@return the generic type as Class, or {@code null} if none",
"Use this API to add authenticationradiusaction resources.",
"process all messages in this batch, provided there is plenty of output space.",
"Iterates over all the documents, adding each to the given target.\n\n@param target the collection to insert into\n@param <A> the collection type\n@return the target",
"Creates an endpoint reference by duplicating the endpoint reference of a given server.\n@param server\n@param address\n@param props\n@return",
"Write a standard CoNLL format output file.\n\n@param doc The document: A List of CoreLabel\n@param out Where to send the answers to",
"Use this API to clear nsconfig.",
"Retrieves the members of the type and of its super types.\n\n@param memberNames Will receive the names of the members (for sorting)\n@param members Will receive the members\n@param type The type to process\n@param tagName An optional tag for filtering the types\n@param paramName The feature to be added to the MembersInclSupertypes attribute\n@param paramValue The feature to be added to the MembersInclSupertypes attribute\n@throws XDocletException If an error occurs",
"Set the week day the event should take place.\n@param dayString the day as string."
] |
private void updateRemoveQ( int rowIndex ) {
Qm.set(Q);
Q.reshape(m_m,m_m, false);
for( int i = 0; i < rowIndex; i++ ) {
for( int j = 1; j < m; j++ ) {
double sum = 0;
for( int k = 0; k < m; k++ ) {
sum += Qm.data[i*m+k]* U_tran.data[j*m+k];
}
Q.data[i*m_m+j-1] = sum;
}
}
for( int i = rowIndex+1; i < m; i++ ) {
for( int j = 1; j < m; j++ ) {
double sum = 0;
for( int k = 0; k < m; k++ ) {
sum += Qm.data[i*m+k]* U_tran.data[j*m+k];
}
Q.data[(i-1)*m_m+j-1] = sum;
}
}
} | [
"Updates the Q matrix to take inaccount the row that was removed by only multiplying e\nlements that need to be. There is still some room for improvement here...\n@param rowIndex"
] | [
"Deletes this collaboration whitelist.",
"Get FieldDescriptor from Reference",
"Returns whether this address contains the non-zero host addresses in other.\n@param other\n@return",
"Processes one dump file with the given dump file processor, handling\nexceptions appropriately.\n\n@param dumpFile\nthe dump file to process\n@param dumpFileProcessor\nthe dump file processor to use",
"Use this API to unset the properties of clusternodegroup resources.\nProperties that need to be unset are specified in args array.",
"Adds title and subtitle to the TitleBand when it applies.\nIf title is not present then subtitle will be ignored",
"Say whether this character is an annotation introducing\ncharacter.\n\n@param ch The character to check\n@return Whether it is an annotation introducing character",
"Helper method to synchronously invoke a callback\n\n@param call",
"Set the week day the events should occur.\n@param weekDay the week day to set."
] |
public static DMatrixRMaj diagonal(int N , double min , double max , Random rand ) {
return diagonal(N,N,min,max,rand);
} | [
"Creates a random diagonal matrix where the diagonal elements are selected from a uniform\ndistribution that goes from min to max.\n\n@param N Dimension of the matrix.\n@param min Minimum value of a diagonal element.\n@param max Maximum value of a diagonal element.\n@param rand Random number generator.\n@return A random diagonal matrix."
] | [
"This method writes assignment data to an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Load the properties from the resource file if one is specified",
"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}",
"xml -> object\n\n@param message\n@param childClass\n@return",
"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",
"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",
"Finish initializing service.\n\n@throws IOException oop",
"Set a range of the colormap, interpolating between two colors.\n@param firstIndex the position of the first color\n@param lastIndex the position of the second color\n@param color1 the first color\n@param color2 the second color",
"retrieve a single reference- or collection attribute\nof a persistent instance.\n@param pInstance the persistent instance\n@param pAttributeName the name of the Attribute to load"
] |
static <K, V> PageMetadata<K, V> mergeTokenAndQueryParameters(String paginationToken, final
ViewQueryParameters<K, V> initialParameters) {
// Decode the base64 token into JSON
String json = new String(Base64.decodeBase64(paginationToken), Charset.forName("UTF-8"));
// Get a suitable Gson, we need any adapter registered for the K key type
Gson paginationTokenGson = getGsonWithKeyAdapter(initialParameters);
// Deserialize the pagination token JSON, using the appropriate K, V types
PaginationToken token = paginationTokenGson.fromJson(json, PaginationToken.class);
// Create new query parameters using the initial ViewQueryParameters as a starting point.
ViewQueryParameters<K, V> tokenPageParameters = initialParameters.copy();
// Merge the values from the token into the new query parameters
tokenPageParameters.descending = token.descending;
tokenPageParameters.endkey = token.endkey;
tokenPageParameters.endkey_docid = token.endkey_docid;
tokenPageParameters.inclusive_end = token.inclusive_end;
tokenPageParameters.startkey = token.startkey;
tokenPageParameters.startkey_docid = token.startkey_docid;
return new PageMetadata<K, V>(token.direction, token
.pageNumber, tokenPageParameters);
} | [
"Generate a PageMetadata object for the page represented by the specified pagination token.\n\n@param paginationToken opaque pagination token\n@param initialParameters the initial view query parameters (i.e. for the page 1 request).\n@param <K> the view key type\n@param <V> the view value type\n@return PageMetadata object for the given page"
] | [
"Read a list of fixed size blocks using an instance of the supplied reader class.\n\n@param readerClass reader class\n@return list of blocks",
"Called whenever a rebalance task completes. This means one task is done\nand some number of partition stores have been migrated.\n\n@param taskId\n@param partitionStoresMigrated Number of partition stores moved by this\ncompleted task.",
"Update the content of the tables.",
"Swaps two specified partitions.\n\nPair-wase partition swapping may be more prone to local minima than\nlarger perturbations. Could consider \"swapping\" a list of\n<nodeId/partitionId>. This would allow a few nodes to be identified\n(random # btw 2-5?) and then \"swapped\" (shuffled? rotated?).\n\n@return modified cluster metadata.",
"Return as a string the stereotypes associated with c\nterminated by the escape character term",
"Remove the corresponding object from session AND application cache.",
"This handler will be triggered when there's no search result",
"Use this API to update nsconfig.",
"Parse units.\n\n@param value units value\n@return units value"
] |
public static String copyToString(InputStream in, Charset charset) throws IOException {
Assert.notNull(in, "No InputStream specified");
StringBuilder out = new StringBuilder();
InputStreamReader reader = new InputStreamReader(in, charset);
char[] buffer = new char[BUFFER_SIZE];
int bytesRead = -1;
while ((bytesRead = reader.read(buffer)) != -1) {
out.append(buffer, 0, bytesRead);
}
return out.toString();
} | [
"Copy the contents of the given InputStream into a String.\nLeaves the stream open when done.\n@param in the InputStream to copy from\n@return the String that has been copied to\n@throws IOException in case of I/O errors"
] | [
"Command-line version of the classifier. See the class\ncomments for examples of use, and SeqClassifierFlags\nfor more information on supported flags.",
"Find the earliest task start date. We treat this as the\nstart date for the project.\n\n@return start date",
"Create a new Date. To the last day.",
"Get a sub-list of this list\n@param fromIndex index of the first element in the sub-list (inclusive)\n@param toIndex index of the last element in the sub-list (inclusive)\n@return the sub-list",
"Use this API to fetch appfwprofile_cookieconsistency_binding resources of given name .",
"Convert a list of objects to a JSON array with the string representations of that objects.\n@param list the list of objects.\n@return the JSON array with the string representations.",
"Set an outline code value.\n\n@param index outline code index (1-10)\n@param value outline code value",
"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",
"Log the values for the provided template.\n\n@param templateName the name of the template the values came from\n@param template the template object\n@param values the resultant values"
] |
private boolean hasAbstractPackagePrivateSuperClassWithImplementation(Class<?> clazz, BridgeMethod bridgeMethod) {
Class<?> superClass = clazz.getSuperclass();
while (superClass != null) {
if (Modifier.isAbstract(superClass.getModifiers()) && Reflections.isPackagePrivate(superClass.getModifiers())) {
// if superclass is abstract, we need to dig deeper
for (Method method : superClass.getDeclaredMethods()) {
if (bridgeMethod.signature.matches(method) && method.getGenericReturnType().equals(bridgeMethod.returnType)
&& !Reflections.isAbstract(method)) {
// this is the case we are after -> methods have same signature and the one in super class has actual implementation
return true;
}
}
}
superClass = superClass.getSuperclass();
}
return false;
} | [
"Returns true if super class of the parameter exists and is abstract and package private. In such case we want to omit such method.\n\nSee WELD-2507 and Oracle issue - https://bugs.java.com/view_bug.do?bug_id=6342411\n\n@return true if the super class exists and is abstract and package private"
] | [
"Check if this path matches the address path.\nAn address matches this address if its path elements match or are valid\nmulti targets for this path elements. Addresses that are equal are matching.\n\n@param address The path to check against this path. If null, this method\nreturns false.\n@return true if the provided path matches, false otherwise.",
"Use this API to Import sslfipskey.",
"Record a new event.",
"Delivers the correct JSON Object for properties\n\n@param properties\n@throws org.json.JSONException",
"Delete the given file in a separate thread\n\n@param file The file to delete",
"Get prototype name.\n\n@return prototype name",
"Support the range subscript operator for CharSequence\n\n@param text a CharSequence\n@param range a Range\n@return the subsequence CharSequence\n@since 1.0",
"Finds the beat in which the specified track position falls.\n\n@param milliseconds how long the track has been playing\n\n@return the beat number represented by that time, or -1 if the time is before the first beat",
"read the prefetchInLimit from Config based on OJB.properties"
] |
public ClassNode annotatedWith(String name) {
ClassNode anno = infoBase.node(name);
this.annotations.add(anno);
anno.annotated.add(this);
return this;
} | [
"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"
] | [
"Retrieve a UUID from an input stream.\n\n@param is input stream\n@return UUID instance",
"Creates the request.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception",
"Get the minutes difference",
"Returns the real value object.",
"Handle changes of the series check box.\n@param event the change event.",
"Calculates the local translation and rotation for a bone.\nAssumes WorldRot and WorldPos have been calculated for the bone.",
"Extracts a particular data model instance from a JSON response\nreturned by MediaWiki. The location is described by a list of successive\nfields to use, from the root to the target object.\n\n@param response\nthe API response as returned by MediaWiki\n@param path\na list of fields from the root to the target object\n@return\nthe parsed POJO object\n@throws JsonProcessingException",
"Adds a child to this node and sets this node as its parent node.\n\n@param node The node to add.",
"Delete an index with the specified name and type in the given design document.\n\n@param indexName name of the index\n@param designDocId ID of the design doc (the _design prefix will be added if not present)\n@param type type of the index, valid values or \"text\" or \"json\""
] |
public void removeAllAnimations() {
for (int i = 0, size = mAnimationList.size(); i < size; i++) {
mAnimationList.get(i).removeAnimationListener(mAnimationListener);
}
mAnimationList.clear();
} | [
"Stops and clears all transitions"
] | [
"Clear JobContext of current thread",
"It is possible for the QR algorithm to get stuck in a loop because of symmetries. This happens\nmore often with larger matrices. By taking a random step it can break the symmetry and finish.",
"Insert a value into the right bucket of the histogram. If the value is\nlarger than any bound, insert into the last bucket. If the value is less\nthan zero, then ignore it.\n\n@param data The value to insert into the histogram",
"Indicate to the RecyclerView the type of Renderer used to one position using a numeric value.\n\n@param position to analyze.\n@return the id associated to the Renderer used to render the content given a position.",
"Tries to return the single table to which all classes in the hierarchy with the given\nclass as the root map.\n\n@param classDef The root class of the hierarchy\n@return The table name or <code>null</code> if the classes map to more than one table\nor no class in the hierarchy maps to a table",
"Set the featureModel.\n\n@param featureModel\nfeature model\n@throws LayerException\nproblem setting the feature model\n@since 1.8.0",
"Append data to JSON response.\n@param param\n@param value",
"Use this API to add sslcipher resources.",
"Obtain the profile name associated with a profile ID\n\n@param id ID of profile\n@return Name of corresponding profile"
] |
public PeriodicEvent runEvery(Runnable task, float delay, float period) {
return runEvery(task, delay, period, null);
} | [
"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."
] | [
"Log a message with a throwable at the provided level.",
"Obtains a Symmetry454 zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Symmetry454 zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Adds OPT_U | OPT_URL option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"multi-field string",
"Use this API to fetch all the nssimpleacl resources that are configured on netscaler.",
"Retrieve the value of a field using its alias.\n\n@param alias field alias\n@return field value",
"Returns the specified element, or null.",
"Embeds the given SVG element into a new SVG element scaling the graphic to the given dimension and\napplying the given rotation.",
"Use this API to update snmpuser."
] |
public FluoKeyValueGenerator set(RowColumnValue rcv) {
setRow(rcv.getRow());
setColumn(rcv.getColumn());
setValue(rcv.getValue());
return this;
} | [
"Set the row, column, and value\n\n@return this"
] | [
"Use this API to fetch gslbsite resource of given name .",
"Adds a new task to this file. The task can have an optional message to include, and a due date.\n\n@param action the action the task assignee will be prompted to do.\n@param message an optional message to include with the task.\n@param dueAt the day at which this task is due.\n@return information about the newly added task.",
"Determine whether the given property matches this element.\nA property matches this element when property name and this key are equal,\nvalues are equal or this element value is a wildcard.\n@param property the property to check\n@return {@code true} if the property matches",
"Returns the complete task record for a single task.\n\n@param task The task to get.\n@return Request object",
"Convert a list of objects to a JSON array with the string representations of that objects.\n@param list the list of objects.\n@return the JSON array with the string representations.",
"Initialize the various DAO configurations after the various setters have been called.",
"Resolves the configuration.\n\n@param config The specified configuration.\n@return The resolved configuration.",
"Release transaction that was acquired in a thread with specified permits.",
"URL-Decodes a given string using ISO-8859-1. No UnsupportedEncodingException to handle as it is dealt with in\nthis method."
] |
private static AbstractProject<?, ?> getProject(String fullName) {
Item item = Hudson.getInstance().getItemByFullName(fullName);
if (item != null && item instanceof AbstractProject) {
return (AbstractProject<?, ?>) item;
}
return null;
} | [
"Get a project according to its full name.\n\n@param fullName The full name of the project.\n@return The project which answers the full name."
] | [
"A smoothed step function. A cubic function is used to smooth the step between two thresholds.\n@param a the lower threshold position\n@param b the upper threshold position\n@param x the input parameter\n@return the output value",
"Use this API to add nsip6 resources.",
"handles when a member leaves and hazelcast partition data is lost. We want\nto find the Futures that are waiting on lost data and error them",
"Return the List of Arguments for the specified MethodCallExpression or a ConstructorCallExpression.\nThe returned List contains either ConstantExpression or MapEntryExpression objects.\n@param methodCall - the AST MethodCallExpression or ConstructorCalLExpression\n@return the List of argument objects",
"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",
"Read an individual remark type from a Gantt Designer file.\n\n@param remark remark type",
"Transforms user name and icon size into the rfs image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path",
"Validates the data for correct annotation",
"Converts a time represented as an integer to a Date instance.\n\n@param time integer time\n@return Date instance"
] |
private static void addProperties(EndpointReferenceType epr, SLProperties props) {
MetadataType metadata = WSAEndpointReferenceUtils.getSetMetadata(epr);
ServiceLocatorPropertiesType jaxbProps = SLPropertiesConverter.toServiceLocatorPropertiesType(props);
JAXBElement<ServiceLocatorPropertiesType>
slp = SL_OBJECT_FACTORY.createServiceLocatorProperties(jaxbProps);
metadata.getAny().add(slp);
} | [
"Adds service locator properties to an endpoint reference.\n@param epr\n@param props"
] | [
"Create a forward curve from given times and discount factors.\n\nThe forward curve will have times.length-1 fixing times from times[0] to times[times.length-2]\n<code>\nforward[timeIndex] = (givenDiscountFactors[timeIndex]/givenDiscountFactors[timeIndex+1]-1.0) / (times[timeIndex+1] - times[timeIndex]);\n</code>\nNote: If time[0] > 0, then the discount factor 1.0 will inserted at time 0.0\n\n@param name The name of this curve.\n@param times A vector of given time points.\n@param givenDiscountFactors A vector of given discount factors (corresponding to the given time points).\n@param paymentOffset The maturity of the underlying index modeled by this curve.\n@return A new ForwardCurve object.",
"Registers the deployment resources needed.\n\n@param deploymentResourceSupport the deployment resource support\n@param service the service, which may be {@code null}, used to find the resource names that need to be registered",
"Add an index on the given collection and field\n\n@param collection the collection to use for the index\n@param field the field to use for the index\n@param asc the sorting direction. <code>true</code> to sort ascending; <code>false</code> to sort descending\n@param background iff <code>true</code> the index is created in the background",
"Classify the tokens in a String. Each sentence becomes a separate document.\n\n@param str\nA String with tokens in one or more sentences of text to be\nclassified.\n@return {@link List} of classified sentences (each a List of something that\nextends {@link CoreMap}).",
"Return the bean type, untangling the proxy if needed\n\n@param name\nthe bean name\n@return The Class of the bean",
"Generate a currency format.\n\n@param position currency symbol position\n@return currency format",
"Sets the bounds of a UIObject, moving and sizing to match the\nbounds specified. Currently used for the itemhover and useful\nfor other absolutely positioned elements.",
"Retrieve a list of the available P3 project names from a directory.\n\n@param directory directory containing P3 files\n@return list of project names",
"A specific, existing workspace can be updated by making a PUT request on\nthe URL for that workspace. Only the fields provided in the data block\nwill be updated; any unspecified fields will remain unchanged.\n\nCurrently the only field that can be modified for a workspace is its `name`.\n\nReturns the complete, updated workspace record.\n\n@param workspace The workspace to update.\n@return Request object"
] |
public static URL buildUrl(String scheme, String host, int port, String path, Map<String, String> parameters) throws MalformedURLException {
checkSchemeAndPort(scheme, port);
StringBuilder buffer = new StringBuilder();
if (!host.startsWith(scheme + "://")) {
buffer.append(scheme).append("://");
}
buffer.append(host);
if (port > 0) {
buffer.append(':');
buffer.append(port);
}
if (path == null) {
path = "/";
}
buffer.append(path);
if (!parameters.isEmpty()) {
buffer.append('?');
}
int size = parameters.size();
for (Map.Entry<String, String> entry : parameters.entrySet()) {
buffer.append(entry.getKey());
buffer.append('=');
Object value = entry.getValue();
if (value != null) {
String string = value.toString();
try {
string = URLEncoder.encode(string, UTF8);
} catch (UnsupportedEncodingException e) {
// Should never happen, but just in case
}
buffer.append(string);
}
if (--size != 0) {
buffer.append('&');
}
}
/*
* RequestContext requestContext = RequestContext.getRequestContext(); Auth auth = requestContext.getAuth(); if (auth != null &&
* !ignoreMethod(getMethod(parameters))) { buffer.append("&api_sig="); buffer.append(AuthUtilities.getSignature(sharedSecret, parameters)); }
*/
return new URL(buffer.toString());
} | [
"Build a request URL using a given scheme.\n\n@param scheme the scheme, either {@code http} or {@code https}\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"
] | [
"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",
"Get the AuthInterface.\n\n@return The AuthInterface",
"Convert an Object to a Timestamp, without an Exception",
"Add a channel to the animation to animate the named bone.\n@param boneName name of bone to animate.\n@param channel The animation channel.",
"Only call with the read lock held",
"Extract resource assignments for a task.\n\n@param task parent task\n@param assignments list of Synchro resource assignment data",
"Process a device update once it has been received. Track it as the most recent update from its address,\nand notify any registered listeners, including master listeners if it results in changes to tracked state,\nsuch as the current master player and tempo. Also handles the Baroque dance of handing off the tempo master\nrole from or to another device.",
"Generates a change event for a local insert of the given document in the given namespace.\n\n@param namespace the namespace where the document was inserted.\n@param document the document that was inserted.\n@return a change event for a local insert of the given document in the given namespace.",
"Adds an individual alias. It will be merged with the current\nlist of aliases, or added as a label if there is no label for\nthis item in this language yet.\n\n@param alias\nthe alias to add"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.