query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
public String[] getReportSamples() {
final Map<String, String> sampleValues = new HashMap<>();
sampleValues.put("name1", "Secure Transpiler Mars");
sampleValues.put("version1", "4.7.0");
sampleValues.put("name2", "Secure Transpiler Bounty");
sampleValues.put("version2", "5.0... | [
"Displays a sample model for the report request.\n@return A string describing the structure of a certain report execution"
] | [
"Initialize the fat client for the given store.\n\n1. Updates the coordinatorMetadata 2.Gets the new store configs from the\nconfig file 3.Creates a new @SocketStoreClientFactory 4. Subsequently\ncaches the @StoreClient obtained from the factory.\n\n\nThis is synchronized because if Coordinator Admin is already doi... |
public static nspbr6 get(nitro_service service, String name) throws Exception{
nspbr6 obj = new nspbr6();
obj.set_name(name);
nspbr6 response = (nspbr6) obj.get_resource(service);
return response;
} | [
"Use this API to fetch nspbr6 resource of given name ."
] | [
"Returns the next object in the table.\n\n@throws IllegalStateException\nIf there was a problem extracting the object from SQL.",
"From the set of classes a new set is built containing all indexed\nsubclasses, but removing then all subtypes of indexed entities.\n\n@param selection\n\n@return a new set of entities... |
public void doRun(Properties properties) {
ServerSetup[] serverSetup = new PropertiesBasedServerSetupBuilder().build(properties);
if (serverSetup.length == 0) {
printUsage(System.out);
} else {
greenMail = new GreenMail(serverSetup);
log.info("Starting Green... | [
"Start and configure GreenMail using given properties.\n\n@param properties the properties such as System.getProperties()"
] | [
"Use this API to fetch all the vpnsessionaction resources that are configured on netscaler.",
"Computes the WordNet 2.0 POS tag corresponding to the PTB POS tag s.\n\n@param s a Penn TreeBank POS tag.",
"The quick way to detect for a tier of devices.\nThis method detects for devices which are likely to be capab... |
public static String[] addStringToArray(String[] array, String str) {
if (isEmpty(array)) {
return new String[]{str};
}
String[] newArr = new String[array.length + 1];
System.arraycopy(array, 0, newArr, 0, array.length);
newArr[array.length] = str;
return newA... | [
"Append the given String to the given String array, returning a new array\nconsisting of the input array contents plus the given String.\n\n@param array the array to append to (can be <code>null</code>)\n@param str the String to append\n@return the new array (never <code>null</code>)"
] | [
"Process the host info and determine which configuration elements are required on the slave host.\n\n@param hostInfo the host info\n@param root the model root\n@param extensionRegistry the extension registry\n@return",
"Fixed length fancy formatting for doubles. If possible decimal ... |
public void executeInsert(ClassDescriptor cld, Object obj) throws PersistenceBrokerException
{
if (logger.isDebugEnabled())
{
logger.debug("executeInsert: " + obj);
}
final StatementManagerIF sm = broker.serviceStatementManager();
PreparedStatement stmt = n... | [
"performs an INSERT operation against RDBMS.\n@param obj The Object to be inserted as a row of the underlying table.\n@param cld ClassDescriptor providing mapping information."
] | [
"Add a 'IS NOT NULL' clause so the column must not be null. '<>' NULL does not work.",
"Reset the combination generator.",
"Load a classifier from the specified InputStream. The classifier is\nreinitialized from the flags serialized in the classifier. This does not\nclose the InputStream.\n\n@param in\nTh... |
public static void append(Path self, Object text) throws IOException {
Writer writer = null;
try {
writer = new OutputStreamWriter(Files.newOutputStream(self, CREATE, APPEND), Charset.defaultCharset());
InvokerHelper.write(writer, text);
writer.flush();
W... | [
"Append the text at the end of the Path.\n\n@param self a Path\n@param text the text to append at the end of the Path\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0"
] | [
"Polls the next ParsedWord from the stack.\n\n@return next ParsedWord",
"Gets the actual type arguments of a class\n\n@param clazz The class to examine\n@return The type arguments",
"Parse currency.\n\n@param value currency value\n@return currency value",
"This intro hides the system bars.",
"Finish initial... |
boolean lockShared(final Integer permit, final long timeout, final TimeUnit unit) {
boolean result = false;
try {
result = lockSharedInterruptibly(permit, timeout, unit);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
return resul... | [
"Attempts shared acquisition with a max wait time.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the time value to wait for acquiring the lock\n@param unit - See {@code TimeUnit} for valid values\n@return {@code boolean} true on success."
] | [
"Use this API to fetch sslvserver_sslcipher_binding resources of given name .",
"Returns an HTML table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns.",
"Set the configuration property.\n\n@param key\n@param value\n... |
private void getSingleValue(Method method, Object object, Map<String, String> map)
{
Object value;
try
{
value = filterValue(method.invoke(object));
}
catch (Exception ex)
{
value = ex.toString();
}
if (value != null)
{
map.put(getProp... | [
"Retrieve a single value property.\n\n@param method method definition\n@param object target object\n@param map parameter values"
] | [
"Load the installation state based on the identity\n\n@param installedIdentity the installed identity\n@return the installation state\n@throws IOException",
"This method allows a resource assignment to be added to the\ncurrent task.\n\n@param resource the resource to assign\n@return ResourceAssignment object",
... |
public static final String printResourceUID(Integer value)
{
ProjectFile file = PARENT_FILE.get();
if (file != null)
{
file.getEventManager().fireResourceWrittenEvent(file.getResourceByUniqueID(value));
}
return (value.toString());
} | [
"Print a resource UID.\n\n@param value resource UID value\n@return resource UID string"
] | [
"Print a task type.\n\n@param value TaskType instance\n@return task type value",
"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",
"Generate the next permutation and retur... |
private boolean findBinding(Injector injector, Class<?> type) {
boolean found = false;
for (Key<?> key : injector.getBindings().keySet()) {
if (key.getTypeLiteral().getRawType().equals(type)) {
found = true;
break;
}
}
if (!found &&... | [
"Finds binding for a type in the given injector and, if not found,\nrecurses to its parent\n\n@param injector\nthe current Injector\n@param type\nthe Class representing the type\n@return A boolean flag, <code>true</code> if binding found"
] | [
"Adds the contents of a Java package to this JAR.\n\n@param clazz a class whose package we wish to add to the JAR.\n@param filter a filter to select particular classes\n@return {@code this}",
"Use this API to delete dnstxtrec resources.",
"Get minimum gray value in the image.\n\n@param fastBitmap Image to be p... |
protected Connection openConnection() throws IOException {
// Perhaps this can just be done once?
CallbackHandler callbackHandler = null;
SSLContext sslContext = null;
if (realm != null) {
sslContext = realm.getSSLContext();
CallbackHandlerFactory handlerFactory =... | [
"Connect and register at the remote domain controller.\n\n@return connection the established connection\n@throws IOException"
] | [
"Used to parse the dividend dates. Returns null if the date cannot be\nparsed.\n\n@param date String received that represents the date\n@return Calendar object representing the parsed date",
"Get the class name without the package\n\n@param c The class name with package\n@return the class name without the package... |
private void processRedirect(String stringStatusCode,
HttpMethod httpMethodProxyRequest,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) throws Exception {
// Check if the proxy res... | [
"Execute a redirected request\n\n@param stringStatusCode\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@throws Exception"
] | [
"Adds a listener to this collection.\n\n@param listener The listener to add",
"Deletes the disabled marker file in the directory of the specified version.\n\n@param version to enable\n@throws PersistenceFailureException if the marker file could not be deleted (can happen if\nthe storage system has become read-onl... |
public void seekToHolidayYear(String holidayString, String yearString) {
Holiday holiday = Holiday.valueOf(holidayString);
assert(holiday != null);
seekToIcsEventYear(HOLIDAY_ICS_FILE, yearString, holiday.getSummary());
} | [
"Seeks to the given holiday within the given year\n\n@param holidayString\n@param yearString"
] | [
"Removes a value from the list box. Nothing is done if the value isn't on\nthe list box.\n\n@param value the value to be removed from the list\n@param reload perform a 'material select' reload to update the DOM.",
"Generate the specified output file by merging the specified\nVelocity template with the supplied c... |
public static aaauser_auditsyslogpolicy_binding[] get(nitro_service service, String username) throws Exception{
aaauser_auditsyslogpolicy_binding obj = new aaauser_auditsyslogpolicy_binding();
obj.set_username(username);
aaauser_auditsyslogpolicy_binding response[] = (aaauser_auditsyslogpolicy_binding[]) obj.get_... | [
"Use this API to fetch aaauser_auditsyslogpolicy_binding resources of given name ."
] | [
"Return a long value which is the number of rows in the table.",
"Writes the data collected about classes to a file.",
"Returns an array of non null elements from the source array.\n\n@param tArray the source array\n@return the array",
"Creates a new Message from the specified text.",
"Generates a full list... |
public ColumnBuilder addFieldProperty(String propertyName, String value) {
fieldProperties.put(propertyName, value);
return this;
} | [
"When the JRField needs properties, use this method.\n@param propertyName\n@param value\n@return"
] | [
"Check if the provided date or any date after it are part of the series.\n@param nextDate the current date to check.\n@param previousOccurrences the number of events of the series that took place before the date to check.\n@return <code>true</code> if more dates (including the provided one) could be in the series, ... |
private List<Job> getJobs(final Jedis jedis, final String queueName, final long jobOffset, final long jobCount) throws Exception {
final String key = key(QUEUE, queueName);
final List<Job> jobs = new ArrayList<>();
if (JedisUtils.isDelayedQueue(jedis, key)) { // If delayed queue, use ZRANGEWITHS... | [
"Get list of Jobs from a queue.\n\n@param jedis\n@param queueName\n@param jobOffset\n@param jobCount\n@return"
] | [
"Ensure the current throughput levels for the tracked operation does not\nexceed set quota limits. Throws an exception if exceeded quota.\n\n@param quotaKey\n@param trackedOp",
"Last caller of this method will unregister the Mbean. All callers\ndecrement the counter.",
"Make a copy of JobContext of current thre... |
protected Object[] escape(final Format format, Object... args) {
// Transformer that escapes HTML,XML,JSON strings
Transformer<Object, Object> escapingTransformer = new Transformer<Object, Object>() {
@Override
public Object transform(Object object) {
return forma... | [
"Escapes args' string values according to format\n\n@param format the Format used by the PrintStream\n@param args the array of args to escape\n@return The cloned and escaped array of args"
] | [
"Use this API to update responderpolicy resources.",
"Recursively builds the VFS entry bean for the quick filtering function in the folder tab.<p<\n\n@param resource the resource\n@param childMap map from parent to child resources\n@param filterMatches the resources matching the filter\n@param parentPaths root pa... |
private void setTaskNotes(Task task, byte[] data, ExtendedData taskExtData, FixDeferFix taskVarData)
{
String notes = taskExtData.getString(TASK_NOTES);
if (notes == null && data.length == 366)
{
byte[] offsetData = taskVarData.getByteArray(getOffset(data, 362));
if (offsetData !=... | [
"There appear to be two ways of representing task notes in an MPP8 file.\nThis method tries to determine which has been used.\n\n@param task task\n@param data task data\n@param taskExtData extended task data\n@param taskVarData task var data"
] | [
"Updates the date and time formats.\n\n@param properties project properties",
"Checks to see if a WORD matches the name of a macro. if it does it applies the macro at that location",
"Create User Application Properties\nCreate application properties for a user\n@param userId User Id (required)\n@param properti... |
public static String[] copyArrayCutFirst(String[] arr) {
if(arr.length > 1) {
String[] arrCopy = new String[arr.length - 1];
System.arraycopy(arr, 1, arrCopy, 0, arrCopy.length);
return arrCopy;
} else {
return new String[0];
}
} | [
"Utility function that copies a string array except for the first element\n\n@param arr Original array of strings\n@return Copied array of strings"
] | [
"Translate a path that has previously been unescaped and unquoted.\nThat is called at command execution when the calue is retrieved prior to be\nused as ModelNode value.\n@param path The unquoted, unescaped path.\n@return A path with ~ and default dir expanded.",
"Creates a method signature.\n\n@param method Meth... |
public static int wavelengthToRGB(float wavelength) {
float gamma = 0.80f;
float r, g, b, factor;
int w = (int)wavelength;
if (w < 380) {
r = 0.0f;
g = 0.0f;
b = 0.0f;
} else if (w < 440) {
r = -(wavelength - 440) / (440 - 380);
g = 0.0f;
b = 1.0f;
} else if (w < 490) {
r = 0.0f;
g ... | [
"Convert a wavelength to an RGB value.\n@param wavelength wavelength in nanometres\n@return the RGB value"
] | [
"Put a new value in map.\n\n@param key id of the value for looking up.\n@param value the value.",
"If an error is thrown while loading zone data, the exception is logged\nto system error and null is returned for this and all future requests.\n\n@param id the id to load\n@return the loaded zone",
"Checks if use... |
public static appfwpolicylabel_stats get(nitro_service service, String labelname) throws Exception{
appfwpolicylabel_stats obj = new appfwpolicylabel_stats();
obj.set_labelname(labelname);
appfwpolicylabel_stats response = (appfwpolicylabel_stats) obj.stat_resource(service);
return response;
} | [
"Use this API to fetch statistics of appfwpolicylabel_stats resource of given name ."
] | [
"Check if the path to the property correspond to an association.\n\n@param targetTypeName the name of the entity containing the property\n@param pathWithoutAlias the path to the property WITHOUT aliases\n@return {@code true} if the property is an association or {@code false} otherwise",
"Serializes any char seque... |
static JobContext copy() {
JobContext current = current_.get();
//JobContext ctxt = new JobContext(keepParent ? current : null);
JobContext ctxt = new JobContext(null);
if (null != current) {
ctxt.bag_.putAll(current.bag_);
}
return ctxt;
} | [
"Make a copy of JobContext of current thread\n@return the copy of current job context or an empty job context"
] | [
"Add statistics about a created map.\n\n@param mapContext the\n@param mapValues the",
"Returns the size of the shadow element",
"Creates a field map for tasks.\n\n@param props props data",
"Sets the value for the API's \"languages\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setti... |
public static final Rect getViewportBounds() {
return new Rect(Window.getScrollLeft(), Window.getScrollTop(), Window.getClientWidth(), Window.getClientHeight());
} | [
"This takes into account scrolling and will be in absolute\ncoordinates where the top left corner of the page is 0,0 but\nthe viewport may be scrolled to something else."
] | [
"Used to get the current repository key\n@return keyFromText or keyFromSelect reflected by the dynamicMode flag",
"Write the config to the writer.",
"Use this API to change appfwsignatures.",
"Calculate the Hamming distance between two hashes\n\n@param h1\n@param h2\n@return",
"Retrieves a byte value from t... |
public synchronized void addShutdownListener(ShutdownListener listener) {
if (state == CLOSED) {
listener.handleCompleted();
} else {
listeners.add(listener);
}
} | [
"Add a shutdown listener, which gets called when all requests completed on shutdown.\n\n@param listener the shutdown listener"
] | [
"List all the environment variables for an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@return map of config vars",
"Utility method to remove ampersands embedded in names.\n\n@param name name text\n@return name text without embedded ampersands",
"Creates a slice fo... |
public static boolean isFileExist(String filePath) {
if (StringUtils.isEmpty(filePath)) {
return false;
}
File file = new File(filePath);
return (file.exists() && file.isFile());
} | [
"Indicates if this file represents a file on the underlying file system.\n\n@param filePath\n@return"
] | [
"Serializes this RuleSet in an XML document.\n\n@param destination The writer to which the XML document shall be written.",
"Create an index of base font numbers and their associated base\nfont instances.\n@param data property data",
"Use this API to update ntpserver.",
"Counts the amount of 'ch' at the start... |
private static void writeUtf16Bom(OutputStream stream, boolean bigEndian) throws IOException {
if (bigEndian) {
stream.write(-2);
stream.write(-1);
} else {
stream.write(-1);
stream.write(-2);
}
} | [
"Write a Byte Order Mark at the beginning of the file\n\n@param stream the FileOutputStream to write the BOM to\n@param bigEndian true if UTF 16 Big Endian or false if Low Endian\n@throws IOException if an IOException occurs.\n@since 1.0"
] | [
"This logic is shared for all actual types i.e. raw types, parameterized types and generic array types.",
"Creates a new remote proxy controller using an existing channel.\n\n@param channelAssociation the channel association\n@param pathAddress the address within the model of the created proxy controller\n@param ... |
public final void setDefaultStyle(final Map<String, Style> defaultStyle) {
this.defaultStyle = new HashMap<>(defaultStyle.size());
for (Map.Entry<String, Style> entry: defaultStyle.entrySet()) {
String normalizedName = GEOMETRY_NAME_ALIASES.get(entry.getKey().toLowerCase());
if ... | [
"Set the default styles. the case of the keys are not important. The retrieval will be case\ninsensitive.\n\n@param defaultStyle the mapping from geometry type name (point, polygon, etc...) to the style\nto use for that type."
] | [
"Attempts to insert a colon so that a value without a colon can\nbe parsed.",
"Permanently deletes a trashed folder.\n@param folderID the ID of the trashed folder to permanently delete.",
"Parse a date value.\n\n@param value String representation\n@return Date instance",
"Return the authorization URL which is... |
public static BeanManager getBeanManager(Object ctx) {
return (BeanManager) javax.portlet.PortletContext.class.cast(ctx).getAttribute(WeldServletLifecycle.BEAN_MANAGER_ATTRIBUTE_NAME);
} | [
"Get bean manager from portlet context.\n\n@param ctx the portlet context\n@return bean manager if found"
] | [
"Set the given column name to the given value.\n\n@param name The column name to set.\n@param value the value to set.\n@return {@code this}\n@throws IllegalArgumentException if a column name does not exist in the table.",
"Execute JavaScript in the browser.\n\n@param code The code to execute.\n@return The return ... |
private void stop() {
for (int i = 0; i < mDownloadDispatchers.length; i++) {
if (mDownloadDispatchers[i] != null) {
mDownloadDispatchers[i].quit();
}
}
} | [
"Stops download dispatchers."
] | [
"Configure the HTTP response to switch off caching.\n\n@param response response to configure\n@since 1.9.0",
"Set the serial pattern type.\n@param patternType the pattern type to set.",
"Add the collection of elements to this collection. This will also them to the associated database table.\n\n@return Returns t... |
public void saveFile(File file, String type)
{
try
{
Class<? extends ProjectWriter> fileClass = WRITER_MAP.get(type);
if (fileClass == null)
{
throw new IllegalArgumentException("Cannot write files of type: " + type);
}
ProjectWriter writer = file... | [
"Save the current file as the given type.\n\n@param file target file\n@param type file type"
] | [
"Internal method used to retrieve a integer from an\nembedded data block.\n\n@param blocks list of data blocks\n@return int value",
"Find the fields in which the Activity ID and Activity Type are stored.",
"Get a collection of Photo objects for the specified Photoset.\n\nThis method does not require authenticat... |
protected OJBIterator getIteratorFromQuery(Query query, ClassDescriptor cld) throws PersistenceBrokerException
{
RsIteratorFactory factory = RsIteratorFactoryImpl.getInstance();
OJBIterator result = getRsIteratorFromQuery(query, cld, factory);
if (query.usePaging())
{
re... | [
"Get an extent aware Iterator based on the Query\n\n@param query\n@param cld the ClassDescriptor\n@return OJBIterator"
] | [
"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... |
public static void removeFromList(List<String> list, String value) {
int foundIndex = -1;
int i = 0;
for (String id : list) {
if (id.equalsIgnoreCase(value)) {
foundIndex = i;
break;
}
i++;
}
if (foundIndex != -1... | [
"Removes a value from the list.\n\n@param list the list\n@param value value to remove"
] | [
"Updates a metadata classification on the specified file.\n\n@param classificationType the metadata classification type.\n@return the new metadata classification type updated on the file.",
"Write exceptions into the format used by MSPDI files from\nProject 2007 onwards.\n\n@param calendar parent calendar\n@param... |
private static String firstFoundTableName(PersistenceBroker brokerForClass, ClassDescriptor cld)
{
String name = null;
if (!cld.isInterface() && cld.getFullTableName() != null)
{
return cld.getFullTableName();
}
if (cld.isExtent())
{
C... | [
"try to find the first none null table name for the given class-descriptor.\nIf cld has extent classes, all of these cld's searched for the first none null\ntable name."
] | [
"Lists the buildpacks installed on an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.",
"Adds a property to report design, this properties are mostly used by\nexporters to know if any specific configuration is needed\n\n@param name\n@param value\n@return A Dynamic Report Builder",... |
public Long getLong(String fieldName) {
try {
return hasValue(fieldName) ? Long.valueOf(String.valueOf(resultMap.get(fieldName))) : null;
} catch (NumberFormatException e) {
throw new FqlException("Field '" + fieldName +"' is not a number.", e);
}
} | [
"Returns the value of the identified field as a Long.\n@param fieldName the name of the field\n@return the value of the field as a Long\n@throws FqlException if the field cannot be expressed as an Long"
] | [
"Sets the width and height of the canvas the text is drawn to.\n\n@param width\nwidth of the new canvas.\n\n@param height\nhegiht of the new canvas.",
"Set the state of an individual day in a weekly recurrence.\n\n@param day Day instance\n@param value true if this day is included in the recurrence",
"Initialize... |
public void validateUniqueIDsForMicrosoftProject()
{
if (!isEmpty())
{
for (T entity : this)
{
if (NumberHelper.getInt(entity.getUniqueID()) > MS_PROJECT_MAX_UNIQUE_ID)
{
renumberUniqueIDs();
break;
}
}
}
... | [
"Validate that the Unique IDs for the entities in this container are valid for MS Project.\nIf they are not valid, i.e one or more of them are too large, renumber them."
] | [
"Initialize VIDEO_INFO data.",
"Given an AVRO serializer definition, validates if all the avro schemas\nare valid i.e parseable.\n\n@param avroSerDef",
"Appends formatted text to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString... |
public Collection<Photocount> getCounts(Date[] dates, Date[] takenDates) throws FlickrException {
List<Photocount> photocounts = new ArrayList<Photocount>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_COUNTS);
if (dates == ... | [
"Gets a collection of photo counts for the given date ranges for the calling user.\n\nThis method requires authentication with 'read' permission.\n\n@param dates\nAn array of dates, denoting the periods to return counts for. They should be specified smallest first.\n@param takenDates\nAn array of dates, denoting th... | [
"Add a Renderer instance as prototype.\n\n@param renderer to use as prototype.\n@return the current RendererBuilder instance.",
"Convert an ObjectBank to corresponding collection of data features and\nlabels.\n\n@return A List of pairs, one for each document, where the first element is\nan int[][][] representing ... |
public void implicitDoubleStep( int x1 , int x2 ) {
if( printHumps )
System.out.println("Performing implicit double step");
// compute the wilkinson shift
double z11 = A.get(x2 - 1, x2 - 1);
double z12 = A.get(x2 - 1, x2);
double z21 = A.get(x2, x2 - 1);
dou... | [
"Performs an implicit double step using the values contained in the lower right hand side\nof the submatrix for the estimated eigenvector values.\n@param x1\n@param x2"
] | [
"Read all child tasks for a given parent.\n\n@param parentTask parent task",
"Find Flickr Places information by Place ID.\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link #getInfo(String, String)} instead.\n@param placeId\n@return A Location\n@throws FlickrException",
... |
public static <T> Observable<T> map(Observable<?> fromObservable, final T toValue) {
if (fromObservable != null) {
return fromObservable.subscribeOn(Schedulers.io())
.map(new RXMapper<T>(toValue));
} else {
return Observable.empty();
}
} | [
"Shortcut for mapping the output of an arbitrary observable to one returning an instance of a specific type, using the IO scheduler.\n@param fromObservable the source observable\n@param toValue the value to emit to the observer\n@param <T> the type of the value to emit\n@return an observable emitting the specified ... | [
"Read resource baseline values.\n\n@param row result set row",
"Gets the current instance of plugin manager\n\n@return PluginManager",
"Prints the help on the command line\n\n@param options Options object from commons-cli",
"Creates a new access control entry and stores it for later write out.\n\n@param res t... |
@Override
public void begin(String namespace, String name, Attributes attributes) throws Exception {
// not now: 6.0.0
// digester.setLogger(CmsLog.getLog(digester.getClass()));
// Push an array to capture the parameter values if necessary
if (m_paramCount > 0) {
Object... | [
"Process the start of this element.\n\n@param attributes The attribute list for this element\n@param namespace the namespace URI of the matching element, or an empty string if the parser is not namespace\naware or the element has no namespace\n@param name the local name if the parser is namespace aware, or just th... | [
"Visit an exported package of the current module.\n\n@param packaze the qualified name of the exported package.\n@param access the access flag of the exported package,\nvalid values are among {@code ACC_SYNTHETIC} and\n{@code ACC_MANDATED}.\n@param modules the qualified names of the modules that can access to\nthe ... |
@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'");
}
MongoD... | [
"init database with demo data"
] | [
"A GString variant of the equivalent GString method.\n\n@param self the original GString\n@param condition the closure that must evaluate to true to continue taking elements\n@return a prefix of elements in the GString where each\nelement passed to the given closure evaluates to true\n@since 2.3.7",
"Populat... |
public static base_response delete(nitro_service client) throws Exception {
locationfile deleteresource = new locationfile();
return deleteresource.delete_resource(client);
} | [
"Use this API to delete locationfile."
] | [
"Add additional source types",
"Updates an existing enum option. Enum custom fields require at least one enabled enum option.\n\nReturns the full record of the updated enum option.\n\n@param enumOption Globally unique identifier for the enum option.\n@return Request object",
"Convert moneyness given as differe... |
protected float getViewPortSize(final Axis axis) {
float size = mViewPort == null ? 0 : mViewPort.get(axis);
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "getViewPortSize for %s %f mViewPort = %s", axis, size, mViewPort);
return size;
} | [
"Get viewport size along the axis\n@param axis {@link Axis}\n@return size"
] | [
"Abort an upload session, discarding any chunks that were uploaded to it.",
"The range of velocities that a particle generated from this emitter can have.\n@param minV Minimum velocity that a particle can have\n@param maxV Maximum velocity that a particle can have",
"Converts an object to an XML file.\n\n@param... |
public File getTargetFile(final MiscContentItem item) {
final State state = this.state;
if (state == State.NEW || state == State.ROLLBACK_ONLY) {
return getTargetFile(miscTargetRoot, item);
} else {
throw new IllegalStateException(); // internal wrong usage, no i18n
... | [
"Get the target file for misc items.\n\n@param item the misc item\n@return the target location"
] | [
"Logs the time taken by this rule, and attaches this to the total for the RuleProvider",
"add converter at given index. The index can be changed during conversion\nif canReorder is true\n\n@param index\n@param converter",
"Checks if the required option exists.\n\n@param options OptionSet to checked\n@param opt ... |
public void setDefaultInterval(long defaultInterval) {
if(defaultInterval <= 0) {
LOG.severe("collector.scheduler.interval must be greater than 0. Recommended value is 500-1000. Current value is " + defaultInterval);
throw new IllegalArgumentException("collector.scheduler.interval must be greater than ... | [
"Set default interval for sending events to monitoring service. DefaultInterval will be used by\nscheduler.\n\n@param defaultInterval the new default interval"
] | [
"Returns a flag, indicating if search should be performed using a wildcard if the empty query is given.\n@return A flag, indicating if search should be performed using a wildcard if the empty query is given.",
"Compute the CRC32 of the segment of the byte array given by the\nspecificed size and offset\n\n@param b... |
public void setWorkConnection(CmsSetupDb db) {
db.setConnection(
m_setupBean.getDbDriver(),
m_setupBean.getDbWorkConStr(),
m_setupBean.getDbConStrParams(),
m_setupBean.getDbWorkUser(),
m_setupBean.getDbWorkPwd());
} | [
"Set work connection.\n\n@param db the db setup bean"
] | [
"Helper function that drops all local databases for every client.",
"This method processes a single deferred relationship list.\n\n@param dr deferred relationship list data\n@throws MPXJException",
"Find container env.\n\n@param ctx the container context\n@param dump the exception dump\n@return valid container ... |
protected WeldBeanDeploymentArchive createAdditionalBeanDeploymentArchive() {
WeldBeanDeploymentArchive additionalBda = new WeldBeanDeploymentArchive(ADDITIONAL_BDA_ID, Collections.synchronizedSet(new HashSet<String>()), null);
additionalBda.getServices().addAll(getServices().entrySet());
beanDe... | [
"Additional bean deployment archives are used for extentions, synthetic annotated types and beans which do not come from a bean archive.\n\n@param beanClass\n@return the additional bean deployment archive"
] | [
"Read correlation id.\n\n@param message the message\n@return correlation id from the message",
"Returns the name under which this dump file. This is the name used online\nand also locally when downloading the file.\n\n@param dumpContentType\nthe type of the dump\n@param projectName\nthe project name, e.g. \"wikid... |
private void printImage(PrintStream out, ItemDocument itemDocument) {
String imageFile = null;
if (itemDocument != null) {
for (StatementGroup sg : itemDocument.getStatementGroups()) {
boolean isImage = "P18".equals(sg.getProperty().getId());
if (!isImage) {
continue;
}
for (Statement s : s... | [
"Prints the URL of a thumbnail for the given item document to the output,\nor a default image if no image is given for the item.\n\n@param out\nthe output to write to\n@param itemDocument\nthe document that may provide the image information"
] | [
"Returns details of a previously-requested Organization export.\n\n@param organizationExport Globally unique identifier for the Organization export.\n@return Request object",
"Allocates a new next buffer and pending fetch.",
"Formats the supplied value using the specified DateTimeFormat.\n\n@return \"\" if the... |
public void incrementVersion(int node, long time) {
if(node < 0 || node > Short.MAX_VALUE)
throw new IllegalArgumentException(node
+ " is outside the acceptable range of node ids.");
this.timestamp = time;
Long version = versionMap.get... | [
"Increment the version info associated with the given node\n\n@param node The node"
] | [
"Get the collection of configured blogs for the calling user.\n\n@return The Collection of configured blogs",
"xml -> object\n\n@param message\n@param childClass\n@return",
"Sets up and declares internal data structures.\n\n@param diag Diagonal elements from tridiagonal matrix. Modified.\n@param off Off diagona... |
public static void generateJRXML(DynamicReport dr, LayoutManager layoutManager, Map _parameters, String xmlEncoding, OutputStream outputStream) throws JRException {
JasperReport jr = generateJasperReport(dr, layoutManager, _parameters);
if (xmlEncoding == null)
xmlEncoding = DEFAULT_XML_ENCO... | [
"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"
] | [
"Create a hazard curve from given times and given discount factors using default interpolation and extrapolation methods.\n\n@param name The name of this hazard curve.\n@param times Array of times as doubles.\n@param givenSurvivalProbabilities Array of corresponding survival probabilities.\n@return A new discount f... |
public static void main(final String[] args) {
if (System.getProperty("db.name") == null) {
System.out.println("Not running in multi-instance mode: no DB to connect to");
System.exit(1);
}
while (true) {
try {
Class.forName("org.postgresql.Driv... | [
"A comment.\n\n@param args the parameters"
] | [
"Searches the set of imports to find a matching import by type name.\n\n@param typeName\nname of type (qualified or simple name allowed)\n@return found import or {@code null}",
"Connects to the comm port and starts send and receive threads.\n@param serialPortName the port name to open\n@throws SerialInterfaceExce... |
public static final void parseExtendedAttribute(ProjectFile file, FieldContainer mpx, String value, FieldType mpxFieldID, TimeUnit durationFormat)
{
if (mpxFieldID != null)
{
switch (mpxFieldID.getDataType())
{
case STRING:
{
mpx.set(mpxFieldID, va... | [
"Parse an extended attribute value.\n\n@param file parent file\n@param mpx parent entity\n@param value string value\n@param mpxFieldID field ID\n@param durationFormat duration format associated with the extended attribute"
] | [
"Update server mapping's host header\n\n@param serverMappingId ID of server mapping\n@param hostHeader value of host header\n@return updated ServerRedirect",
"Use this API to Import application.",
"Return true if the AST expression has not already been visited. If it is\nthe first visit, register the expression... |
private Map<Integer, Integer> getNodeIdToZonePrimaryCount(Cluster cluster,
StoreRoutingPlan storeRoutingPlan) {
Map<Integer, Integer> nodeIdToZonePrimaryCount = Maps.newHashMap();
for(Integer nodeId: cluster.getNodeIds()) {
nodeId... | [
"Go through all partition IDs and determine which node is \"first\" in the\nreplicating node list for every zone. This determines the number of\n\"zone primaries\" each node hosts.\n\n@return map of nodeId to number of zone-primaries hosted on node."
] | [
"Updates the terms and statements of the item document identified by the\ngiven item id. The updates are computed with respect to the current data\nfound online, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged. The labels\nand aliases in... |
public static base_response update(nitro_service client, vridparam resource) throws Exception {
vridparam updateresource = new vridparam();
updateresource.sendtomaster = resource.sendtomaster;
return updateresource.update_resource(client);
} | [
"Use this API to update vridparam."
] | [
"Obtains a Ethiopic zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Ethiopic zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"For test purposes only.",
"Computes the inverse permutation vector\n\n@... |
public static appfwpolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{
appfwpolicy_csvserver_binding obj = new appfwpolicy_csvserver_binding();
obj.set_name(name);
appfwpolicy_csvserver_binding response[] = (appfwpolicy_csvserver_binding[]) obj.get_resources(service);
return res... | [
"Use this API to fetch appfwpolicy_csvserver_binding resources of given name ."
] | [
"Writes image files for all data that was collected and the statistics\nfile for all sites.",
"Compares the StoreVersionManager's internal state with the content on the file-system\nof the rootDir provided at construction time.\n\nTODO: If the StoreVersionManager supports non-RO stores in the future,\nwe should m... |
public static String frame(String imageUrl) {
if (imageUrl == null || imageUrl.length() == 0) {
throw new IllegalArgumentException("Image URL must not be blank.");
}
return FILTER_FRAME + "(" + imageUrl + ")";
} | [
"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."
] | [
"Bessel function of the first kind, of order n.\n\n@param n Order.\n@param x Value.\n@return I value.",
"Iterate and insert each of the elements of the Collection.\n\n@param objects\nThe objects to insert\n@param outIdentifier\nIdentifier to lookup the returned objects\n@param returnObject\nboolean to specify whe... |
public Response remove(String id) {
assertNotEmpty(id, "id");
id = ensureDesignPrefix(id);
String revision = null;
// Get the revision ID from ETag, removing leading and trailing "
revision = client.executeRequest(Http.HEAD(new DatabaseURIHelper(db.getDBUri()
).docu... | [
"Removes a design document from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@return {@link DesignDocument}"
] | [
"Set the main attribute \"Bundle-Activator\" to the given value.\n\n@param bundleActivator The new value",
"Decompiles a single type.\n\n@param metadataSystem\n@param typeName\n@return\n@throws IOException",
"Use this API to add dospolicy resources.",
"Use this API to fetch a vpnglobal_vpntrafficpolicy_bindin... |
protected GVRPickedObject findCollider(GVRPickedObject[] pickList, GVRCollider findme)
{
if (pickList == null)
{
return null;
}
for (GVRPickedObject hit : pickList)
{
if ((hit != null) && (hit.hitCollider == findme))
{
retur... | [
"Find the collision against a specific collider in a list of collisions.\n@param pickList collision list\n@param findme collider to find\n@return collision with the specified collider, null if not found"
] | [
"This method returns the mapped certificate for a hostname, or generates a \"standard\"\nSSL server certificate issued by the CA to the supplied subject if no mapping has been\ncreated. This is not a true duplication, just a shortcut method\nthat is adequate for web browsers.\n\n@param hostname\n@return\n@throws C... |
public synchronized ControlPoint getControlPoint(final String deploymentName, final String entryPointName) {
ControlPointIdentifier id = new ControlPointIdentifier(deploymentName, entryPointName);
ControlPoint ep = entryPoints.get(id);
if (ep == null) {
ep = new ControlPoint(this, de... | [
"Gets an entry point for the given deployment. If one does not exist it will be created. If the request controller is disabled\nthis will return null.\n\nEntry points are reference counted. If this method is called n times then {@link #removeControlPoint(ControlPoint)}\nmust also be called n times to clean up the e... | [
"Complete the current operation and persist the current state to the disk. This will also trigger the invalidation\nof outdated modules.\n\n@param modification the current modification\n@param callback the completion callback",
"Saves meta tree, writes database root and flushes the log.\n\n@param metaTree mut... |
protected boolean closeAtomically() {
if (isClosed.compareAndSet(false, true)) {
Closeable.closeQuietly(networkStatsListener);
return true;
} else {
//was already closed.
return false;
}
} | [
"Close the connection atomically.\n\n@return true if state changed to closed; false if nothing changed."
] | [
"Use this API to fetch cacheselector resources of given names .",
"Gets the prefix from value.\n\n@param value the value\n@return the prefix from value",
"Remove an read lock.",
"Gets information about a trashed folder.\n@param folderID the ID of the trashed folder.\n@return info about the trashed f... |
ResultAction executeOperation() {
assert isControllingThread();
try {
/** Execution has begun */
executing = true;
processStages();
if (resultAction == ResultAction.KEEP) {
report(MessageSeverity.INFO, ControllerLogger.ROOT_LOGGER.operat... | [
"Package-protected method used to initiate operation execution.\n@return the result action"
] | [
"Loads the localization for the current locale from a bundle of type xmlvfsbundle.\nIt assumes, the content has already been unmarshalled before.\n@param locale the locale for which the localization should be loaded",
"Add a URL pattern to the routing table.\n\n@param urlPattern A regular expression\n@throws Rout... |
public Enumeration getPKEnumerationByQuery(Class primaryKeyClass, Query query) throws PersistenceBrokerException
{
if (logger.isDebugEnabled()) logger.debug("getPKEnumerationByQuery " + query);
query.setFetchSize(1);
ClassDescriptor cld = getClassDescriptor(query.getSearchClass());
... | [
"returns an Enumeration of PrimaryKey Objects for objects of class DataClass.\nThe Elements returned come from a SELECT ... WHERE Statement\nthat is defined by the fields and their coresponding values of listFields\nand listValues.\nUseful for EJB Finder Methods...\n@param primaryKeyClass the pk class for the searc... | [
"Produces an IPv4 address from any sequence of 4 bytes in this IPv6 address.\n\n@param byteIndex the byte index to start\n@throws IndexOutOfBoundsException if the index is less than zero or bigger than 7\n@return",
"Alternate version of autoGeneratedKeys.\n@param sql\n@param autoGeneratedKeys\n@return cache key t... |
private void revisitMessages(Definitions def) {
List<RootElement> rootElements = def.getRootElements();
List<ItemDefinition> toAddDefinitions = new ArrayList<ItemDefinition>();
for (RootElement root : rootElements) {
if (root instanceof Message) {
if (!existsMessageIt... | [
"Revisit message to set their item ref to a item definition\n@param def Definitions"
] | [
"Handles the response of the SerialAPIGetCapabilities request.\n@param incomingMessage the response message to process.",
"If the belief its a count of some sort his counting its increased by one.\n\n@param bName\n- the name of the belief count.",
"Adds the newState and the edge between the currentState and the... |
public void cleanup() {
List<String> keys = new ArrayList<>(created.keySet());
keys.sort(String::compareTo);
for (String key : keys) {
created.remove(key)
.stream()
.sorted(Comparator.comparing(HasMetadata::getKind))
.forEach(metadata -... | [
"Removes all resources deployed using this class."
] | [
"Wait to shutdown service\n\n@param executorService Executor service to shutdown\n@param timeOutSec Time we wait for",
"Get the group URL for the specified group ID\n\n@param groupId\nThe group ID\n@return The group URL\n@throws FlickrException",
"Returns an integer array that contains the current values for al... |
public final void loadCollection(
final SharedSessionContractImplementor session,
final Serializable id,
final Type type) throws HibernateException {
if ( log.isDebugEnabled() ) {
log.debug(
"loading collection: " +
MessageHelper.collectionInfoString( getCollectionPersisters()[0], id, getFactory()... | [
"Called by subclasses that initialize collections\n\n@param session the session\n@param id the collection identifier\n@param type collection type\n@throws HibernateException if an error occurs"
] | [
"Curries a function that takes three arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes two arguments. Never <code>null</code>.",
"Map custom info.\n\n@param ciType the custom info type\... |
public static void permutationInverse( int []original , int []inverse , int length ) {
for (int i = 0; i < length; i++) {
inverse[original[i]] = i;
}
} | [
"Computes the inverse permutation vector\n\n@param original Original permutation vector\n@param inverse It's inverse"
] | [
"Returns the orthogonal U matrix.\n\n@param U If not null then the results will be stored here. Otherwise a new matrix will be created.\n@return The extracted Q matrix.",
"Gets information about a trashed folder that's limited to a list of specified fields.\n@param folderID the ID of the trashed folder.\n@param... |
public List getFeedback()
{
List<?> messages = new ArrayList();
for ( ValueSource vs : valueSources )
{
List feedback = vs.getFeedback();
if ( feedback != null && !feedback.isEmpty() )
{
messages.addAll( feedback );
}
... | [
"Return any feedback messages and errors that were generated - but\nsuppressed - during the interpolation process. Since unresolvable\nexpressions will be left in the source string as-is, this feedback is\noptional, and will only be useful for debugging interpolation problems.\n\n@return a {@link List} that may be ... | [
"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",
"The smallest granularity of r... |
public static final Date getTimestamp(byte[] data, int offset)
{
Date result;
long days = getShort(data, offset + 2);
if (days < 100)
{
// We are seeing some files which have very small values for the number of days.
// When the relevant field is shown in MS Project it appe... | [
"Reads a combined date and time value.\n\n@param data byte array of data\n@param offset location of data as offset into the array\n@return time value"
] | [
"Assign a new value to this field.\n@param numStrings - number of strings\n@param newValues - the new strings",
"If the column name is a dotted column, returns the first part.\nReturns null otherwise.\n\n@param column the column that might have a prefix\n@return the first part of the prefix of the column or {@cod... |
private float newRandomIndividualParticleRadius(@NonNull final SceneConfiguration scene) {
return scene.getParticleRadiusMin() == scene.getParticleRadiusMax() ?
scene.getParticleRadiusMin() : scene.getParticleRadiusMin() + (random.nextInt(
(int) ((scene.getParticleRadiusMax() - s... | [
"Generates new individual particle radius based on min and max radius setting.\n\n@return new particle radius"
] | [
"Translates the Fluo row, column, and value set into the persistent format that is stored in\nAccumulo.\n\n<p>\nThe objects returned by this method are reused each time its called. So each time this is\ncalled it invalidates what was returned by previous calls to this method.\n\n@return A an array of Accumulo key v... |
public static boolean ensureJedisConnection(final Jedis jedis) {
final boolean jedisOK = testJedisConnection(jedis);
if (!jedisOK) {
try {
jedis.quit();
} catch (Exception e) {
} // Ignore
try {
jedis.disconnect();
... | [
"Ensure that the given connection is established.\n\n@param jedis\na connection to Redis\n@return true if the supplied connection was already connected"
] | [
"Writes a resource assignment to a PM XML file.\n\n@param mpxj MPXJ ResourceAssignment instance",
"Sets the bytecode compatibility mode\n\n@param version the bytecode compatibility mode",
"Adds a variable to the end of the token list\n@param variable Variable which is to be added\n@return The new Token created ... |
public boolean hasValue(String fieldName) {
return resultMap.containsKey(fieldName) && resultMap.get(fieldName) != null;
} | [
"Checks that a field exists and contains a non-null value.\n@param fieldName the name of the field to check existence/value of.\n@return true if the field exists in the result set and has a non-null value; false otherwise."
] | [
"Replies the elements of the left map without the pairs in the right map.\nIf the pair's values differ from\nthe value within the map, the map entry is not removed.\n\n<p>\nThe difference is an immutable\nsnapshot of the state of the maps at the time this method is called. It\nwill never change, even if the maps ch... |
private void validateSameDay(ProjectCalendar calendar, LinkedList<TimephasedWork> list)
{
for (TimephasedWork assignment : list)
{
Date assignmentStart = assignment.getStart();
Date calendarStartTime = calendar.getStartTime(assignmentStart);
Date assignmentStartTime = DateHelpe... | [
"Ensures that the start and end dates for ranges fit within the\nworking times for a given day.\n\n@param calendar current calendar\n@param list assignment data"
] | [
"Accessor method used to retrieve a char representing the\ncontents of an individual field. If the field does not exist in the\nrecord, the default character is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field",
"Release the connection back to the po... |
VersionExcludeData getVersionIgnoreData(int major, int minor, int micro) {
VersionExcludeData result = registry.get(new VersionKey(major, minor, micro));
if (result == null) {
result = registry.get(new VersionKey(major, minor, null));
}
return result;
} | [
"Gets the host-ignore data for a slave host running the given version.\n\n@param major the kernel management API major version\n@param minor the kernel management API minor version\n@param micro the kernel management API micro version\n\n@return the host-ignore data, or {@code null} if there is no matching registra... | [
"2-D Forward Discrete Hartley Transform.\n\n@param data Data.",
"Use this API to unset the properties of nslimitselector resource.\nProperties that need to be unset are specified in args array.",
"Add a 'IS NOT NULL' clause so the column must not be null. '<>' NULL does not work.",
"Initialize elements ... |
@SuppressWarnings("unchecked")
public T[] nextCombinationAsArray()
{
T[] combination = (T[]) Array.newInstance(elements.getClass().getComponentType(),
combinationIndices.length);
return nextCombinationAsArray(combination);
} | [
"Generate the next combination and return an array containing\nthe appropriate elements.\n@see #nextCombinationAsArray(Object[])\n@see #nextCombinationAsList()\n@return An array containing the elements that make up the next combination."
] | [
"Handles the cases in which we can use longs rather than BigInteger\n\n@param section\n@param increment\n@param addrCreator\n@param lowerProducer\n@param upperProducer\n@param prefixLength\n@return",
"Use this API to export sslfipskey.",
"Returns the next object in the table.\n\n@throws IllegalStateException\nI... |
public static Double checkLongitude(String name, Double longitude) {
if (longitude == null) {
throw new IndexException("{} required", name);
} else if (longitude < MIN_LONGITUDE || longitude > MAX_LONGITUDE) {
throw new IndexException("{} must be in range [{}, {}], but found {}",... | [
"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 collection of public contacts for the specified user ID.\n\nThis method does not require authentication.\n\n@param userId\nThe user ID\n@return The Collection of Contact objects\n@throws FlickrException",
"Whether the address is IPv4-compatible\n\n@see java.net.Inet6Address#isIPv4CompatibleAddress()",
... |
BsonDocument getNextVersion() {
if (!this.hasVersion() || this.getVersionDoc() == null) {
return getFreshVersionDocument();
}
final BsonDocument nextVersion = BsonUtils.copyOfDocument(this.getVersionDoc());
nextVersion.put(
Fields.VERSION_COUNTER_FIELD,
new BsonInt64(this.g... | [
"Given a DocumentVersionInfo, returns a BSON document representing the next version. This means\nand incremented version count for a non-empty version, or a fresh version document for an\nempty version.\n@return a BsonDocument representing a synchronization version"
] | [
"Set a new Cursor position if active and enabled.\n\n@param x x value of the position\n@param y y value of the position\n@param z z value of the position",
"Use this method to enable device network-related information tracking, including IP address.\nThis reporting is disabled by default. To re-disable tracking ... |
public final void setHost(final String host) throws UnknownHostException {
this.host = host;
final InetAddress[] inetAddresses = InetAddress.getAllByName(host);
for (InetAddress address: inetAddresses) {
final AddressHostMatcher matcher = new AddressHostMatcher();
matche... | [
"Set the host.\n\n@param host the host"
] | [
"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@... |
public ItemRequest<Webhook> getById(String webhook) {
String path = String.format("/webhooks/%s", webhook);
return new ItemRequest<Webhook>(this, Webhook.class, path, "GET");
} | [
"Returns the full record for the given webhook.\n\n@param webhook The webhook to get.\n@return Request object"
] | [
"Returns the complete property list of a class\n@param c the class\n@return the property list of the class",
"Use this API to expire cachecontentgroup resources.",
"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... |
private void loadCadidateString() {
volumeUp = mGvrContext.getActivity().getResources().getString(R.string.volume_up);
volumeDown = mGvrContext.getActivity().getResources().getString(R.string.volume_down);
zoomIn = mGvrContext.getActivity().getResources().getString(R.string.zoom_in);
zoo... | [
"Load all string recognize."
] | [
"Determine whether the user has followed bean-like naming convention or not.",
"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.",
"Retu... |
public Weld addExtension(Extension extension) {
extensions.add(new MetadataImpl<Extension>(extension, SYNTHETIC_LOCATION_PREFIX + extension.getClass().getName()));
return this;
} | [
"Add an extension to the set of extensions.\n\n@param extension an extension"
] | [
"Find the latest task finish date. We treat this as the\nfinish date for the project.\n\n@return finish date",
"Print channels to the left of log messages\n@param width The width (in characters) to print the channels\n@return this",
"creates a point array of all dockers and add it to the current shape\n@param m... |
private void modifyBeliefCount(int count){
introspector.setBeliefValue(getLocalName(), Definitions.RECEIVED_MESSAGE_COUNT, getBeliefCount()+count, null);
} | [
"Modifies the \"msgCount\" belief\n\n@param int - the number to add or remove"
] | [
"Wrap getOperationStatus to avoid throwing exception over JMX",
"Clears the dest ColumnBuffer and inserts all entries in dest where the timestamp passes the\ntimestampTest.\n\n@param dest Destination ColumnBuffer\n@param timestampTest Test to determine which timestamps get added to dest",
"Register the agent in... |
public int addServerGroup(String groupName, int profileId) throws Exception {
int groupId = -1;
PreparedStatement statement = null;
ResultSet results = null;
try (Connection sqlConnection = sqlService.getConnection()) {
statement = sqlConnection.prepareStatement("INSERT INTO... | [
"Add a new server group\n\n@param groupName name of the group\n@param profileId ID of associated profile\n@return id of server group\n@throws Exception"
] | [
"Go through all node IDs and determine which node\n\n@param cluster\n@param storeRoutingPlan\n@return",
"Gets the data handler from event.\n\n@param event the event\n@return the data handler",
"Starts listening for shakes on devices with appropriate hardware.\n\n@return true if the device supports shake detecti... |
private int runCommitScript() {
if (m_checkout && !m_fetchAndResetBeforeImport) {
m_logStream.println("Skipping script....");
return 0;
}
try {
m_logStream.flush();
String commandParam;
if (m_resetRemoteHead) {
commandP... | [
"Runs the shell script for committing and optionally pushing the changes in the module.\n@return exit code of the script."
] | [
"Returns information about all clients for a profile\n\n@param model\n@param profileIdentifier\n@return\n@throws Exception",
"generate a message for loglevel DEBUG\n\n@param pObject the message Object",
"For missing objects associated by one-to-one with another object in the\nresult set, register the fact that ... |
public void forAllCollectionDefinitions(String template, Properties attributes) throws XDocletException
{
for (Iterator it = _curClassDef.getCollections(); it.hasNext(); )
{
_curCollectionDef = (CollectionDescriptorDef)it.next();
if (!isFeatureIgnored(LEVEL_COLLECTION) &... | [
"Processes the template for all collection 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\n@doc.tag type=\"block\""
] | [
"Method to initialize the list.\n\n@param resList a given instance or null\n@return an instance",
"Gets the name of the vertex attribute containing the texture\ncoordinates for the named texture.\n\n@param texName name of texture\n@return name of texture coordinate vertex attribute",
"Extracts the column from a... |
private boolean readNextRow() {
while (!stop) {
String row = getLineWrapped();
// end of stream - null indicates end of stream before we see last_seq which shouldn't
// be possible but we should handle it
if (row == null || row.startsWith("{\"last_seq\":")) {
... | [
"Reads and sets the next feed in the stream."
] | [
"generate a prepared INSERT-Statement for the Class\ndescribed by cld.\n\n@param cld the ClassDescriptor",
"Setter for the file format.\n@param fileFormat File format the configuration file is in.",
"Concatenate all the arrays in the list into a vector.\n\n@param arrays List of arrays.\n@return Vector.",
"con... |
public void poseFromBones()
{
for (int i = 0; i < getNumBones(); ++i)
{
GVRSceneObject bone = mBones[i];
if (bone == null)
{
continue;
}
if ((mBoneOptions[i] & BONE_LOCK_ROTATION) != 0)
{
continue... | [
"Applies the matrices computed from the scene object's\nlinked to the skeleton bones to the current pose.\n@see #applyPose(GVRPose, int)\n@see #setPose(GVRPose)"
] | [
"Map the EventType.\n\n@param eventType the event type\n@return the event",
"Log column data.\n\n@param column column data",
"Saves the favorites.\n\n@param favorites the list of favorites to save\n@throws CmsException if something goes wrong",
"Complete timing the operation with the given identifier. If you ... |
public void subscriptionRequestReceived(SubscriptionRequest sr) throws SubscriptionException {
LOG.info("Subscriber -> (Hub), new subscription request received.", sr.getCallback());
try {
verifySubscriberRequestedSubscription(sr);
if ("subscribe".equals(sr.getMode())) {
... | [
"Input method, called by a Subscriber indicating its intent into receive notification about a given topic.\n\n@param sr DTO containing the info given by the protocol"
] | [
"Remove contents from the deployment and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@th... |
void release() {
if (mCurrentRequests != null) {
synchronized (mCurrentRequests) {
mCurrentRequests.clear();
mCurrentRequests = null;
}
}
if (mDownloadQueue != null) {
mDownloadQueue = null;
}
if (mDownloadDispatchers != null) {
stop();
for (int i = 0; i < mDownloadDispatchers.length... | [
"Cancels all the pending & running requests and releases all the dispatchers."
] | [
"Checks that arguments and parameter types match.\n@param params method parameters\n@param args type arguments\n@return -1 if arguments do not match, 0 if arguments are of the exact type and >0 when one or more argument is\nnot of the exact type but still match",
"Check that each emitted notification is properly ... |
public ImmutableList<CandidateElement> extract(StateVertex currentState)
throws CrawljaxException {
LinkedList<CandidateElement> results = new LinkedList<>();
if (!checkedElements.checkCrawlCondition(browser)) {
LOG.info("State {} did not satisfy the CrawlConditions.", currentState.getName());
return Immu... | [
"This method extracts candidate elements from the current DOM tree in the browser, based on\nthe crawl tags defined by the user.\n\n@param currentState the state in which this extract method is requested.\n@return a list of candidate elements that are not excluded.\n@throws CrawljaxException if the method fails."
] | [
"Process a single criteria block.\n\n@param list parent criteria list\n@param block current block",
"Get the max extent as a envelop object.",
"Whether the specified JavaBeans property exists on the given type or not.\n\n@param clazz the type of interest\n@param property the JavaBeans property name\n@param elem... |
public void replace( Token original , Token target ) {
if( first == original )
first = target;
if( last == original )
last = target;
target.next = original.next;
target.previous = original.previous;
if( original.next != null )
original.next.... | [
"Removes 'original' and places 'target' at the same location"
] | [
"Get the content-type, including the optional \";base64\".",
"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",
"Checks to see if the two ma... |
public static base_responses unset(nitro_service client, String username[], String args[]) throws Exception {
base_responses result = null;
if (username != null && username.length > 0) {
systemuser unsetresources[] = new systemuser[username.length];
for (int i=0;i<username.length;i++){
unsetresources[i] =... | [
"Use this API to unset the properties of systemuser resources.\nProperties that need to be unset are specified in args array."
] | [
"Determines if a mouse event is inside a box.",
"Get an exception reporting a missing, required XML child element.\n@param reader the stream reader\n@param required a set of enums whose toString method returns the\nattribute name\n@return the exception",
"Removes double-quotes from around a string\n@param str\n... |
@Beta
public MSICredentials withObjectId(String objectId) {
this.objectId = objectId;
this.clientId = null;
this.identityId = null;
return this;
} | [
"Specifies the object id associated with a user assigned managed service identity\nresource that should be used to retrieve the access token.\n\n@param objectId Object ID of the identity to use when authenticating to Azure AD.\n@return MSICredentials"
] | [
"Manual check because introducing a capability can't be done without a full refactoring.\nThis has to go as soon as the management interfaces are redesigned.\n@param context the OperationContext\n@param otherManagementEndpoint : the address to check that may provide an exposed jboss-remoting endpoint.\n@throws Oper... |
private static Constructor retrieveCollectionProxyConstructor(Class proxyClass, Class baseType, String typeDesc)
{
if(proxyClass == null)
{
throw new MetadataException("No " + typeDesc + " specified.");
}
if(proxyClass.isInterface() || Modifier.isAbstract(proxyClass... | [
"Retrieves the constructor that is used by OJB to create instances of the given collection proxy\nclass.\n\n@param proxyClass The proxy class\n@param baseType The required base type of the proxy class\n@param typeDesc The type of collection proxy\n@return The constructor"
] | [
"Get a bean from the application context. Returns null if the bean does not exist.\n@param name name of bean\n@param requiredType type of bean\n@return the bean or null",
"Count the number of occurrences of a sub CharSequence.\n\n@param self a CharSequence\n@param text a sub CharSequence\n@return the number of oc... |
private Set<String> findResourceNamesFromFileSystem(String classPathRootOnDisk, String scanRootLocation, File folder) {
LOGGER.debug("Scanning for resources in path: {} ({})", folder.getPath(), scanRootLocation);
File[] files = folder.listFiles();
if (files == null) {
return emptySe... | [
"Finds all the resource names contained in this file system folder.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param scanRootLocation The root location of the scan on the classpath, without leading or trailing slashes.\n@param folder The folder... | [
"Reset a timer of the given string name for the given thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked",
"Converts an object to an instance of the... |
private void updateBaseCalendarNames(List<Pair<ProjectCalendar, Integer>> baseCalendars)
{
for (Pair<ProjectCalendar, Integer> pair : baseCalendars)
{
ProjectCalendar cal = pair.getFirst();
Integer baseCalendarID = pair.getSecond();
ProjectCalendar baseCal = m_calendarMap.get(b... | [
"The way calendars are stored in an MPP8 file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method w... | [
"Create a JsonParser for a given json node.\n@param jsonNode the json node\n@return the json parser\n@throws IOException",
"Pool configuration.\n@param props\n@throws HibernateException",
"Creates a XopBean. The image on the disk is included as a byte array,\na DataHandler and java.awt.Image\n@return the bean\n... |
public boolean handleKeyDeletion(final String key) {
if (m_keyset.getKeySet().contains(key)) {
if (removeKeyForAllLanguages(key)) {
m_keyset.removeKey(key);
return true;
} else {
return false;
}
}
return true;
... | [
"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."
] | [
"Returns the corresponding mac section, or null if this address section does not correspond to a mac section.\nIf this address section has a prefix length it is ignored.\n\n@param extended\n@return",
"Converts a number of bytes to a human-readable string\n@param bytes the bytes\n@return the human-readable string"... |
private void populateCalendarHours(Record record, ProjectCalendarHours hours) throws MPXJException
{
hours.setDay(Day.getInstance(NumberHelper.getInt(record.getInteger(0))));
addDateRange(hours, record.getTime(1), record.getTime(2));
addDateRange(hours, record.getTime(3), record.getTime(4));
... | [
"Populates a calendar hours instance.\n\n@param record MPX record\n@param hours calendar hours instance\n@throws MPXJException"
] | [
"Register a new SingleServiceWrapperInterceptor for the bean being\nwrapped, associate it with the PerformanceMonitor and tell it which methods\nto intercept.\n\n@param source An Attribute node from the spring configuration\n@param beanName The name of the bean that this performance monitor is wrapped around\n@para... |
public void publish() {
CmsDirectPublishDialogAction action = new CmsDirectPublishDialogAction();
List<CmsResource> resources = getBundleResources();
I_CmsDialogContext context = new A_CmsDialogContext("", ContextType.appToolbar, resources) {
public void focus(CmsUUID structureId) ... | [
"Publish the bundle resources directly."
] | [
"Use this API to fetch the statistics of all appfwpolicylabel_stats resources that are configured on netscaler.",
"Restores a trashed file to a new location with a new name.\n@param fileID the ID of the trashed file.\n@param newName an optional new name to give the file. This can be null to use the fil... |
public void fireEvent(Type eventType, Object event, Annotation... qualifiers) {
final EventMetadata metadata = new EventMetadataImpl(eventType, null, qualifiers);
notifier.fireEvent(eventType, event, metadata, qualifiers);
} | [
"Fire an event and notify observers that belong to this module.\n@param eventType\n@param event\n@param qualifiers"
] | [
"Gets the flags associated with this attribute.\n@return the flags. Will not return {@code null}",
"Use this API to fetch all the configstatus resources that are configured on netscaler.",
"Create and return a new Violation for this rule and the specified import className and alias\n@param sourceCode - the Sour... |
public static String expandLine(CharSequence self, int tabStop) {
String s = self.toString();
int index;
while ((index = s.indexOf('\t')) != -1) {
StringBuilder builder = new StringBuilder(s);
int count = tabStop - index % tabStop;
builder.deleteCharAt(index);... | [
"Expands all tabs into spaces. Assumes the CharSequence represents a single line of text.\n\n@param self A line to expand\n@param tabStop The number of spaces a tab represents\n@return The expanded toString() of this CharSequence\n@see #expandLine(String, int)\n@since 1.8.2"
] | [
"Return a list of the top 100 unique places clustered by a given placetype for a user.\n\n@param placeType\nUse Type-constants at {@link Place}\n@param woeId\nA Where On Earth (WOE) ID. Optional, can be null.\n@param placeId\nA Flickr Places ID. Optional, can be null.\n@param threshold\nThe minimum number of photos... |
private void setUserFieldValue(UDFAssignmentType udf, DataType dataType, Object value)
{
switch (dataType)
{
case DURATION:
{
udf.setTextValue(((Duration) value).toString());
break;
}
case CURRENCY:
{
if (!(value instanceof... | [
"Sets the value of a UDF.\n\n@param udf user defined field\n@param dataType MPXJ data type\n@param value field value"
] | [
"Use this API to update ntpserver resources.",
"Detects if the current device is a mobile device.\nThis method catches most of the popular modern devices.\nExcludes Apple iPads and other modern tablets.\n@return detection of any mobile device using the quicker method",
"Use this API to fetch tmsessionpolicy_bin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.