query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
public static int checkVlen(int i) {
int count = 0;
if (i >= -112 && i <= 127) {
return 1;
} else {
int len = -112;
if (i < 0) {
i ^= -1L; // take one's complement'
len = -120;
}
long tmp = i;
while (tmp != 0) {
tmp = tmp >> 8;
len--;
... | [
"Determines the number bytes required to store a variable length\n\n@param i length of Bytes\n@return number of bytes needed"
] | [
"Compares two annotated types and returns true if they are the same",
"Read metadata by populating an instance of the target class\nusing SAXParser.",
"Return the version string of this instance of finmath-lib.\n\n@return The version string of this instance of finmath-lib.",
"Curries a procedure that takes on... |
public static DMatrixSparseCSC triangle( boolean upper , int N , double minFill , double maxFill , Random rand ) {
int nz = (int)(((N-1)*(N-1)/2)*(rand.nextDouble()*(maxFill-minFill)+minFill))+N;
if( upper ) {
return triangleUpper(N,0,nz,-1,1,rand);
} else {
return trian... | [
"Creates a triangular matrix where the amount of fill is randomly selected too.\n\n@param upper true for upper triangular and false for lower\n@param N number of rows and columns\ner * @param minFill minimum fill fraction\n@param maxFill maximum fill fraction\n@param rand random number generator\n@return Rando... | [
"Add a '<=' clause so the column must be less-than or equals-to the value.",
"Checks the existence of the directory. If it does not exist, the method creates it.\n\n@param dir the directory to check.\n@throws IOException if fails.",
"Read data from the table. Return a reference to the current\ninstance to al... |
public static Span exact(Bytes row) {
Objects.requireNonNull(row);
return new Span(row, true, row, true);
} | [
"Creates a span that covers an exact row"
] | [
"Scroll to the next page. To process the scrolling by pages LayoutScroller must be constructed\nwith a pageSize greater than zero.\n@return the new current item after the scrolling processed.",
"Retrieves the path using the endpoint value\n\n@param pathValue - path (endpoint) value\n@param requestType - \"GET\", ... |
public Deployment setServerGroups(final Collection<String> serverGroups) {
this.serverGroups.clear();
this.serverGroups.addAll(serverGroups);
return this;
} | [
"Sets the server groups for the deployment.\n\n@param serverGroups the server groups to set\n\n@return this deployment"
] | [
"Returns the path to java executable.",
"Checks if the specified latitude is correct.\n\n@param name the name of the latitude field\n@param latitude the value of the latitude field\n@return the latitude",
"Compare the supplied plaintext password to a hashed password.\n\n@param passwd Plaintext password.\n@pa... |
protected int getDonorId(StoreRoutingPlan currentSRP,
StoreRoutingPlan finalSRP,
int stealerZoneId,
int stealerNodeId,
int stealerPartitionId) {
int stealerZoneNAry = finalSRP.getZoneNaryForNodesP... | [
"Decide which donor node to steal from. This is a policy implementation.\nI.e., in the future, additional policies could be considered. At that\ntime, this method should be overridden in a sub-class, or a policy object\nought to implement this algorithm.\n\nCurrent policy:\n\n1) If possible, a stealer node that is ... | [
"Returns a SimpleConfiguration clientConfig with properties set from this configuration\n\n@return SimpleConfiguration",
"Get the collection of the server groups\n\n@return Collection of active server groups",
"Use this API to fetch all the autoscaleaction resources that are configured on netscaler.",
"Compar... |
void addSubsystem(final OperationTransformerRegistry registry, final String name, final ModelVersion version) {
final OperationTransformerRegistry profile = registry.getChild(PathAddress.pathAddress(PROFILE));
final OperationTransformerRegistry server = registry.getChild(PathAddress.pathAddress(HOST, SE... | [
"Add a new subsystem to a given registry.\n\n@param registry the registry\n@param name the subsystem name\n@param version the version"
] | [
"Runs a Story with the given steps factory, applying the given meta\nfilter, and staring from given state.\n\n@param configuration the Configuration used to run story\n@param stepsFactory the InjectableStepsFactory used to created the\ncandidate steps methods\n@param story the Story to run\n@param filter the Filter... |
private void handleFailedSendDataRequest(SerialMessage originalMessage) {
ZWaveNode node = this.getNode(originalMessage.getMessageNode());
if (node.getNodeStage() == NodeStage.NODEBUILDINFO_DEAD)
return;
if (!node.isListening() && originalMessage.getPriority() != SerialMessage.SerialMessagePriority.Low) ... | [
"Handles a failed SendData request. This can either be because of the stick actively reporting it\nor because of a time-out of the transaction in the send thread.\n@param originalMessage the original message that was sent"
] | [
"Create the metadata which gets send to the DC when registering.\n\n\n@param hostInfo the local host info\n@param productConfig the product config\n@param ignoredResourceRegistry registry of ignored resources\n@return the host info",
"Returns the names of parser rules that should be called in order to obtain the ... |
private static boolean isCollectionMatching(Joinable mainSideJoinable, OgmCollectionPersister inverseSidePersister) {
boolean isSameTable = mainSideJoinable.getTableName().equals( inverseSidePersister.getTableName() );
if ( !isSameTable ) {
return false;
}
return Arrays.equals( mainSideJoinable.getKeyColum... | [
"Checks whether table name and key column names of the given joinable and inverse collection persister match."
] | [
"Use this API to delete sslcertkey.",
"Given a block of data representing completed work, this method will\nretrieve a set of TimephasedWork instances which represent\nthe day by day work carried out for a specific resource assignment.\n\n@param calendar calendar on which date calculations are based\n@param resou... |
public static String getDateTimeStrStandard(Date d) {
if (d == null)
return "";
if (d.getTime() == 0L)
return "Never";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss.SSSZ");
return sdf.format(d);
} | [
"Gets the date time str standard.\n\n@param d\nthe d\n@return the date time str standard"
] | [
"Print priority.\n\n@param priority Priority instance\n@return priority value",
"Use this method to enable device network-related information tracking, including IP address.\nThis reporting is disabled by default. To re-disable tracking call this method with enabled set to false.\n\n@param value boolean Whether... |
public ApnsServiceBuilder withDelegate(ApnsDelegate delegate) {
this.delegate = delegate == null ? ApnsDelegate.EMPTY : delegate;
return this;
} | [
"Sets the delegate of the service, that gets notified of the\nstatus of message delivery.\n\nNote: This option has no effect when using non-blocking\nconnections."
] | [
"Release all memory addresses taken by this allocator.\nBe careful in using this method, since all of the memory addresses become invalid.",
"Register operations associated with this resource.\n\n@param resourceRegistration a {@link org.jboss.as.controller.registry.ManagementResourceRegistration} created from thi... |
public static String encodeHost(String host, String encoding) throws UnsupportedEncodingException {
return HierarchicalUriComponents.encodeUriComponent(host, encoding, HierarchicalUriComponents.Type.HOST_IPV4);
} | [
"Encodes the given URI host with the given encoding.\n@param host the host to be encoded\n@param encoding the character encoding to encode to\n@return the encoded host\n@throws UnsupportedEncodingException when the given encoding parameter is not supported"
] | [
"Adds a measure to the crosstab. A crosstab can have many measures. DJ will lay out one measure above\nthe other.\n\nA measure is what is shown on each intersection of a column and a row. A calculation is performed to\nall occurrences in the datasource where the column and row values matches (between elements)\n\nT... |
public static void copyProperties(Object dest, Object orig){
try {
if (orig != null && dest != null){
BeanUtils.copyProperties(dest, orig);
PropertyUtils putils = new PropertyUtils();
PropertyDescriptor origDescriptors[] = putils.getPropertyDescriptors(orig);
for (PropertyDescriptor orig... | [
"This takes into account objects that breaks the JavaBean convention\nand have as getter for Boolean objects an \"isXXX\" method.\n@param dest\n@param orig"
] | [
"Animate de-selection of visible views and clear\nselected set.",
"Use this API to update onlinkipv6prefix.",
"Returns the field with the specified value properly formatted. Multiline\nvalues are automatically indented, and dots are added on the empty lines.\n\n<pre>\nField-Name: value\n</pre>",
"Sets the sit... |
public static final String decodePassword(byte[] data, byte encryptionCode)
{
String result;
if (data.length < MINIMUM_PASSWORD_DATA_LENGTH)
{
result = null;
}
else
{
MPPUtility.decodeBuffer(data, encryptionCode);
StringBuilder buffer = new StringBuild... | [
"Decode the password from the given data. Will decode the data block as well.\n\n@param data encrypted data block\n@param encryptionCode encryption code\n\n@return password"
] | [
"Shrinks the alert message body so that the resulting payload\nmessage fits within the passed expected payload length.\n\nThis method performs best-effort approach, and its behavior\nis unspecified when handling alerts where the payload\nwithout body is already longer than the permitted size, or\nif the break occur... |
public void printInferredDependencies(ClassDoc c) {
if (hidden(c))
return;
Options opt = optionProvider.getOptionsFor(c);
Set<Type> types = new HashSet<Type>();
// harvest method return and parameter types
for (MethodDoc method : filterByVisibility(c.methods(false), opt.inferDependencyVisibility)) {
typ... | [
"Prints dependencies recovered from the methods of a class. A\ndependency is inferred only if another relation between the two\nclasses is not already in the graph.\n@param classes"
] | [
"Create a shell object and assign its id field.",
"return either the first space or the first nbsp",
"Hides the Loader component",
"Unregister the mbean with the given name, if there is one registered\n\n@param name The mbean name to unregister\n@see #registerMBean(Object, String)",
"This method reads a byt... |
private CollectionDescriptorDef cloneCollection(CollectionDescriptorDef collDef, String prefix)
{
CollectionDescriptorDef copyCollDef = new CollectionDescriptorDef(collDef, prefix);
copyCollDef.setOwner(this);
// we remove properties that are only relevant to the class the features are... | [
"Clones the given collection.\n\n@param collDef The collection descriptor\n@param prefix A prefix for the name\n@return The cloned collection"
] | [
"Creates a jrxml file\n\n@param dr\n@param layoutManager\n@param _parameters\n@param xmlEncoding (default is UTF-8 )\n@param outputStream\n@throws JRException",
"Specify the socket to be used as underlying socket to connect\nto the APN service.\n\nThis assumes that the socket connects to a SOCKS proxy.\n\n@depr... |
public final boolean roll(final LoggingEvent loggingEvent) {
for (int i = 0; i < this.fileRollables.length; i++) {
if (this.fileRollables[i].roll(loggingEvent)) {
return true;
}
}
return false;
} | [
"Delegates file rolling to composed objects.\n\n@see FileRollable#roll(org.apache.log4j.spi.LoggingEvent)"
] | [
"If a given x is into an interval of the partition, this method returns the reference point of the corresponding interval.\nIf the given x is not contained in any interval of the partition, this method returns x.\n\n@param x The point of interest.\n@return The discretized value.",
"Get points after extract bounda... |
@PostConstruct
public final void init() throws URISyntaxException {
final String address = getConfig(ADDRESS, null);
if (address != null) {
final URI uri = new URI("udp://" + address);
final String prefix = getConfig(PREFIX, "mapfish-print").replace("%h", getHostname());
... | [
"Start the StatsD reporter, if configured.\n\n@throws URISyntaxException"
] | [
"This method extracts resource data from a Phoenix file.\n\n@param phoenixProject parent node for resources",
"returns the zero argument constructor for the class represented by this class descriptor\nor null if a zero argument constructor does not exist. If the zero argument constructor\nfor this class is not p... |
public boolean filter(Event event) {
LOG.info("StringContentFilter called");
if (wordsToFilter != null) {
for (String filterWord : wordsToFilter) {
if (event.getContent() != null
&& -1 != event.getContent().indexOf(filterWord)) {
... | [
"Filter event if word occurs in wordsToFilter.\n\n@param event the event\n@return true, if successful"
] | [
"Use this API to fetch the statistics of all gslbservice_stats resources that are configured on netscaler.",
"Use this API to fetch statistics of appfwprofile_stats resource of given name .",
"Add a new server mapping to current profile\n\n@param sourceHost source hostname\n@param destinationHost destination ho... |
protected void onEditTitleTextBox(TextBox box) {
if (m_titleEditHandler != null) {
m_titleEditHandler.handleEdit(m_title, box);
return;
}
String text = box.getText();
box.removeFromParent();
m_title.setText(text);
m_title.setVisible(true);
} | [
"Internal method which is called when the user has finished editing the title.\n\n@param box the text box which has been edited"
] | [
"Print channels to the left of log messages\n@param width The width (in characters) to print the channels\n@return this",
"Use this API to add dnspolicylabel resources.",
"In common shader cases, NaN makes little sense. Correspondingly, GVRF is\ngoing to use Float.NaN as illegal flag in many cases. Therefore, w... |
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef,
TypePath typePath, Label[] start, Label[] end, int[] index,
String desc, boolean visible) {
if (mv != null) {
return mv.visitLocalVariableAnnotation(typeRef, typePath, start,
end, index, de... | [
"Visits an annotation on a local variable type.\n\n@param typeRef\na reference to the annotated type. The sort of this type\nreference must be {@link TypeReference#LOCAL_VARIABLE\nLOCAL_VARIABLE} or {@link TypeReference#RESOURCE_VARIABLE\nRESOURCE_VARIABLE}. See {@link TypeReference}.\n@param typePath\nthe path to ... | [
"Plots the MSD curve with the trajectory t and adds the fitted model for free diffusion.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between... |
@UiThread
public void expandParentRange(int startParentPosition, int parentCount) {
int endParentPosition = startParentPosition + parentCount;
for (int i = startParentPosition; i < endParentPosition; i++) {
expandParent(i);
}
} | [
"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"
] | [
"Provisions a new app user in an enterprise with additional user information using Box Developer Edition.\n@param api the API connection to be used by the created user.\n@param name the name of the user.\n@param params additional user information.\n@return the created user's info.",
"Pauses the pla... |
public String registerHandler(GFXEventHandler handler) {
String uuid = UUID.randomUUID().toString();
handlers.put(uuid, handler);
return uuid;
} | [
"Registers a handler and returns the callback key to be passed to\nJavascript.\n\n@param handler Handler to be registered.\n@return A String random UUID that can be used as the callback key."
] | [
"Returns the list of atlas information necessary to map\nthe texture atlas to each scene object.\n\n@return List of atlas information.",
"Commits the writes to the remote collection.",
"This method retrieves a String of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique... |
public final Object getRealObject(Object objectOrProxy)
{
if(isNormalOjbProxy(objectOrProxy))
{
String msg;
try
{
return getIndirectionHandler(objectOrProxy).getRealSubject();
}
catch(ClassCastException e)
... | [
"Get the real Object\n\n@param objectOrProxy\n@return Object"
] | [
"Get the Roman Numeral of the current value\n@return",
"Check if the given color string can be parsed.\n\n@param colorString The color to parse.",
"Parses a tag formatted as defined by the HTTP standard.\n\n@param httpTag The HTTP tag string; if it starts with 'W/' the tag will be\nmarked as weak and the data f... |
public static SimpleMatrix diag( Class type, double ...vals ) {
SimpleMatrix M = new SimpleMatrix(vals.length,vals.length,type);
for (int i = 0; i < vals.length; i++) {
M.set(i,i,vals[i]);
}
return M;
} | [
"Creates a real valued diagonal matrix of the specified type"
] | [
"Sets an argument to the collection of arguments. This guarantees only one value will be assigned to the\nargument key.\n\n@param argument the argument to add",
"Converts a class into a signature token.\n\n@param c class\n@return signature token text",
"Return the list of licenses attached to an artifact\n\n@pa... |
protected void parseLinks(CmsObject cms) throws CmsException {
List<CmsResource> linkParseables = new ArrayList<>();
for (CmsResourceImportData resData : m_moduleData.getResourceData()) {
CmsResource importRes = resData.getImportResource();
if ((importRes != null) && m_importIds... | [
"Parses links for XMLContents etc.\n\n@param cms the CMS context to use\n@throws CmsException if something goes wrong"
] | [
"Helper method for formatting connection establishment messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@return A formatted message in the format:\n\"[<connectionName>] remote host[<host>] &... |
public static base_response add(nitro_service client, sslcipher resource) throws Exception {
sslcipher addresource = new sslcipher();
addresource.ciphergroupname = resource.ciphergroupname;
addresource.ciphgrpalias = resource.ciphgrpalias;
return addresource.add_resource(client);
} | [
"Use this API to add sslcipher."
] | [
"This main method provides an easy command line tool to compare two\nschemas.",
"Finds a child resource with the given key.\n\n@param key the child resource key\n@return null if no child resource exists with the given name else the child resource",
"Gets a method based on data in the override_db table\n\n@param... |
public static synchronized void register(final String serviceName,
final Callable<Class< ? >> factory) {
if ( serviceName == null ) {
throw new IllegalArgumentException( "serviceName cannot be null" );
}
if ( factory != null ) {
... | [
"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 IllegalArg... | [
"1-D Forward Discrete Cosine Transform.\n\n@param data Data.",
"Runs the given method with the specified arguments, substituting with proxies where necessary\n@param method\n@param target proxy target\n@param args\n@return Proxy-fied result for statements, actual call result otherwise\n@throws IllegalAccessExcept... |
public static String getContent(String stringUrl) throws IOException {
InputStream stream = getContentStream(stringUrl);
return MyStreamUtils.readContent(stream);
} | [
"Get content for URL only\n\n@param stringUrl URL to get content\n@return the content\n@throws IOException I/O error happened"
] | [
"Create an index of base font numbers and their associated base\nfont instances.\n@param data property data",
"Returns the x-coordinate of a vertex normal.\n\n@param vertex the vertex index\n@return the x coordinate",
"Adds a materialization listener.\n\n@param listener\nThe listener to add",
"calculate the d... |
private void setPlaying(boolean playing) {
PlaybackState oldState = currentSimpleState();
if (oldState != null && oldState.playing != playing) {
setPlaybackState(oldState.player, oldState.position, playing);
}
} | [
"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 whit... | [
"Returns true if the given method has a possibly matching instance method with the given name and arguments.\n\n@param name the name of the method of interest\n@param arguments the arguments to match against\n@return true if a matching method was found",
"Returns the steps instances associated to CandidateSt... |
ProtectionDomain getProtectionDomainForProxy(ProtectionDomain domain) {
if (domain.getCodeSource() == null) {
// no codesource to cache on
return create(domain);
}
ProtectionDomain proxyProtectionDomain = proxyProtectionDomains.get(domain.getCodeSource());
if (pro... | [
"Gets an enhanced protection domain for a proxy based on the given protection domain.\n@param domain the given protection domain\n@return protection domain enhanced with \"accessDeclaredMembers\" runtime permission"
] | [
"Use this API to fetch dnspolicy_dnspolicylabel_binding resources of given name .",
"Poll for the next N waiting jobs in line.\n\n@param size maximum amount of jobs to poll for\n@return up to \"size\" jobs",
"Determine which unit to use when creating grid labels.\n\n@param mapCrs the crs of the map, used if the... |
protected void progressInfoMessage(final String tag) {
if(logger.isInfoEnabled()) {
long totalTimeS = (System.currentTimeMillis() - startTimeMs) / Time.MS_PER_SECOND;
logger.info(tag + " : scanned " + scanned + " and fetched " + fetched + " for store '"
+ storage... | [
"Progress info message\n\n@param tag Message that precedes progress info. Indicate 'keys' or\n'entries'."
] | [
"Use this API to add nspbr6 resources.",
"Utility function to validate if the given store name exists in the store\nname list managed by MetadataStore. This is used by the Admin service for\nvalidation before serving a get-metadata request.\n\n@param name Name of the store to validate\n@return True if the store n... |
public Integer getOverrideIdForMethod(String className, String methodName) {
Integer overrideId = null;
PreparedStatement query = null;
ResultSet results = null;
try (Connection sqlConnection = sqlService.getConnection()) {
query = sqlConnection.prepareStatement(
... | [
"Gets an overrideID for a class name, method name\n\n@param className name of class\n@param methodName name of method\n@return override ID of method"
] | [
"Adds search fields from elements on a container page to a container page's document.\n@param document The document for the container page\n@param cms The current CmsObject\n@param resource The resource of the container page\n@param systemFields The list of field names for fields where mappings to should be discard... |
protected void runImportScript(CmsObject cms, CmsModule module) {
LOG.info("Executing import script for module " + module.getName());
m_report.println(
org.opencms.module.Messages.get().container(org.opencms.module.Messages.RPT_IMPORT_SCRIPT_HEADER_0),
I_CmsReport.FORMAT_HEADLIN... | [
"Runs the module import script.\n\n@param cms the CMS context to use\n@param module the module for which to run the script"
] | [
"Sets the color of the drop shadow.\n\n@param color The color of the drop shadow.",
"Add a '<=' clause so the column must be less-than or equals-to the value.",
"Retrieves the text value for the baseline duration.\n\n@return baseline duration text",
"Checks to see if the two matrices have the same shape an... |
public static dnsglobal_binding get(nitro_service service) throws Exception{
dnsglobal_binding obj = new dnsglobal_binding();
dnsglobal_binding response = (dnsglobal_binding) obj.get_resource(service);
return response;
} | [
"Use this API to fetch a dnsglobal_binding resource ."
] | [
"Creates an association row representing the given entry and adds it to the association managed by the given\npersister.",
"This method lists all tasks defined in the file in a hierarchical\nformat, reflecting the parent-child relationships between them.\n\n@param file MPX file",
"Returns the time elapsed by th... |
private void tagvalue(Options opt, Doc c) {
Tag tags[] = c.tags("tagvalue");
if (tags.length == 0)
return;
for (Tag tag : tags) {
String t[] = tokenize(tag.text());
if (t.length != 2) {
System.err.println("@tagvalue expects two fields: " + tag.text());
continue;
}
tableLine(Align.RIGHT... | [
"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"
] | [
"Determine if a CharSequence can be parsed as a Float.\n\n@param self a CharSequence\n@return true if the CharSequence can be parsed\n@see #isFloat(String)\n@since 1.8.2",
"Find the animation associated with this avatar with the given name.\n@param name name of animation to look for\n@return {@link GVRAnimator} ... |
public ThreadUsage getThreadUsage() {
ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean();
ThreadUsage threadUsage = new ThreadUsage();
long[] threadIds = threadMxBean.getAllThreadIds();
threadUsage.liveThreadCount = threadIds.length;
for (long tId : threadIds) {
... | [
"Gets the thread usage.\n\n@return the thread usage"
] | [
"Return a set of all DeclarationBinder matching the DeclarationBinderFilter of the Linker.\n\n@return a Set of all DeclarationBinder matching the DeclarationBinderFilter of the Linker.",
"Method generates abbreviated exception message.\n\n@param message\nOriginal log message\n@param throwable\nThe attached throwa... |
protected PatchEntry resolveForElement(final PatchElement element) throws PatchingException {
assert state == State.NEW;
final PatchElementProvider provider = element.getProvider();
final String layerName = provider.getName();
final LayerType layerType = provider.getLayerType();
... | [
"Get the target entry for a given patch element.\n\n@param element the patch element\n@return the patch entry\n@throws PatchingException"
] | [
"Sends all events to the web service. Events will be transformed with mapper before sending.\n\n@param events the events",
"Feeds input stream to data consumer using metadata from tar entry.\n@param consumer the consumer\n@param inputStream the stream to feed\n@param entry the entry to use for metadata\n@throws I... |
private void stopDone() {
synchronized (stopLock) {
final StopContext stopContext = this.stopContext;
this.stopContext = null;
if (stopContext != null) {
stopContext.complete();
}
stopLock.notifyAll();
}
} | [
"Callback from the worker when it terminates"
] | [
"Populates data in this Options from the character stream.\n@param in The Reader\n@throws IOException If there is a problem reading data",
"Write the standard set of day types.\n\n@param calendars parent collection of calendars",
"Starts the named animation.\n@see GVRAvatar#stop(String)\n@see GVRAnimationEngine... |
private String escapeQuotes(String value)
{
StringBuilder sb = new StringBuilder();
int length = value.length();
char c;
sb.append('"');
for (int index = 0; index < length; index++)
{
c = value.charAt(index);
sb.append(c);
if (c == '"')
{
... | [
"This method is called when double quotes are found as part of\na value. The quotes are escaped by adding a second quote character\nand the entire value is quoted.\n\n@param value text containing quote characters\n@return escaped and quoted text"
] | [
"Default implementation returns unmodified original Query\n\n@see org.apache.ojb.broker.accesslayer.QueryCustomizer#customizeQuery",
"Obtains a local date in Symmetry454 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 ... |
private void readProjectExtendedAttributes(Project project)
{
Project.ExtendedAttributes attributes = project.getExtendedAttributes();
if (attributes != null)
{
for (Project.ExtendedAttributes.ExtendedAttribute ea : attributes.getExtendedAttribute())
{
readFieldAlias(e... | [
"This method extracts project extended attribute data from an MSPDI file.\n\n@param project Root node of the MSPDI file"
] | [
"Builds IMAP envelope String from pre-parsed data.",
"The only properties added to a relationship are the columns representing the index of the association.",
"Get the photos for the specified group pool, optionally filtering by taf.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr... |
@Nullable
private static Converter<List<String>, Object> createPrimitiveTypeConverter(final Class<?> resultClass) {
Object defaultValue = defaultValue(resultClass);
if (defaultValue == null) {
// For primitive type, the default value shouldn't be null
return null;
}
return new BasicConve... | [
"Creates a converter function that converts value into primitive type.\n\n@return A converter function or {@code null} if the given type is not primitive type or boxed type"
] | [
"Non-zero counts of Householder vectors and computes a permutation\nmatrix that ensures diagonal entires are all structurally nonzero.\n\n@param parent elimination tree\n@param ll linked list for each row that specifies elements that are not zero",
"Calls the specified Stitch function.\n\n@param name the name of ... |
@SuppressWarnings("deprecation")
public BUILDER setAllowedValues(String ... allowedValues) {
assert allowedValues!= null;
this.allowedValues = new ModelNode[allowedValues.length];
for (int i = 0; i < allowedValues.length; i++) {
this.allowedValues[i] = new ModelNode(allowedValues... | [
"Sets allowed values for attribute\n\n@param allowedValues values that are legal as part in this attribute\n@return a builder that can be used to continue building the attribute definition"
] | [
"Sets the currency code, or the regular expression to select codes.\n\n@param codes the currency codes or code expressions, not null.\n@return the query for chaining.",
"Delivers the correct JSON Object for the dockers\n\n@param dockers\n@throws org.json.JSONException",
"Converts a boolean array containing the ... |
@Override
public void registerTransformers(SubsystemTransformerRegistration subsystemRegistration) {
ResourceTransformationDescriptionBuilder builder = ResourceTransformationDescriptionBuilder.Factory.createSubsystemInstance();
builder.addChildResource(DeploymentPermissionsResourceDefinition.DEPLOYM... | [
"Registers the transformers for JBoss EAP 7.0.0.\n\n@param subsystemRegistration contains data about the subsystem registration"
] | [
"Throws an IllegalArgumentException when the given value is not true.\n@param value the value to assert if true\n@param message the message to display if the value is false\n@return the value",
"Returns the primary message codewords for mode 3.\n\n@param postcode the postal code\n@param country the country code\n... |
public static final UUID parseUUID(String value)
{
return value == null || value.isEmpty() ? null : UUID.fromString(value);
} | [
"Convert the MSPDI representation of a UUID into a Java UUID instance.\n\n@param value MSPDI UUID\n@return Java UUID instance"
] | [
"Sets the actual path for this ID\n\n@param pathId ID of path\n@param path value of path",
"Gets the groupby for ReportQueries of all Criteria and Sub Criteria\nthe elements are of class FieldHelper\n@return List of FieldHelper",
"Retrieve the value from the REST request body.\n\nTODO: REST-Server value cannot ... |
public static Object toObject(Class<?> clazz, Object value) throws ParseException {
if (value == null) {
return null;
}
if (clazz == null) {
return value;
}
if (java.sql.Date.class.isAssignableFrom(clazz)) {
return toDate(value);
}
... | [
"Convert an Object of type Class to an Object."
] | [
"Store the data of a print job in the registry.\n\n@param printJobStatus the print job status",
"Creates a ServiceCall from a paging operation.\n\n@param first the observable to the first page\n@param next the observable to poll subsequent pages\n@param callback the client-side callback\n@param <E> the element ty... |
public void addCustomNotificationRecipient(String userID) {
BoxUser user = new BoxUser(null, userID);
this.customNotificationRecipients.add(user.new Info());
} | [
"Add a user by ID to the list of people to notify when the retention period is ending.\n@param userID The ID of the user to add to the list."
] | [
"Internal initialization.\n@throws ParserConfigurationException",
"perform the actual matching",
"An extremely simple method for identifying multimedia. This\ncould be improved, but it's good enough for this example.\n\n@param file which could be an image or a video\n@return true if the file can be previewed, f... |
public Duration getFinishSlack()
{
Duration finishSlack = (Duration) getCachedValue(TaskField.FINISH_SLACK);
if (finishSlack == null)
{
Duration duration = getDuration();
if (duration != null)
{
finishSlack = DateHelper.getVariance(this, getEarlyFinish(), getL... | [
"Retrieve the finish slack.\n\n@return finish slack"
] | [
"copied and altered from TransactionHelper",
"Removes all the given tags from the document.\n\n@param dom the document object.\n@param tagName the tag name, examples: script, style, meta\n@return the changed dom.",
"Write exceptions into the format used by MSPDI files from\nProject 2007 onwards.\n\n@param c... |
public void setBeliefValue(String agent_name, final String belief_name,
final Object new_value, Connector connector) {
((IExternalAccess) connector.getAgentsExternalAccess(agent_name))
.scheduleStep(new IComponentStep<Integer>() {
public IFuture<Integer> execute... | [
"This method changes the value of an agent's belief through its external\naccess\n\n@param agent_name\nThe name of the agent to change a belief\n@param belief_name\nThe name of the belief to change\n@param new_value\nThe new value of the belief to be changed\n@param connector\nThe connector to get the external acce... | [
"Modifies the specified mode and length arrays to combine adjacent modes of the same type, returning the updated index point.",
"Creates a status instance from the given serviceReferences.\nThe given list is copied to a new set made immutable.\n\n@param serviceReferencesBound the set of ServiceReference which a... |
public static CharSequence getAt(CharSequence text, Range range) {
RangeInfo info = subListBorders(text.length(), range);
CharSequence sequence = text.subSequence(info.from, info.to);
return info.reverse ? reverse(sequence) : sequence;
} | [
"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"
] | [
"Obtains a Julian zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Julian zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Resolve the single type argument of the given generic interface against\nthe ... |
public static void unzip(Path zip, Path target) throws IOException {
try (final ZipFile zipFile = new ZipFile(zip.toFile())){
unzip(zipFile, target);
}
} | [
"Unzip a file to a target directory.\n@param zip the path to the zip file.\n@param target the path to the target directory into which the zip file will be unzipped.\n@throws IOException"
] | [
"Clones the given collection.\n\n@param collDef The collection descriptor\n@param prefix A prefix for the name\n@return The cloned collection",
"Setter for property value. Doesn't affect entity version and doesn't\ninvalidate any of the cached entity iterables.\n\n@param localId entity local id.\n@param value... |
public static void extract( DMatrix src,
int srcY0, int srcY1,
int srcX0, int srcX1,
DMatrix dst ) {
((ReshapeMatrix)dst).reshape(srcY1-srcY0,srcX1-srcX0);
extract(src,srcY0,srcY1,srcX0,srcX1,dst,0,0);
} | [
"Extract where the destination is reshaped to match the extracted region\n@param src The original matrix which is to be copied. Not modified.\n@param srcX0 Start column.\n@param srcX1 Stop column+1.\n@param srcY0 Start row.\n@param srcY1 Stop row+1.\n@param dst Where the submatrix are stored. Modified."
] | [
"calculate distance of two points\n\n@param a\n@param b\n@return",
"Instantiates a new event collector.",
"Retrieves a vertex attribute as an integer array.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update... |
public Label htmlLabel(String html) {
Label label = new Label();
label.setContentMode(ContentMode.HTML);
label.setValue(html);
return label;
} | [
"Creates a new HTML-formatted label with the given content.\n\n@param html the label content"
] | [
"Creates a REST client used to perform Voldemort operations against the\nCoordinator\n\n@param storeName Name of the store to perform the operations on\n@param resolver Custom resolver as specified by the application\n@return",
"Parses server section of Zookeeper connection string",
"Sets the debug JPDA remote ... |
public static TestCaseStartedEvent withExecutorInfo(TestCaseStartedEvent event) {
event.getLabels().add(createHostLabel(getHostname()));
event.getLabels().add(createThreadLabel(format("%s.%s(%s)",
ManagementFactory.getRuntimeMXBean().getName(),
Thread.curr... | [
"Add information about host and thread to specified test case started event\n\n@param event given event to update\n@return updated event"
] | [
"Send a database announcement to all registered listeners.\n\n@param slot the media slot whose database availability has changed\n@param database the database whose relevance has changed\n@param available if {@code} true, the database is newly available, otherwise it is no longer relevant",
"Add tags to a photo.\... |
public void put(final String key, final Object value) {
if (TASK_DIRECTORY_KEY.equals(key) && this.values.keySet().contains(TASK_DIRECTORY_KEY)) {
// ensure that no one overwrites the task directory
throw new IllegalArgumentException("Invalid key: " + key);
}
if (value =... | [
"Put a new value in map.\n\n@param key id of the value for looking up.\n@param value the value."
] | [
"Shows the given step.\n\n@param step the step",
"Use this API to update systemuser.",
"Counts a single pair of coordinates in all datasets.\n\n@param xCoord\n@param yCoord\n@param itemDocument",
"Create a discount curve from forwards given by a LIBORMonteCarloModel. If the model uses multiple curves, return ... |
public static void doExtendTraits(final ClassNode cNode, final SourceUnit unit, final CompilationUnit cu) {
if (cNode.isInterface()) return;
boolean isItselfTrait = Traits.isTrait(cNode);
SuperCallTraitTransformer superCallTransformer = new SuperCallTraitTransformer(unit);
if (isItselfTr... | [
"Given a class node, if this class node implements a trait, then generate all the appropriate\ncode which delegates calls to the trait. It is safe to call this method on a class node which\ndoes not implement a trait.\n@param cNode a class node\n@param unit the source unit"
] | [
"Append Join for SQL92 Syntax without parentheses",
"Return a list of 'Files' of downloaded or uploaded files. Filters build files without local and remote paths.\n\n@param buildFilesStream - Stream of build Artifacts or Dependencies.\n@return - List of build files.",
"Add server redirect to a profile\n\n@param... |
protected ClassDescriptor selectClassDescriptor(Map row) throws PersistenceBrokerException
{
ClassDescriptor result = m_cld;
Class ojbConcreteClass = (Class) row.get(OJB_CONCRETE_CLASS_KEY);
if(ojbConcreteClass != null)
{
result = m_cld.getRepository().getDescriptor... | [
"Check if there is an attribute which tells us which concrete class is to be instantiated."
] | [
"Parses a reflection modifier to a list of string\n\n@param modifiers The modifier to parse\n@return The resulting string list",
"Writes the results of the processing to a file.",
"Returns the x-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the x coordinate",
"Returns true if the... |
private void countCooccurringProperties(
StatementDocument statementDocument, UsageRecord usageRecord,
PropertyIdValue thisPropertyIdValue) {
for (StatementGroup sg : statementDocument.getStatementGroups()) {
if (!sg.getProperty().equals(thisPropertyIdValue)) {
Integer propertyId = getNumId(sg.getPropert... | [
"Counts each property for which there is a statement in the given item\ndocument, ignoring the property thisPropertyIdValue to avoid properties\ncounting themselves.\n\n@param statementDocument\n@param usageRecord\n@param thisPropertyIdValue"
] | [
"This produces a shorter string for the address that uses the canonical representation but not using leading zeroes.\n\nEach address has a unique compressed string.",
"Gets or creates id of the entity type.\n\n@param entityType entity type name.\n@param allowCreate if set to true and if there is no entity type l... |
public static base_response update(nitro_service client, nsdiameter resource) throws Exception {
nsdiameter updateresource = new nsdiameter();
updateresource.identity = resource.identity;
updateresource.realm = resource.realm;
updateresource.serverclosepropagation = resource.serverclosepropagation;
return upd... | [
"Use this API to update nsdiameter."
] | [
"add a Component to this Worker. After the call dragging is enabled for this\nComponent.\n@param c the Component to register",
"Not implemented.\n@param point1 Point1\n@param point2 Point2\n@return Throws an exception.",
"Maps a duration unit value from a recurring task record in an MPX file\nto a TimeUnit inst... |
private long lastModified(Set<File> files) {
long result = 0;
for (File file : files) {
if (file.lastModified() > result)
result = file.lastModified();
}
return result;
} | [
"Get the last modified time for a set of files."
] | [
"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.",
"Initialize an instance of Widget Lib. It has to be done before any usage of library.\nThe application needs to hold onto the returned WidgetLib reference for as long as the... |
public static base_response update(nitro_service client, appfwlearningsettings resource) throws Exception {
appfwlearningsettings updateresource = new appfwlearningsettings();
updateresource.profilename = resource.profilename;
updateresource.starturlminthreshold = resource.starturlminthreshold;
updateresource.s... | [
"Use this API to update appfwlearningsettings."
] | [
"Old SOAP client uses new SOAP service with the\nredirection to the new endpoint and transformation\non the server side",
"Creates a spin wrapper for a data input of a given data format.\n\n@param input the input to wrap\n@param format the data format of the input\n@return the spin wrapper for the input\n\n@throw... |
protected DatabaseConnection getSavedConnection() {
NestedConnection nested = specialConnection.get();
if (nested == null) {
return null;
} else {
return nested.connection;
}
} | [
"Returns the connection that has been saved or null if none."
] | [
"Decide which donor node to steal from. This is a policy implementation.\nI.e., in the future, additional policies could be considered. At that\ntime, this method should be overridden in a sub-class, or a policy object\nought to implement this algorithm.\n\nCurrent policy:\n\n1) If possible, a stealer node that is ... |
public static vlan get(nitro_service service, Long id) throws Exception{
vlan obj = new vlan();
obj.set_id(id);
vlan response = (vlan) obj.get_resource(service);
return response;
} | [
"Use this API to fetch vlan resource of given name ."
] | [
"Utility method used to convert a Number into a BigInteger.\n\n@param value Number instance\n@return BigInteger instance",
"Find the scheme to use to connect to the service.\nUses java annotations first and if not found, uses kubernetes annotations on the service object.\n\n@param service\nThe target service.\n@p... |
public static aaauser_intranetip_binding[] get(nitro_service service, String username) throws Exception{
aaauser_intranetip_binding obj = new aaauser_intranetip_binding();
obj.set_username(username);
aaauser_intranetip_binding response[] = (aaauser_intranetip_binding[]) obj.get_resources(service);
return respon... | [
"Use this API to fetch aaauser_intranetip_binding resources of given name ."
] | [
"Carry out any post-processing required to tidy up\nthe data read from the database.",
"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}",
"Use this API to add... |
public boolean isFunctionName( String s ) {
if( input1.containsKey(s))
return true;
if( inputN.containsKey(s))
return true;
return false;
} | [
"Returns true if the string matches the name of a function"
] | [
"Binding view holder with payloads is used to handle partial changes in item.",
"Render the scalebar.\n\n@param mapContext The context of the map for which the scalebar is created.\n@param scalebarParams The scalebar parameters.\n@param tempFolder The directory in which the graphic file is created.\n@param templa... |
public static systemuser[] get(nitro_service service) throws Exception{
systemuser obj = new systemuser();
systemuser[] response = (systemuser[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the systemuser resources that are configured on netscaler."
] | [
"This filter adds a blur effect to the image using the specified radius and sigma.\n@param radius Radius used in the gaussian function to generate a matrix, maximum value is 150.\nThe bigger the radius more blurred will be the image.\n@param sigma Sigma used in the gaussian function.",
"Parses the list of query i... |
public static boolean classNodeImplementsType(ClassNode node, Class target) {
ClassNode targetNode = ClassHelper.make(target);
if (node.implementsInterface(targetNode)) {
return true;
}
if (node.isDerivedFrom(targetNode)) {
return true;
}
i... | [
"This method tells you if a ClassNode implements or extends a certain class.\n@param node\nthe node\n@param target\nthe class\n@return\ntrue if the class node 'is a' target"
] | [
"Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception",
"If there is an unprocessed change event for a particular document ID, fetch it from the\nchange stream listener, and remove it. By reading the event here, we are assuming it will be\npr... |
private static void setCmsOfflineProject(CmsObject cms) {
if (null == cms) {
return;
}
final CmsRequestContext cmsContext = cms.getRequestContext();
final CmsProject cmsProject = cmsContext.getCurrentProject();
if (cmsProject.isOnlineProject()) {
CmsPro... | [
"Sets the appropriate OpenCms context.\n@param cms The OpenCms instance object."
] | [
"Returns the full record for a single team.\n\n@param team Globally unique identifier for the team.\n@return Request object",
"read all brokers in the zookeeper\n\n@param zkClient zookeeper client\n@return all brokers",
"Utility function that copies a string array except for the first element\n\n@param arr Ori... |
protected final void error(final HttpServletResponse httpServletResponse, final Throwable e) {
httpServletResponse.setContentType("text/plain");
httpServletResponse.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
try (PrintWriter out = httpServletResponse.getWriter()) {
out.prin... | [
"Send an error to the client with an exception.\n\n@param httpServletResponse the http response to send the error to\n@param e the error that occurred"
] | [
"This filter uses a 9-patch to overlay the image.\n\n@param imageUrl Watermark image URL. It is very important to understand that the same image\nloader that Thumbor uses will be used here.",
"A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the field... |
private void readTasks(Integer id)
{
Integer currentID = id;
Table table = getTable("WBSTAB");
while (currentID.intValue() != 0)
{
MapRow row = table.find(currentID);
Task task = m_projectFile.getTaskByUniqueID(row.getInteger("TASK_ID"));
readLeafTasks(task, row.ge... | [
"Read leaf tasks attached to the WBS.\n\n@param id initial WBS ID"
] | [
"Accessor method used to retrieve an Rate object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing... |
public LuaScriptBlock endBlockReturn(LuaValue value) {
add(new LuaAstReturnStatement(argument(value)));
return new LuaScriptBlock(script);
} | [
"End the script block, adding a return value statement\n@param value the value to return\n@return the new {@link LuaScriptBlock} instance"
] | [
"Update the content of the tables.",
"Convert a document List into arrays storing the data features and labels.\n\n@param document\nTraining documents\n@return A Pair, where the first element is an int[][][] representing the\ndata and the second element is an int[] representing the labels",
"Returns an unmodifi... |
public Formation scale(String appName, String processType, int quantity) {
return connection.execute(new FormationUpdate(appName, processType, quantity), apiKey);
} | [
"Scales a process type\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param processType type of process to maintain\n@param quantity number of processes to maintain"
] | [
"Call when you are done with the client\n\n@throws Exception",
"Get the root build which triggered the current build. The build root is considered to be the one furthest one\naway from the current build which has the isPassIdentifiedDownstream active, if no parent build exists, check\nthat the current build needs... |
Path resolveBaseDir(final String name, final String dirName) {
final String currentDir = SecurityActions.getPropertyPrivileged(name);
if (currentDir == null) {
return jbossHomeDir.resolve(dirName);
}
return Paths.get(currentDir);
} | [
"Resolves the base directory. If the system property is set that value will be used. Otherwise the path is\nresolved from the home directory.\n\n@param name the system property name\n@param dirName the directory name relative to the base directory\n\n@return the resolved base directory"
] | [
"Check whether the value is matched by a regular expression.\n\n@param value value\n@param regex regular expression\n@return true when value is matched",
"Reset the internal state of this object back to what it originally was.\n\nUsed then reloading a server or in a slave host controller following a post-boot rec... |
public static int Maximum(ImageSource fastBitmap, int startX, int startY, int width, int height) {
int max = 0;
if (fastBitmap.isGrayscale()) {
for (int i = startX; i < height; i++) {
for (int j = startY; j < width; j++) {
int gray = fastBitmap.getR... | [
"Get maximum gray value in the image.\n\n@param fastBitmap Image to be processed.\n@param startX Initial X axis coordinate.\n@param startY Initial Y axis coordinate.\n@param width Width.\n@param height Height.\n@return Maximum gray."
] | [
"Fetch flag resource by Country\n\n@param country Country\n@return int of resource | 0 value if not exists",
"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>tr... |
static BsonDocument getVersionedFilter(
@Nonnull final BsonValue documentId,
@Nullable final BsonValue version
) {
final BsonDocument filter = new BsonDocument("_id", documentId);
if (version == null) {
filter.put(DOCUMENT_VERSION_FIELD, new BsonDocument("$exists", BsonBoolean.FALSE));
}... | [
"Returns a query filter for the given document _id and version. The version is allowed to be\nnull. The query will match only if there is either no version on the document in the database\nin question if we have no reference of the version or if the version matches the database's\nversion.\n\n@param documentId the ... | [
"Retrieve and validate the timeout value from the REST request.\n\"X_VOLD_REQUEST_TIMEOUT_MS\" is the timeout header.\n\n@return true if present, false if missing",
"Reports that a node is faulted.\n\n@param faulted the node faulted\n@param throwable the reason for fault",
"Sets the right padding for all cells ... |
static String findNonProgressingOp(Resource resource, boolean forServer, long timeout) throws OperationFailedException {
Resource.ResourceEntry nonProgressing = null;
for (Resource.ResourceEntry child : resource.getChildren(ACTIVE_OPERATION)) {
ModelNode model = child.getModel();
... | [
"Separate from other findNonProgressingOp variant to allow unit testing without needing a mock OperationContext"
] | [
"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...)",
"Generates the Base64 encoded SHA-1 hash for content available in the stream.\nIt can be used to calculate the has... |
public double[] Kernel1D(int size) {
if (((size % 2) == 0) || (size < 3) || (size > 101)) {
try {
throw new Exception("Wrong size");
} catch (Exception e) {
e.printStackTrace();
}
}
int r = size / 2;
// kernel
do... | [
"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."
] | [
"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 operat... |
@Override
public boolean postExecute(MavenBuildProxy build, MavenProject pom, MojoInfo mojo, BuildListener listener,
Throwable error) {
//listener.getLogger().println("[MavenDependenciesRecorder] mojo: " + mojo.getClass() + ":" + mojo.getGoal());
//listener.getLogger().println("[MavenDep... | [
"Mojos perform different dependency resolution, so we add dependencies for each mojo."
] | [
"Setter for the file format.\n@param fileFormat File format the configuration file is in.",
"Converts a TimeUnit instance to an integer value suitable for\nwriting to an MPX file.\n\n@param recurrence RecurringTask instance\n@return integer value",
"Update the Target Filter of the ExporterService.\nApply the in... |
private boolean isWorkingDate(Date date, Day day)
{
ProjectCalendarDateRanges ranges = getRanges(date, null, day);
return ranges.getRangeCount() != 0;
} | [
"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 und... | [
"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 lexR... |
public List<TimephasedCost> getTimephasedBaselineCost(int index)
{
return m_timephasedBaselineCost[index] == null ? null : m_timephasedBaselineCost[index].getData();
} | [
"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"
] | [
"Performs DBSCAN cluster analysis.\n\n@param points the points to cluster\n@return the list of clusters\n@throws NullArgumentException if the data points are null",
"Delete a license from the repository\n\n@param licName The name of the license to remove",
"Add the given headers to the given HTTP request.\n@par... |
private Long string2long(String text, DateTimeFormat fmt) {
// null or "" returns null
if (text == null) return null;
text = text.trim();
if (text.length() == 0) return null;
Date date = fmt.parse(text);
return date != null ? UTCDateBox.date2utc(date) : ... | [
"Parses the supplied text and converts it to a Long\ncorresponding to that midnight in UTC on the specified date.\n\n@return null if it fails to parsing using the specified\nDateTimeFormat"
] | [
"Add information about host and thread to specified test case started event\n\n@param event given event to update\n@return updated event",
"Inject external stylesheets.",
"Set the background color.\n\nIf you don't set the background color, the default is an opaque black:\n{@link Color#BLACK}, 0xff000000.\n\n@pa... |
public final void notifyContentItemRangeInserted(int positionStart, int itemCount) {
int newHeaderItemCount = getHeaderItemCount();
int newContentItemCount = getContentItemCount();
if (positionStart < 0 || itemCount < 0 || positionStart + itemCount > newContentItemCount) {
throw new ... | [
"Notifies that multiple content items are inserted.\n\n@param positionStart the position.\n@param itemCount the item count."
] | [
"Handler for week of month changes.\n@param event the change event.",
"BuildInteractiveObjectFromAnchor is a special type of interactive object in that it does not get\nbuilt using ROUTE's.\n\n@param anchorSensor is the Sensor that describes the sensor set to an Anchor\n@param anchorDestination is either another ... |
public static <E, V> ServiceFuture<List<E>> fromHeaderPageResponse(Observable<ServiceResponseWithHeaders<Page<E>, V>> first, final Func1<String, Observable<ServiceResponseWithHeaders<Page<E>, V>>> next, final ListOperationCallback<E> callback) {
final AzureServiceFuture<List<E>> serviceCall = new AzureServiceFu... | [
"Creates a ServiceCall from a paging operation that returns a header response.\n\n@param first the observable to the first page\n@param next the observable to poll subsequent pages\n@param callback the client-side callback\n@param <E> the element type\n@param <V> the header object type\n@return the future based Ser... | [
"Lock the given region. Does not report failures.",
"Use this API to fetch a tmglobal_tmsessionpolicy_binding resources.",
"This is the main entry point used to convert the internal representation\nof timephased baseline cost into an external form which can\nbe displayed to the user.\n\n@param file parent proj... |
@PostConstruct
public final void init() {
this.cleanUpTimer = Executors.newScheduledThreadPool(1, timerTask -> {
final Thread thread = new Thread(timerTask, "Clean up old job records");
thread.setDaemon(true);
return thread;
});
this.cleanUpTimer.scheduleA... | [
"Called by spring on initialization."
] | [
"Creates and returns a matrix which is idential to this one.\n\n@return A new identical matrix.",
"Reads a single schema file.\n\n@param reader The schema reader\n@param schemaFile The schema file\n@return The model",
"Iterates over all the documents, adding each to the given target.\n\n@param target the co... |
public void unlock() {
for (Locale l : m_lockedBundleFiles.keySet()) {
LockedFile f = m_lockedBundleFiles.get(l);
f.tryUnlock();
}
if (null != m_descFile) {
m_descFile.tryUnlock();
}
} | [
"Unlock all files opened for writing."
] | [
"Copy the specified bytes into a new array\n\n@param array The array to copy from\n@param from The index in the array to begin copying from\n@param to The least index not copied\n@return A new byte[] containing the copied bytes",
"Dump data for all non-summary tasks to stdout.\n\n@param name file name",
"Add a ... |
public String getRecordSchema() throws IOException {
Schema schema = getInputPathAvroSchema();
String recSchema = schema.toString();
return recSchema;
} | [
"Get the schema for the Avro Record from the object container file"
] | [
"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",
"Calculate start dates for a yearly recurrence.\n\n@... |
protected void closeConnection(ConnectionHandle connection) {
if (connection != null) {
try {
connection.internalClose();
} catch (Throwable t) {
logger.error("Destroy connection exception", t);
} finally {
this.pool.postDestroyConnection(connection);
}
}
} | [
"Closes off this connection\n@param connection to close"
] | [
"Check the document field's type\nand object\n@param lhs The field to check\n@param rhs The type\n@return Expression: lhs $type rhs",
"One of the two main methods in this class. Creates a RendererViewHolder instance with a\nRenderer inside ready to be used. The RendererBuilder to create a RendererViewHolder using... |
public int deleteById(DatabaseConnection databaseConnection, ID id, ObjectCache objectCache) throws SQLException {
if (mappedDelete == null) {
mappedDelete = MappedDelete.build(dao, tableInfo);
}
int result = mappedDelete.deleteById(databaseConnection, id, objectCache);
if (dao != null && !localIsInBatchMode... | [
"Delete an object from the database by id."
] | [
"Encode a long into a byte array at an offset\n\n@param ba Byte array\n@param offset Offset\n@param v Long value\n@return byte array given in input",
"Checks whether this notification is from CleverTap.\n\n@param extras The payload from the GCM intent\n@return See {@link NotificationInfo}",
"Update max min.\n\n... |
public void copyCategories(CmsObject cms, CmsResource fromResource, String toResourceSitePath) throws CmsException {
List<CmsCategory> categories = readResourceCategories(cms, fromResource);
for (CmsCategory category : categories) {
addResourceToCategory(cms, toResourceSitePath, category);
... | [
"Adds all categories from one resource to another, skipping categories that are not available for the resource copied to.\n\nThe resource where categories are copied to has to be locked.\n\n@param cms the CmsObject used for reading and writing.\n@param fromResource the resource to copy the categories from.\n@param ... | [
"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",
"Use this API to fetch a aaaglobal_binding resource .",
"Get all views from the list content\n@retu... |
protected void copyClasspathResource(File outputDirectory,
String resourceName,
String targetFileName) throws IOException
{
String resourcePath = classpathPrefix + resourceName;
InputStream resourceStream = getClass().... | [
"Copy a single named resource from the classpath to the output directory.\n@param outputDirectory The destination directory for the copied resource.\n@param resourceName The filename of the resource.\n@param targetFileName The name of the file created in {@literal outputDirectory}.\n@throws IOException If the resou... | [
"Read custom property definitions for resources.\n\n@param gpResources GanttProject resources",
"Print a date.\n\n@param value Date instance\n@return string representation of a date",
"Moves the given row up.\n\n@param row the row to move",
"Use this API to fetch filtered set of dbdbprofile resources.\nset th... |
public void renumberIDs()
{
if (!isEmpty())
{
Collections.sort(this);
T firstEntity = get(0);
int id = NumberHelper.getInt(firstEntity.getID());
if (id != 0)
{
id = 1;
}
for (T entity : this)
{
entity.setID(I... | [
"This method can be called to ensure that the IDs of all\nentities are sequential, and start from an\nappropriate point. If entities are added to and removed from\nthis list, then the project is loaded into Microsoft\nproject, if the ID values have gaps in the sequence, there will\nbe blank rows shown."
] | [
"Update the anchor based on arcore best knowledge of the world\n\n@param scale",
"Create new logging action\nThis method check if there is an old instance for this thread-local\nIf not - Initialize new instance and set it as this thread-local's instance\n@param logger\n@param auditor\n@param instance\n@return whe... |
public RasterLayerInfo asLayerInfo(TileMap tileMap) {
RasterLayerInfo layerInfo = new RasterLayerInfo();
layerInfo.setCrs(tileMap.getSrs());
layerInfo.setDataSourceName(tileMap.getTitle());
layerInfo.setLayerType(LayerType.RASTER);
layerInfo.setMaxExtent(asBbox(tileMap.getBoundingBox()));
layerInfo.setTile... | [
"Transform a TMS layer description object into a raster layer info object.\n\n@param tileMap\nThe TMS layer description object.\n@return The raster layer info object as used by Geomajas."
] | [
"Query for an object in the database which matches the id argument.",
"Get the waveform previews available for all tracks currently loaded in any player, either on the play deck, or\nin a hot cue.\n\n@return the previews associated with all current players, including for any tracks loaded in their hot cue slots\n... |
public ThumborUrlBuilder buildImage(String image) {
if (image == null || image.length() == 0) {
throw new IllegalArgumentException("Image must not be blank.");
}
return new ThumborUrlBuilder(host, key, image);
} | [
"Begin building a url for this host with the specified image."
] | [
"Sets the target translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator\n@return this to allow chaining",
"Creates a curator built using the given zookeeper connection string and timeout",
"It's enou... |
public void validate() throws PackagingException {
if (control == null || !control.isDirectory()) {
throw new PackagingException("The 'control' attribute doesn't point to a directory. " + control);
}
if (changesIn != null) {
if (changesIn.exists() && (!changesIn.isFile(... | [
"Validates the input parameters."
] | [
"Merge the contents of the given plugin.xml into this one.",
"Removes the given entity from the inverse associations it manages.",
"Use this API to unset the properties of clusterinstance resources.\nProperties that need to be unset are specified in args array.",
"Computes the QR decomposition of A and store ... |
public static Map<String, String> getContentMap(File file, String separator) throws IOException {
List<String> content = getContentLines(file);
Map<String, String> map = new LinkedHashMap<String, String>();
for (String line : content) {
String[] spl = line.split(separator);
if (line.trim(... | [
"Get content of a file as a Map<String, String>, using separator to split values\n@param file File to get content\n@param separator The separator\n@return The map with the values\n@throws IOException I/O Error"
] | [
"The default field facets.\n\n@param categoryConjunction flag, indicating if category selections in the facet should be \"AND\" combined.\n@return the default field facets.",
"This is a convenience method provided to allow a day to be set\nas working or non-working, by using the day number to\nidentify the requir... |
@SuppressWarnings("WeakerAccess")
public TrackMetadata requestMetadataFrom(final DataReference track, final CdjStatus.TrackType trackType) {
return requestMetadataInternal(track, trackType, false);
} | [
"Ask the specified player for metadata about the track in the specified slot with the specified rekordbox ID,\nunless we have a metadata cache available for the specified media slot, in which case that will be used instead.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType id... | [
"Look for the closing parenthesis corresponding to the one at position\nrepresented by the opening index.\n\n@param text input expression\n@param opening opening parenthesis index\n@return closing parenthesis index",
"Processes the template for all collection definitions of the current class definition.\n\n@param... |
public static ComplexNumber Function2D(int x, int y, double wavelength, double orientation, double phaseOffset, double gaussVariance, double aspectRatio) {
double X = x * Math.cos(orientation) + y * Math.sin(orientation);
double Y = -x * Math.sin(orientation) + y * Math.cos(orientation);
doubl... | [
"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 respon... | [
"Retrieves a ProjectReader instance which can read a file of the\ntype specified by the supplied file name.\n\n@param name file name\n@return ProjectReader instance",
"Prints the results of the equation to standard out. Useful for debugging",
"Get layer style by name.\n\n@param name layer style name\n@return la... |
public User findByEmail(String email) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_FIND_BY_EMAIL);
parameters.put("find_email", email);
Response response = transportAPI.get(transportAPI.getPath(), paramet... | [
"Find the user by their email address.\n\nThis method does not require authentication.\n\n@param email\nThe email address\n@return The User\n@throws FlickrException"
] | [
"Converts a byte array to a hexadecimal string representation\n@param bb the byte array to convert\n@return string the string representation",
"Provide Jersey client for the targeted Grapes server\n\n@return webResource",
"Returns iterable containing assignments for this single legal hold policy.\nParameters ca... |
@Pure
public static <K, V> Pair<K, V> of(K k, V v) {
return new Pair<K, V>(k, v);
} | [
"Creates a new instance with the given key and value.\nMay be used instead of the constructor for convenience reasons.\n\n@param k\nthe key. May be <code>null</code>.\n@param v\nthe value. May be <code>null</code>.\n@return a newly created pair. Never <code>null</code>.\n@since 2.3"
] | [
"1-D Backward Discrete Cosine Transform.\n\n@param data Data.",
"Mbeans for FETCH_KEYS",
"Merge this ExecutionStatistics with all the statistics created within the child threads. All the child threads had to be created using Windup-specific\nThreadFactory in order to contain a reference to the parent thread.",
... |
public static Interface[] get(nitro_service service) throws Exception{
Interface obj = new Interface();
Interface[] response = (Interface[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the Interface resources that are configured on netscaler."
] | [
"Get the original-image using the specified URL suffix.\n\n@deprecated\n@see PhotosInterface#getImage(Photo, int)\n@param suffix\nThe URL suffix, including the .extension\n@return The BufferedImage object\n@throws IOException\n@throws FlickrException",
"Convert a Planner time into a Java date.\n\n0800\n\n@param v... |
public Record findRecordById(String id) {
if (directory == null)
init();
Property idprop = config.getIdentityProperties().iterator().next();
for (Record r : lookup(idprop, id))
if (r.getValue(idprop.getName()).equals(id))
return r;
return null; // not found
} | [
"Look up record by identity."
] | [
"We have an OLE compound document... but is it an MPP file?\n\n@param stream file input stream\n@return ProjectFile instance",
"Converts a string representation of an integer into an Integer object.\nSilently ignores any parse exceptions and returns null.\n\n@param value String representation of an integer\n@retu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.