query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
public Collection<SerialMessage> initialize() {
ArrayList<SerialMessage> result = new ArrayList<SerialMessage>();
if (this.getNode().getManufacturer() == 0x010F && this.getNode().getDeviceType() == 0x0501) {
logger.warn("Detected Fibaro FGBS001 Universal Sensor - this device fails to respond to SENSOR_AL... | [
"Initializes the alarm sensor command class. Requests the supported alarm types."
] | [
"Use this API to add ipset.",
"Obtains a Pax zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Pax zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"decodes the uriFragment\n\n@param res the resource ... |
public void writeBasicDeclarations() throws RDFHandlerException {
for (Map.Entry<String, String> uriType : Vocabulary
.getKnownVocabularyTypes().entrySet()) {
this.rdfWriter.writeTripleUriObject(uriType.getKey(),
RdfWriter.RDF_TYPE, uriType.getValue());
}
} | [
"Writes OWL declarations for all basic vocabulary elements used in the\ndump.\n\n@throws RDFHandlerException"
] | [
"The Critical field indicates whether a task has any room in the schedule\nto slip, or if a task is on the critical path. The Critical field contains\nYes if the task is critical and No if the task is not critical.\n\n@return boolean",
"Read relation data.",
"Ensures that the specified fields are present in the... |
public void startDockerMachine(String cliPathExec, String machineName) {
commandLineExecutor.execCommand(createDockerMachineCommand(cliPathExec), "start", machineName);
this.manuallyStarted = true;
} | [
"Starts given docker machine.\n\n@param cliPathExec\nlocation of docker-machine or null if it is on PATH.\n@param machineName\nto be started."
] | [
"Converts from partitionId to nodeId. The list of partition IDs,\npartitionIds, is expected to be a \"replicating partition list\", i.e., the\nmapping from partition ID to node ID should be one to one.\n\n@param partitionIds List of partition IDs for which to find the Node ID\nfor the Node that owns the partition.\... |
public void setMesh(GVRMesh mesh) {
mMesh = mesh;
NativeMeshCollider.setMesh(getNative(), mesh.getNative());
} | [
"Set the mesh to be tested against.\n\n@param mesh\nThe {@link GVRMesh} that the picking ray will test against."
] | [
"Returns a BoxStoragePolicyAssignment information.\n@param api the API connection to be used by the resource.\n@param resolvedForType the assigned entity type for the storage policy.\n@param resolvedForID the assigned entity id for the storage policy.\n@return information about this {@link Bo... |
public byte[] keyToStorageFormat(byte[] key) {
switch(getReadOnlyStorageFormat()) {
case READONLY_V0:
case READONLY_V1:
return ByteUtils.md5(key);
case READONLY_V2:
return ByteUtils.copy(ByteUtils.md5(key), 0, 2 * ByteUtils.SIZE_OF_INT);
... | [
"Converts the key to the format in which it is stored for searching\n\n@param key Byte array of the key\n@return The format stored in the index file"
] | [
"Make a composite filter from the given sub-filters using AND to combine filters.",
"once animation is setup, start the animation record the beginning and\nending time for the animation",
"Tests correctness.",
"Perform a module dependency graph of the target and return the graph as a JSON\n\n@param moduleName... |
public static base_response update(nitro_service client, bridgetable resource) throws Exception {
bridgetable updateresource = new bridgetable();
updateresource.bridgeage = resource.bridgeage;
return updateresource.update_resource(client);
} | [
"Use this API to update bridgetable."
] | [
"Prints text to output stream, replacing parameter start and end\nplaceholders\n\n@param text the String to print",
"Write the given long value as a 4 byte unsigned integer. Overflow is\nignored.\n\n@param buffer The buffer to write to\n@param index The position in the buffer at which to begin writing\n@param va... |
public static Collection<Component> getComponentsList() {
TransactionLogger instance = getInstance();
if (instance == null) {
return null;
}
return instance.components.values();
} | [
"Get components list for current instance\n@return components"
] | [
"Creates the automaton map.\n\n@param prefix the prefix\n@param valueList the value list\n@param filter the filter\n@return the map",
"Adds this handler to the widget.\n\n@param <H> the type of handler to add\n@param type the event type\n@param handler the handler\n@return {@link HandlerRegistration} used to remo... |
public synchronized void maybeThrottle(int eventsSeen) {
if (maxRatePerSecond > 0) {
long now = time.milliseconds();
try {
rateSensor.record(eventsSeen, now);
} catch (QuotaViolationException e) {
// If we're over quota, we calculate how long t... | [
"Sleeps if necessary to slow down the caller.\n\n@param eventsSeen Number of events seen since last invocation. Basis for\ndetermining whether its necessary to sleep."
] | [
"get the last segment at the moment\n\n@return the last segment",
"Use this API to update csparameter.",
"Delivers the correct JSON Object for properties\n\n@param properties\n@throws org.json.JSONException",
"Get the output mapper from processor.",
"Create a random video.\n\n@return random video.",
"Retu... |
private static Pod getRandomPod(KubernetesClient client, String name, String namespace) {
Endpoints endpoints = client.endpoints().inNamespace(namespace).withName(name).get();
List<String> pods = new ArrayList<>();
if (endpoints != null) {
for (EndpointSubset subset : endpoints.getSu... | [
"Get a random pod that provides the specified service in the specified namespace.\n\n@param client\nThe client instance to use.\n@param name\nThe name of the service.\n@param namespace\nThe namespace of the service.\n\n@return The pod or null if no pod matches."
] | [
"Clean up the environment object for the given storage engine",
"Dump raw data as hex.\n\n@param buffer buffer\n@param offset offset into buffer\n@param length length of data to dump\n@param ascii true if ASCII should also be printed\n@param columns number of columns\n@param prefix prefix when printing\n@return h... |
public static base_response Shutdown(nitro_service client, shutdown resource) throws Exception {
shutdown Shutdownresource = new shutdown();
return Shutdownresource.perform_operation(client);
} | [
"Use this API to Shutdown shutdown."
] | [
"Notify the widget that refresh state has changed. Do not call this when\nrefresh is triggered by a swipe gesture.\n\n@param refreshing Whether or not the view should show refresh progress.",
"This method reads a two byte integer from the input stream.\n\n@param is the input stream\n@return integer value\n@throws... |
private String formatUnits(Number value)
{
return (value == null ? null : m_formats.getUnitsDecimalFormat().format(value.doubleValue() / 100));
} | [
"This method is called to format a units value.\n\n@param value numeric value\n@return currency value"
] | [
"Starts the one and only job instance in a separate Thread. Should be called exactly one time before\nthe operation is stopped.\n\n@param arguments {@inheritDoc}",
"Restores a trashed folder back to its original location.\n@param folderID the ID of the trashed folder.\n@return info about the restored fo... |
@NotThreadsafe
private void initFileStreams(int chunkId) {
/**
* {@link Set#add(Object)} returns false if the element already existed in the set.
* This ensures we initialize the resources for each chunk only once.
*/
if (chunksHandled.add(chunkId)) {
try {
... | [
"The MapReduce framework should operate sequentially, so thread safety shouldn't be a problem."
] | [
"Test for convergence by seeing if the element with the largest change\nis smaller than the tolerance. In some test cases it alternated between\nthe + and - values of the eigen vector. When this happens it seems to have \"converged\"\nto a non-dominant eigen vector. At least in the case I looked at. I haven't... |
public List<GanttDesignerRemark.Task> getTask()
{
if (task == null)
{
task = new ArrayList<GanttDesignerRemark.Task>();
}
return this.task;
} | [
"Gets the value of the task property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the task property.\n\n<p>\nFor example, ... | [
"Converts any string into a string that is safe to use as a file name.\nThe result will only include ascii characters and numbers, and the \"-\",\"_\", and \".\" characters.",
"Sets the global setting for this ID\n\n@param pathId ID of path\n@param global True if global, False otherwise",
"Assign float value wi... |
private void executeProxyRequest(HttpMethod httpMethodProxyRequest,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse, History history) {
try {
RequestInformation requestInfo = requestInformation.g... | [
"Execute a request through Odo processing\n\n@param httpMethodProxyRequest\n@param httpServletRequest\n@param httpServletResponse\n@param history"
] | [
"Create a model controller client which is exclusively receiving messages on an existing channel.\n\n@param channel the channel\n@param executorService an executor\n@return the created client",
"Does the headset the device is docked into have a dedicated home key\n@return",
"If this node represents a bean prope... |
public boolean matchesWithMask(IPAddress other, IPAddress mask) {
return getSection().matchesWithMask(other.getSection(), mask.getSection());
} | [
"Applies the mask to this address and then compares values with the given address\n\n@param mask\n@param other\n@return"
] | [
"Returns a string describing 'time' as a time relative to 'now'.\n\nSee {@link android.text.format.DateUtils#getRelativeTimeSpanString} for full docs.\n\n@param context the context\n@param time the time to describe\n@param flags a bit mask for formatting options, usually FORMAT_ABBREV_RELATIVE\n@return a string des... |
@Deprecated
public String get(String path) {
final JsonValue value = this.values.get(this.pathToProperty(path));
if (value == null) {
return null;
}
if (!value.isString()) {
return value.toString();
}
return value.asString();
} | [
"Returns a value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return the metadata property value.\n@deprecated Metadata#get() does not handle all possible metadata types; use Metadata#getValue() instead"
] | [
"Dumps an animation channel to stdout.\n\n@param nodeAnim the channel",
"Add an empty work week.\n\n@return new work week",
"Get a File path list from configuration.\n\n@param name the name of the property\n@param props the set of configuration properties\n\n@return the CanonicalFile form for the given name.",
... |
private I_CmsFacetQueryItem parseFacetQueryItem(final String prefix) {
I_CmsXmlContentValue query = m_xml.getValue(prefix + XML_ELEMENT_QUERY_FACET_QUERY_QUERY, m_locale);
if (null != query) {
String queryString = query.getStringValue(null);
I_CmsXmlContentValue label = m_xml.ge... | [
"Parses a single query facet item with query and label.\n@param prefix path to the query facet item (with trailing '/').\n@return the query facet item."
] | [
"Returns all headers with the headers from the Payload\n\n@return All the headers",
"Load the view port execution.\n\n@param then callback when the view port is detected.\n@param fallback fallback when no view port detected or failure to detect the given\n{@link Boundary} (using {@link #propagateFallback(boolean)... |
public Map<String, Integer> getAggregateResultCountSummary() {
Map<String, Integer> summaryMap = new LinkedHashMap<String, Integer>();
for (Entry<String, LinkedHashSet<String>> entry : aggregateResultMap
.entrySet()) {
summaryMap.put(entry.getKey(), entry.getValue().size())... | [
"Gets the aggregate result count summary. only list the counts for brief\nunderstanding\n\n@return the aggregate result count summary"
] | [
"Unmarshal test suite from given file.",
"Wrap getOperationStatus to avoid throwing exception over JMX",
"Drives the unit test.",
"Unescape and unquote the path. Ready for translation.",
"Return the list of module dependencies\n\n@param moduleName\n@param moduleVersion\n@param fullRecursive\n@param corporat... |
public static void removeZeros( DMatrixSparseCSC input , DMatrixSparseCSC output , double tol ) {
ImplCommonOps_DSCC.removeZeros(input,output,tol);
} | [
"Copies all elements from input into output which are > tol.\n@param input (Input) input matrix. Not modified.\n@param output (Output) Output matrix. Modified and shaped to match input.\n@param tol Tolerance for defining zero"
] | [
"absolute for advancedJDBCSupport\n@param row",
"Use this API to rename a gslbservice resource.",
"read CustomInfo list from table.\n\n@param eventId the event id\n@return the map",
"Return collection of path Ids in priority order\n\n@param profileId ID of profile\n@return collection of path Ids in priority o... |
private static String loadUA(ClassLoader loader, String filename){
String ua = "cloudant-http";
String version = "unknown";
final InputStream propStream = loader.getResourceAsStream(filename);
final Properties properties = new Properties();
try {
if (propStream != nul... | [
"Loads the properties file using the classloader provided. Creating a string from the properties\n\"user.agent.name\" and \"user.agent.version\".\n@param loader The class loader to use to load the resource.\n@param filename The name of the file to load.\n@return A string that represents the first part of the UA str... | [
"Deletes the device pin.",
"Create a patch element for the rollback patch.\n\n@param entry the entry\n@return the new patch element",
"Performs a matrix inversion operations that takes advantage of the special\nproperties of a covariance matrix.\n\n@param cov A covariance matrix. Not modified.\n@param cov_inv T... |
public String getNextDay(String dateString, boolean onlyBusinessDays) {
DateTimeFormatter parser = ISODateTimeFormat.date();
DateTime date = parser.parseDateTime(dateString).plusDays(1);
Calendar cal = Calendar.getInstance();
cal.setTime(date.toDate());
if (onlyBusinessDays) {
... | [
"Takes a date, and retrieves the next business day\n\n@param dateString the date\n@param onlyBusinessDays only business days\n@return a string containing the next business day"
] | [
"Use this API to fetch appfwprofile_safeobject_binding resources of given name .",
"Decrease the indent level.",
"Tries to load a property file with the specified name.\n\n@param localizedName the name\n@return the resource bundle if it was loaded, otherwise the backup",
"Tells you if the expression is the fa... |
public static base_response unset(nitro_service client, nsspparams resource, String[] args) throws Exception{
nsspparams unsetresource = new nsspparams();
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of nsspparams resource.\nProperties that need to be unset are specified in args array."
] | [
"Logs the current user out.\n\n@throws IOException",
"Process a single criteria block.\n\n@param list parent criteria list\n@param block current block",
"List the greetings in the specified guestbook.",
"Retrieve a UUID from an input stream.\n\n@param is input stream\n@return UUID instance",
"Runs a Story w... |
public int getSridFromCrs(String crs) {
int crsInt;
if (crs.indexOf(':') != -1) {
crsInt = Integer.parseInt(crs.substring(crs.indexOf(':') + 1));
} else {
try {
crsInt = Integer.parseInt(crs);
} catch (NumberFormatException e) {
crsInt = 0;
}
}
return crsInt;
} | [
"Isn't there a method for this in GeoTools?\n\n@param crs\nCRS string in the form of 'EPSG:<srid>'.\n@return SRID as integer."
] | [
"Creates a new Box Developer Edition connection with App User token levaraging BoxConfig.\n@param userId the user ID to use for an App User.\n@param boxConfig box configuration settings object\n@return a new instance of BoxAPIConnection.",
"Append the Parameter\nAdd the place holder ? o... |
private ProjectFile handleDirectory(File directory) throws Exception
{
ProjectFile result = handleDatabaseInDirectory(directory);
if (result == null)
{
result = handleFileInDirectory(directory);
}
return result;
} | [
"We have a directory. Determine if this contains a multi-file database we understand, if so\nprocess it. If it does not contain a database, test each file within the directory\nstructure to determine if it contains a file whose format we understand.\n\n@param directory directory to process\n@return ProjectFile inst... | [
"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",
"Prints the results of the equation to standard out. Useful for debuggi... |
public static int rank(SingularValueDecomposition_F64 svd , double threshold ) {
int numRank=0;
double w[]= svd.getSingularValues();
int N = svd.numberOfSingularValues();
for( int j = 0; j < N; j++ ) {
if( w[j] > threshold)
numRank++;
}
ret... | [
"Extracts the rank of a matrix using a preexisting decomposition.\n\n@see #singularThreshold(SingularValueDecomposition_F64)\n\n@param svd A precomputed decomposition. Not modified.\n@param threshold Tolerance used to determine of a singular value is singular.\n@return The rank of the decomposed matrix."
] | [
"Obtains a Accounting zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Accounting zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Register this broker in ZK for the first time.",
"Appends the inden... |
protected void solveL(double[] vv) {
int ii = 0;
for( int i = 0; i < n; i++ ) {
int ip = indx[i];
double sumReal = vv[ip*2];
double sumImg = vv[ip*2+1];
vv[ip*2] = vv[i*2];
vv[ip*2+1] = vv[i*2+1];
if( ii != 0 ) {
// ... | [
"Solve the using the lower triangular matrix in LU. Diagonal elements are assumed\nto be 1"
] | [
"Set the repeat type.\n\nIn the default {@linkplain GVRRepeatMode#ONCE run-once} mode, animations\nrun once, ignoring the {@linkplain #getRepeatCount() repeat count.} In\n{@linkplain GVRRepeatMode#PINGPONG ping pong} and\n{@linkplain GVRRepeatMode#REPEATED repeated} modes, animations do honor\nthe repeat count, whi... |
public static Object parsePrimitive(
final String fieldName, final PrimitiveAttribute<?> pAtt, final PObject requestData) {
Class<?> valueClass = pAtt.getValueClass();
Object value;
try {
value = parseValue(false, new String[0], valueClass, fieldName, requestData);
... | [
"Get the value of a primitive type from the request data.\n\n@param fieldName the name of the attribute to get from the request data.\n@param pAtt the primitive attribute.\n@param requestData the data to retrieve the value from."
] | [
"Registers the transformers for JBoss EAP 7.0.0.\n\n@param subsystemRegistration contains data about the subsystem registration",
"Print the lead string followed by centered formatted string. The whole\nlength of the line is 80 chars.\n\nExample:\n\n```java\nprintCenterWithLead(\" *\", \"Hello %s\", \"World\");\n... |
private Point parsePoint(String point) {
int comma = point.indexOf(',');
if (comma == -1)
return null;
float lat = Float.valueOf(point.substring(0, comma));
float lng = Float.valueOf(point.substring(comma + 1));
return spatialctx.makePoint(lng, lat);
} | [
"Parses coordinates into a Spatial4j point shape."
] | [
"Returns a button component. On click, it triggers adding a bundle descriptor.\n@return a button for adding a descriptor to a bundle.",
"Execute a server task.\n\n@param listener the transactional server listener\n@param task the server task\n@return time to wait in ms for a response from the server, or {@code -1... |
@SafeVarargs
public static <T> Set<T> create(final T... values) {
Set<T> result = new HashSet<>(values.length);
Collections.addAll(result, values);
return result;
} | [
"Create a HashSet with the given initial values.\n\n@param values The values\n@param <T> The type."
] | [
"Get the root path where the build is located, the project may be checked out to\na sub-directory from the root workspace location.\n\n@param globalEnv EnvVars to take the workspace from, if workspace is not found\nthen it is take from project.getSomeWorkspace()\n@return The location of the root of the Gradle build... |
public void processField(String template, Properties attributes) throws XDocletException
{
String name = OjbMemberTagsHandler.getMemberName();
String defaultType = getDefaultJdbcTypeForCurrentMember();
String defaultConversion = getD... | [
"Sets the current field definition derived from the current member, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\n@doc.tag type=\"block\"\n@doc.param ... | [
"Gets a JsonObject containing any pending changes to this object that can be sent back to the Box API.\n@return a JsonObject containing the pending changes.",
"Determine the enum value corresponding to the third play state found in the packet.\n\n@return the proper value",
"Gets the first row for a query\n\n@pa... |
boolean deleteEntity(@NotNull final PersistentStoreTransaction txn, @NotNull final PersistentEntity entity) {
clearProperties(txn, entity);
clearBlobs(txn, entity);
deleteLinks(txn, entity);
final PersistentEntityId id = entity.getId();
final int entityTypeId = id.getTypeId();
... | [
"Deletes specified entity clearing all its properties and deleting all its outgoing links.\n\n@param entity to delete."
] | [
"A package of the specified class will be scanned and found classes will be added to the set of bean classes for the synthetic bean archive.\n\n@param scanRecursively\n@param packageClass\n@return self",
"Initializes the alarm sensor command class. Requests the supported alarm types.",
"Returns the next index o... |
private void readCalendars(Storepoint phoenixProject)
{
Calendars calendars = phoenixProject.getCalendars();
if (calendars != null)
{
for (Calendar calendar : calendars.getCalendar())
{
readCalendar(calendar);
}
ProjectCalendar defaultCalendar = m_pr... | [
"This method extracts calendar data from a Phoenix file.\n\n@param phoenixProject Root node of the Phoenix file"
] | [
"returns controller if a new device is found",
"Combine the iterators into a single one.\n\n@param iterators An iterator of iterators\n@return a single combined iterator",
"Start a print.\n\n@param jobId the job ID\n@param specJson the client json request.\n@param out the stream to write to.",
"Sets the top p... |
public static BoxRetentionPolicy.Info createIndefinitePolicy(BoxAPIConnection api, String name) {
return createRetentionPolicy(api, name, TYPE_INDEFINITE, 0, ACTION_REMOVE_RETENTION);
} | [
"Used to create a new indefinite retention policy.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@return the created retention policy's info."
] | [
"Add tasks to the tree.\n\n@param parentNode parent tree node\n@param parent parent task container",
"Returns the export format indicated in the result-type parameter \"layoutManager\"\n@param _invocation\n@return",
"Creates a CSS rgb specification from a PDF color\n@param pdcolor\n@return the rgb() string",
... |
public int getPartition(byte[] key,
byte[] value,
int numReduceTasks) {
try {
/**
* {@link partitionId} is the Voldemort primary partition that this
* record belongs to.
*/
int partitionId = By... | [
"This function computes which reduce task to shuffle a record to."
] | [
"Prints a few aspects of the TreebankLanguagePack, just for debugging.",
"Adds a license to an artifact if the license exist into the database\n\n@param gavc String\n@param licenseId String",
"Read the given source byte array, then overwrite this buffer's contents\n\n@param src source byte array\n@param srcOffs... |
private static IndexedTypeSet toRootEntities(ExtendedSearchIntegrator extendedIntegrator, Class<?>... selection) {
Set<Class<?>> entities = new HashSet<Class<?>>();
//first build the "entities" set containing all indexed subtypes of "selection".
for ( Class<?> entityType : selection ) {
IndexedTypeSet targeted... | [
"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"
] | [
"Gets an exception reporting an unexpected XML attribute.\n\n@param reader a reference to the stream reader.\n@param index the attribute index.\n@return the constructed {@link javax.xml.stream.XMLStreamException}.",
"Populates a calendar exception instance.\n\n@param record MPX record\n@param calendar calendar to... |
public Map<Integer, Row> createWorkPatternMap(List<Row> rows)
{
Map<Integer, Row> map = new HashMap<Integer, Row>();
for (Row row : rows)
{
map.put(row.getInteger("WORK_PATTERNID"), row);
}
return map;
} | [
"Creates a map of work pattern rows indexed by the primary key.\n\n@param rows work pattern rows\n@return work pattern map"
] | [
"Restarts a single dyno\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param dynoId the unique identifier of the dyno to restart",
"Expands the cluster to include density-reachable items.\n\n@param cluster Cluster to expand\n@param point Point to add to cluster\n@param neighbors Li... |
private static Iterator<String> splitIntoDocs(Reader r) {
if (TREAT_FILE_AS_ONE_DOCUMENT) {
return Collections.singleton(IOUtils.slurpReader(r)).iterator();
} else {
Collection<String> docs = new ArrayList<String>();
ObjectBank<String> ob = ObjectBank.getLineIterator(r);
StringBuil... | [
"end class CoNLLIterator"
] | [
"Delivers the correct JSON Object for properties\n\n@param properties\n@throws org.json.JSONException",
"Attempt to detect the current platform.\n\n@return The current platform.\n\n@throws UnsupportedPlatformException if the platform cannot be detected.",
"Detach the component of the specified type from this sc... |
public static void installDomainConnectorServices(final OperationContext context,
final ServiceTarget serviceTarget,
final ServiceName endpointName,
final Ser... | [
"Installs a remoting stream server for a domain instance\n@param serviceTarget the service target to install the services into\n@param endpointName the name of the endpoint to install the stream server into\n@param networkInterfaceBinding the network interface binding\n@param port the port\n@param securityRealm the... | [
"Attemps to delete all provided segments from a log and returns how many it was able to",
"Triggers a replication request, blocks while the replication is in progress.\n@return ReplicationResult encapsulating the result",
"Populate the container from outline code data.\n\n@param field field type\n@param items p... |
public ItemRequest<Task> addTag(String task) {
String path = String.format("/tasks/%s/addTag", task);
return new ItemRequest<Task>(this, Task.class, path, "POST");
} | [
"Adds a tag to a task. Returns an empty data block.\n\n@param task The task to add a tag to.\n@return Request object"
] | [
"calls _initMH on the method handler and then stores the result in the\nmethodHandler field as then new methodHandler",
"Gets a SerialMessage with the SENSOR_ALARM_GET command\n@return the serial message",
"Flush the network buffer and write all entries to the serve. then wait\nfor an ack from the server. This ... |
public void resolveLazyCrossReferences(final CancelIndicator mon) {
final CancelIndicator monitor = mon == null ? CancelIndicator.NullImpl : mon;
TreeIterator<Object> iterator = EcoreUtil.getAllContents(this, true);
while (iterator.hasNext()) {
operationCanceledManager.checkCanceled(monitor);
InternalEObjec... | [
"resolves any lazy cross references in this resource, adding Issues for unresolvable elements to this resource.\nThis resource might still contain resolvable proxies after this method has been called.\n\n@param mon a {@link CancelIndicator} can be used to stop the resolution."
] | [
"Add new control at the control bar with specified touch listener, resource and position.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener\n@param position control position in the bar",
"Plots... |
private Object getParameter(String name, String value) throws ParseException, NumberFormatException {
Object result = null;
if (name.length() > 0) {
switch (name.charAt(0)) {
case 'i':
if (null == value || value.length() == 0) {
value = "0";
}
result = new Integer(value);
break;
... | [
"Convert a query parameter to the correct object type based on the first letter of the name.\n\n@param name parameter name\n@param value parameter value\n@return parameter object as\n@throws ParseException value could not be parsed\n@throws NumberFormatException value could not be parsed"
] | [
"Notification that a connection was closed.\n\n@param closed the closed connection",
"Returns a signed string representation of the given number.\n\n@param number\n@return String for BigDecimal value",
"Search for the second entry in the second database. Use this method for databases configured with no duplicat... |
protected void resize( VariableMatrix mat , int numRows , int numCols ) {
if( mat.isTemp() ) {
mat.matrix.reshape(numRows,numCols);
}
} | [
"If the variable is a local temporary variable it will be resized so that the operation can complete. If not\ntemporary then it will not be reshaped\n@param mat Variable containing the matrix\n@param numRows Desired number of rows\n@param numCols Desired number of columns"
] | [
"Read an element which contains only a single boolean attribute.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@return the boolean value\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains othe... |
private DBHandling createDBHandling() throws BuildException
{
if ((_handling == null) || (_handling.length() == 0))
{
throw new BuildException("No handling specified");
}
try
{
String className = "org.apache.ojb.broker.platforms."+
... | [
"Creates a db handling object.\n\n@return The db handling object\n@throws BuildException If the handling is invalid"
] | [
"Starts the transition",
"Retrieve an instance of the ResourceField class based on the data read from an\nMS Project file.\n\n@param value value from an MS Project file\n@return ResourceField instance",
"Add working days and working time to a calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param gpCalendar Gan... |
private double convertToConvention(double value, DataKey key, QuotingConvention toConvention, double toDisplacement,
QuotingConvention fromConvention, double fromDisplacement, AnalyticModel model) {
if(toConvention == fromConvention) {
if(toConvention != QuotingConvention.PAYERVOLATILITYLOGNORMAL) {
r... | [
"Convert the value to requested quoting convention.\nConversion involving receiver premium assumes zero wide collar.\n\n@param value The value to convert.\n@param key The key of the value.\n@param toConvention The convention to convert to.\n@param toDisplacement The displacement to be used, if converting to log nor... | [
"Parse duration represented as an arbitrary fraction of minutes.\n\n@param properties project properties\n@param value duration value\n@param targetTimeUnit required output time units\n@param factor required fraction of a minute\n@return Duration instance",
"A GString variant of the equivalent GString method.\n\n... |
public Boolean getBoolean(int field, String falseText)
{
Boolean result;
if ((field < m_fields.length) && (m_fields[field].length() != 0))
{
result = ((m_fields[field].equalsIgnoreCase(falseText) == true) ? Boolean.FALSE : Boolean.TRUE);
}
else
{
result = null;
... | [
"Accessor method to retrieve a Boolean instance.\n\n@param field the index number of the field to be retrieved\n@param falseText locale specific text representing false\n@return the value of the required field"
] | [
"Use this API to fetch the statistics of all rnatip_stats resources that are configured on netscaler.",
"Prepare a parallel HTTP OPTION Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Extracts the row from a matrix.\... |
public static base_response update(nitro_service client, protocolhttpband resource) throws Exception {
protocolhttpband updateresource = new protocolhttpband();
updateresource.reqbandsize = resource.reqbandsize;
updateresource.respbandsize = resource.respbandsize;
return updateresource.update_resource(client);
... | [
"Use this API to update protocolhttpband."
] | [
"Propagate onMotionOutside events to listeners\n@param MotionEvent Android MotionEvent when nothing is picked",
"Use this API to fetch all the systementitydata resources that are configured on netscaler.\nThis uses systementitydata_args which is a way to provide additional arguments while fetching the resources."... |
public static base_response add(nitro_service client, gslbservice resource) throws Exception {
gslbservice addresource = new gslbservice();
addresource.servicename = resource.servicename;
addresource.cnameentry = resource.cnameentry;
addresource.ip = resource.ip;
addresource.servername = resource.servername;
... | [
"Use this API to add gslbservice."
] | [
"Use this API to fetch all the systemcore resources that are configured on netscaler.",
"Builds the data structures that show the effects of the plan by server group",
"Return a long value from a prepared query.",
"Retrieve a byte array of containing the data starting at the supplied\noffset in the FixDeferFi... |
private List<Object> doQuery(
SharedSessionContractImplementor session,
QueryParameters qp,
OgmLoadingContext ogmLoadingContext,
boolean returnProxies) {
//TODO support lock timeout
int entitySpan = entityPersisters.length;
final List<Object> hydratedObjects = entitySpan == 0 ? null : new ArrayList<O... | [
"Execute the physical query and initialize the various entities and collections\n\n@param session the session\n@param qp the query parameters\n@param ogmLoadingContext the loading context\n@param returnProxies when {@code true}, get an existing proxy for each collection element (if there is one)\n@return the result... | [
"Handles an initial response from a PUT or PATCH operation response by polling the status of the operation\nasynchronously, once the operation finishes emits the final response.\n\n@param observable the initial observable from the PUT or PATCH operation.\n@param resourceType the java.lang.reflect.Type of the resour... |
private Task readTask(ChildTaskContainer parent, Integer id)
{
Table a0 = getTable("A0TAB");
Table a1 = getTable("A1TAB");
Table a2 = getTable("A2TAB");
Table a3 = getTable("A3TAB");
Table a4 = getTable("A4TAB");
Task task = parent.addTask();
MapRow a1Row = a1.find(id);
... | [
"Read data for an individual task from the tables in a PEP file.\n\n@param parent parent task\n@param id task ID\n@return task instance"
] | [
"Converts an object to an XML file.\n\n@param object The object to convert.\n@param fileName The filename where to save it to.\n@throws FileNotFoundException On error.",
"Sets the RegExp pattern for the TextBox\n@param pattern\n@param invalidCharactersInNameErrorMessage",
"This method merges together assignmen... |
private String toPath(String name, IconSize size) {
return CmsStringUtil.joinPaths(CmsWorkplace.getSkinUri(), ICON_FOLDER, "" + name.hashCode()) + size.getSuffix();
} | [
"Transforms user name and icon size into the image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path"
] | [
"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)",
"MOVED INSIDE ExpressionUtils\n\nprotected JRDesignExpression getExpressionForConditionalStyle(ConditionalStyle condition, String columExpression) {\nS... |
public static double blackModelCapletValue(
double forward,
double volatility,
double optionMaturity,
double optionStrike,
double periodLength,
double discountFactor)
{
// May be interpreted as a special version of the Black-Scholes Formula
return AnalyticFormulas.blackScholesGeneralizedOptionVal... | [
"Calculate the value of a caplet assuming the Black'76 model.\n\n@param forward The forward (spot).\n@param volatility The Black'76 volatility.\n@param optionMaturity The option maturity\n@param optionStrike The option strike.\n@param periodLength The period length of the underlying forward rate.\n@param discountFa... | [
"Clear history for a client\n\n@param profileId ID of profile\n@param clientUUID UUID of client",
"Use this API to unset the properties of clusterinstance resource.\nProperties that need to be unset are specified in args array.",
"If the workspace for your project _is_ an organization, you must also\nsupply a `... |
public static <T> T[] sort(T[] self, Comparator<T> comparator) {
return sort(self, true, comparator);
} | [
"Sorts the given array into sorted order using the given comparator.\n\n@param self the array to be sorted\n@param comparator a Comparator used for the comparison\n@return the sorted array\n@since 1.5.5"
] | [
"Returns value as it appeared on the command line with escape sequences\nand system properties not resolved. The variables, though, are resolved\nduring the initial parsing of the command line.\n\n@param parsedLine parsed command line\n@param required whether the argument is required\n@return argument value as i... |
public static String getFlowContext() {
TransactionLogger instance = getInstance();
if (instance == null) {
return null;
}
return instance.flowContext;
} | [
"Get string value of flow context for current instance\n@return string value of flow context"
] | [
"Convert a Planner date-time value into a Java date.\n\n20070222T080000Z\n\n@param value Planner date-time\n@return Java Date instance",
"Send value to node.\n@param nodeId the node Id to send the value to.\n@param endpoint the endpoint to send the value to.\n@param value the value to send",
"Create the time en... |
private void addGroup(List<Token> group, List<List<Token>> groups) {
if(group.isEmpty()) return;
// remove trailing tokens that should be ignored
while(!group.isEmpty() && IGNORED_TRAILING_TOKENS.contains(
group.get(group.size() - 1).getType())) {
group.remove(group.size() - 1);
}
/... | [
"Cleans up the given group and adds it to the list of groups if still valid\n@param group\n@param groups"
] | [
"Heat Equation Boundary Conditions",
"Print work units.\n\n@param value TimeUnit instance\n@return work units value",
"EAP 7.0",
"Return a long value which is the number of rows in the table.",
"Classify the contents of a file.\n\n@param filename\nContains the sentence(s) to be classified.\n@return {@link L... |
public List<MapRow> readUnknownTable(int rowSize, int rowMagicNumber) throws IOException
{
TableReader reader = new UnknownTableReader(this, rowSize, rowMagicNumber);
reader.read();
return reader.getRows();
} | [
"Read a nested table whose contents we don't understand.\n\n@param rowSize fixed row size\n@param rowMagicNumber row magic number\n@return table rows"
] | [
"Called when the end type is changed.",
"Shifts are performed based upon singular values computed previously. If it does not converge\nusing one of those singular values it uses a Wilkinson shift instead.",
"Retrieve all Collection attributes of a given instance, and make all of the Proxy Collections\n\n@param... |
public ItemRequest<Project> removeCustomFieldSetting(String project) {
String path = String.format("/projects/%s/removeCustomFieldSetting", project);
return new ItemRequest<Project>(this, Project.class, path, "POST");
} | [
"Remove a custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object"
] | [
"Set dates with the provided check states.\n@param datesWithCheckInfo the dates to set, accompanied with the check state to set.",
"Compiles and fills the reports design.\n\n@param dr the DynamicReport\n@param layoutManager the object in charge of doing the layout\n@param ds The datasource\n... |
@SuppressWarnings("SameParameterValue")
private byte[] readResponseWithExpectedSize(InputStream is, int size, String description) throws IOException {
byte[] result = receiveBytes(is);
if (result.length != size) {
logger.warn("Expected " + size + " bytes while reading " + description + "... | [
"Receive an expected number of bytes from the player, logging a warning if we get a different number of them.\n\n@param is the input stream associated with the player metadata socket.\n@param size the number of bytes we expect to receive.\n@param description the type of response being processed, for use in the warn... | [
"Set the main attribute \"Bundle-Activator\" to the given value.\n\n@param bundleActivator The new value",
"OR operation which takes 2 arguments and OR's them together.\n\n<p>\n<b>NOTE:</b> There is no guarantee of the order of the clauses that are generated in the final query.\n</p>\n<p>\n<b>NOTE:</b> I can't re... |
@Pure
@Inline(value = "$3.union($1, $2)", imported = MapExtensions.class)
public static <K, V> Map<K, V> operator_plus(Map<K, V> left, Map<? extends K, ? extends V> right) {
return union(left, right);
} | [
"Merge the two maps.\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this operation.\n</p>\n\n<p>\nIf a key exists in the left and right operands, the value in the right operand is preferred.\n</p>\n\n@param <K> type of the map keys.\n@... | [
"Counts the number of elements in A which are true\n@param A input matrix\n@return number of true elements",
"Return a String of length a minimum of totalChars characters by\npadding the input String str at the right end with spaces.\nIf str is already longer\nthan totalChars, it is returned unchanged.",
"Switc... |
public void foreach(PixelFunction fn) {
Arrays.stream(points()).forEach(p -> fn.apply(p.x, p.y, pixel(p)));
} | [
"Executes the given side effecting function on each pixel.\n\n@param fn a function that accepts 3 parameters - the x,y coordinate and the pixel at that coordinate"
] | [
"Closes the JDBC statement and its associated connection.",
"Sets the transformations to be applied to the shape before indexing it.\n\n@param transformations the sequence of transformations\n@return this with the specified sequence of transformations",
"Returns iterable containing assignments for this single l... |
public static base_response unset(nitro_service client, onlinkipv6prefix resource, String[] args) throws Exception{
onlinkipv6prefix unsetresource = new onlinkipv6prefix();
unsetresource.ipv6prefix = resource.ipv6prefix;
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of onlinkipv6prefix resource.\nProperties that need to be unset are specified in args array."
] | [
"Returns all the dependencies of a module\n\n@param module Module\n@return List<Dependency>",
"marks the message as read",
"Configure the mapping between a database column and a field.\n\n@param container column to field map\n@param name column name\n@param type field type",
"Add views to the tree.\n\n@param ... |
private void initialize(Handler callbackHandler) {
int processors = Runtime.getRuntime().availableProcessors();
mDownloadDispatchers = new DownloadDispatcher[processors];
mDelivery = new CallBackDelivery(callbackHandler);
} | [
"Perform construction.\n\n@param callbackHandler"
] | [
"used for encoding url path segment",
"Uncompresses the given textual content and writes it to the given file.\n\n@param file The file to write to\n@param compressedContent The content\n@throws IOException If an error occurred",
"Creates a new DMatrixRMaj around the provided data. The data must en... |
public void addAssertions(Assertions asserts) {
if (getCommandline().getAssertions() != null) {
throw new BuildException("Only one assertion declaration is allowed");
}
getCommandline().setAssertions(asserts);
} | [
"Add assertions to tests execution."
] | [
"Use this API to fetch nd6ravariables resources of given names .",
"Maps all views that don't start with \"android\" namespace.\n\n@param names All shared element names.\n@return The obsolete shared element names.",
"Performs a single synchronization pass in both the local and remote directions; the order\nof w... |
public void postProcess() {
if (foreignColumnName != null) {
foreignAutoRefresh = true;
}
if (foreignAutoRefresh && maxForeignAutoRefreshLevel == NO_MAX_FOREIGN_AUTO_REFRESH_LEVEL_SPECIFIED) {
maxForeignAutoRefreshLevel = DatabaseField.DEFAULT_MAX_FOREIGN_AUTO_REFRESH_LEVEL;
}
} | [
"Process the settings when we are going to consume them."
] | [
"Internal utility to dump relationship lists in a structured format\nthat can easily be compared with the tabular data in MS Project.\n\n@param relations relation list",
"This method processes any extended attributes associated with a task.\n\n@param xml MSPDI task instance\n@param mpx MPX task instance",
"Incr... |
public Set<D> getMatchedDeclaration() {
Set<D> bindedSet = new HashSet<D>();
for (Map.Entry<ServiceReference<D>, Boolean> e : declarations.entrySet()) {
if (e.getValue()) {
bindedSet.add(getDeclaration(e.getKey()));
}
}
return bindedSet;
} | [
"Return a set of all the Declaration matching the DeclarationFilter of the.\nLinker.\n\n@return a set of all the Declaration matching the DeclarationFilter of the\nLinker."
] | [
"Remember execution time for all executed suites.",
"Make a comparison where the operator is specified by the caller. It is up to the caller to specify an appropriate\noperator for the database and that it be formatted correctly.",
"Save a SVG graphic to the given path.\n\n@param graphics2d The SVG graphic to s... |
public void generateReport(List<XmlSuite> xmlSuites,
List<ISuite> suites,
String outputDirectoryName)
{
removeEmptyDirectories(new File(outputDirectoryName));
boolean useFrames = System.getProperty(FRAMES_PROPERTY, "true").equals... | [
"Generates a set of HTML files that contain data about the outcome of\nthe specified test suites.\n@param suites Data about the test runs.\n@param outputDirectoryName The directory in which to create the report."
] | [
"Get the number of views, comments and favorites on a collection for a given date.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param collectionId\n... |
public static void count() {
long duration = SystemClock.uptimeMillis() - startTime;
float avgFPS = sumFrames / (duration / 1000f);
Log.v("FPSCounter",
"total frames = %d, total elapsed time = %d ms, average fps = %f",
sumFrames, duration, avgFPS);
} | [
"Computes FPS average"
] | [
"Adds a new row after the given one.\n\n@param row the row after which a new one should be added",
"Sinc function.\n\n@param x Value.\n@return Sinc of the value.",
"Reads a single byte from the input stream.",
"Parses int value and returns the provided default if the value can't be parsed.\n@param value the i... |
public ArrayList<IntPoint> process(ImageSource fastBitmap) {
//FastBitmap l = new FastBitmap(fastBitmap);
if (points == null) {
apply(fastBitmap);
}
int width = fastBitmap.getWidth();
int height = fastBitmap.getHeight();
points = new ArrayList<IntPoin... | [
"Get points after extract boundary.\n\n@param fastBitmap Image to be processed.\n@return List of points."
] | [
"Read a single duration field extended attribute.\n\n@param row field data",
"This is generally only useful for extensions that delegate some of their functionality to other \"internal\"\nextensions of their own that they need to configure.\n\n@param configuration the configuration to be supplied with the returne... |
public Class<? extends MonetaryAmount> getAmountType() {
Class<?> clazz = get(AMOUNT_TYPE, Class.class);
return clazz.asSubclass(MonetaryAmount.class);
} | [
"Get the MonetaryAmount implementation class.\n\n@return the implementation class of the containing amount instance, never null.\n@see MonetaryAmount#getContext()"
] | [
"Do synchronization of the given J2EE ODMG Transaction",
"Transforms user name and icon size into the rfs image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path",
"Copied from AbstractEntityPersister",
"host.xml",
"Process the graphical indicator data.",
"The se... |
protected String sendRequestToDF(String df_service, Object msgContent) {
IDFComponentDescription[] receivers = getReceivers(df_service);
if (receivers.length > 0) {
IMessageEvent mevent = createMessageEvent("send_request");
mevent.getParameter(SFipa.CONTENT).setValue(msgContent)... | [
"Method to send Request messages to a specific df_service\n\n@param df_service\nThe name of the df_service\n@param msgContent\nThe content of the message to be sent\n@return Message sent to + the name of the df_service"
] | [
"Retrieve the \"complete through\" date.\n\n@return complete through date",
"Determine whether the given element matches this element.\nAn element matches this element when keys are equal, values are equal\nor this element value is a wildcard.\n@param pe the element to check\n@return {@code true} if the element m... |
private Project.Tasks.Task.PredecessorLink writePredecessor(Integer taskID, RelationType type, Duration lag)
{
Project.Tasks.Task.PredecessorLink link = m_factory.createProjectTasksTaskPredecessorLink();
link.setPredecessorUID(NumberHelper.getBigInteger(taskID));
link.setType(BigInteger.valueOf(ty... | [
"This method writes a single predecessor link to the MSPDI file.\n\n@param taskID The task UID\n@param type The predecessor type\n@param lag The lag duration\n@return A new link to be added to the MSPDI file"
] | [
"Reverse Engineers an XPath Expression of a given Node in the DOM.\n\n@param node the given node.\n@return string xpath expression (e.g., \"/html[1]/body[1]/div[3]\").",
"Helper. Current transaction is committed in some cases.",
"Helper to read an optional Integer value.\n@param path The XML path of the element... |
@Override
public void registerChildren(ManagementResourceRegistration resourceRegistration) {
// Register wildcard children last to prevent duplicate registration errors when override definitions exist
for (ResourceDefinition rd : singletonChildren) {
resourceRegistration.registerSubMode... | [
"Register child resources associated with this resource.\n\n@param resourceRegistration a {@link org.jboss.as.controller.registry.ManagementResourceRegistration} created from this definition"
] | [
"Creates a span that covers an exact row",
"Provides a ready to use diff update for our adapter based on the implementation of the\nstandard equals method from Object.\n\n@param newList to refresh our content",
"Read a task relationship.\n\n@param link ConceptDraw PROJECT task link",
"Handle slop for nodes th... |
private static double threePointsAngle(Point vertex, Point A, Point B) {
double b = pointsDistance(vertex, A);
double c = pointsDistance(A, B);
double a = pointsDistance(B, vertex);
return Math.toDegrees(Math.acos((a * a + b * b - c * c) / (2 * a * b)));
} | [
"calculate the point a's angle of rectangle consist of point a,point b, point c;\n\n@param vertex\n@param A\n@param B\n@return"
] | [
"Write a map field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Use this API to fetch policydataset_value_binding resources of given name .",
"Sets the fieldConversion.\n@param fieldConversionClassName The fieldConversion to set",
"The Cost Variance field shows the difference ... |
public void addDependency(final Dependency dependency) {
if(dependency != null && !dependencies.contains(dependency)){
this.dependencies.add(dependency);
}
} | [
"Add a dependency to the module.\n\n@param dependency Dependency"
] | [
"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",
"Returns a lazily generated map from site paths of resources to the avail... |
public Profile findProfile(int profileId) throws Exception {
Profile profile = null;
PreparedStatement statement = null;
ResultSet results = null;
try (Connection sqlConnection = sqlService.getConnection()) {
statement = sqlConnection.prepareStatement(
"SELEC... | [
"Returns a specific profile\n\n@param profileId ID of profile\n@return Selected profile if found, null if not found\n@throws Exception exception"
] | [
"except for the ones that make the content appear under the system bars.",
"Ask the specified player for the specified waveform preview from the specified media slot, first checking if we\nhave a cached copy.\n\n@param dataReference uniquely identifies the desired waveform preview\n\n@return the preview, if it wa... |
public static BoxConfig readFrom(Reader reader) throws IOException {
JsonObject config = JsonObject.readFrom(reader);
JsonObject settings = (JsonObject) config.get("boxAppSettings");
String clientId = settings.get("clientID").asString();
String clientSecret = settings.get("clientSecret")... | [
"Reads OAuth 2.0 with JWT app configurations from the reader. The file should be in JSON format.\n\n@param reader a reader object which points to a JSON formatted configuration file\n@return a new Instance of BoxConfig\n@throws IOException when unable to access the mapping file's content of the reader"
] | [
"Escape text to ensure valid JSON.\n\n@param value value\n@return escaped value",
"Return the \"common\" configuration set name. By default it is \"common\"\n@return the \"common\" conf set name",
"Opens a JDBC connection with the given parameters.",
"Bulk delete clients from a profile.\n\n@param model\n@para... |
public static boolean isSpreadSafe(Expression expression) {
if (expression instanceof MethodCallExpression) {
return ((MethodCallExpression) expression).isSpreadSafe();
}
if (expression instanceof PropertyExpression) {
return ((PropertyExpression) expression).isSprea... | [
"Tells you if the expression is a spread operator call\n@param expression\nexpression\n@return\ntrue if is spread expression"
] | [
"In case we cannot delete a directory create a marker to recheck whether we can garbage collect some not\nreferenced directories and files.\n\n@param file the directory",
"Returns the approximate size of slop to help in throttling\n\n@param slopVersioned The versioned slop whose size we want\n@return Size in byte... |
private void ensureNoTableInfoIfNoRepositoryInfo(ClassDescriptorDef classDef, String checkLevel)
{
if (!classDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_GENERATE_REPOSITORY_INFO, true))
{
classDef.setProperty(PropertyHelper.OJB_PROPERTY_GENERATE_TABLE_INFO, "false");
... | [
"Ensures that generate-table-info is set to false if generate-repository-info is set to false.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)"
] | [
"Returns the name from the inverse side if the given property de-notes a one-to-one association.",
"Little helper function that recursivly deletes a directory.\n\n@param dir The directory",
"Answer the TableAlias for aPath or aUserAlias\n@param aPath\n@param aUserAlias\n@param hintClasses\n@return TableAlias, n... |
@Inline(value = "$1.remove($2)", statementExpression = true)
public static <K, V> V operator_remove(Map<K, V> map, K key) {
return map.remove(key);
} | [
"Remove a key from the given map.\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param key the key to remove.\n@return the removed value, or <code>null</code> if the key was not\npresent in the map.\n@since 2.15"
] | [
"Determines whether or not a given feature matches this pattern.\n\n@param feature\nSpecified feature to examine.\n\n@return Flag confirming whether or not this feature is inside the filter.",
"Configure a selector to choose documents that should be added to the index.",
"Builds a batch-fetch capable loader bas... |
public void localRollback()
{
log.info("Rollback was called, do rollback on current connection " + con);
if (!this.isInLocalTransaction)
{
throw new PersistenceBrokerException("Not in transaction, cannot abort");
}
try
{
//truncate the... | [
"Call rollback on the underlying connection."
] | [
"Process an individual UDF.\n\n@param udf UDF definition",
"Checks that the targetClass is widening the argument class\n\n@param argumentClass\n@param targetClass\n@return",
"Returns the default table name for this class which is the unqualified class name.\n\n@return The default table name",
"Deletes a templ... |
public Date toDate(Object date) {
Date d = null;
if (null != date) {
if (date instanceof Date) {
d = (Date)date;
} else if (date instanceof Long) {
d = new Date(((Long)date).longValue());
} else {
try {
... | [
"Converts the provided object to a date, if possible.\n\n@param date the date.\n\n@return the date as {@link java.util.Date}"
] | [
"Retrieve the value from the REST request body.\n\nTODO: REST-Server value cannot be null ( null/empty string ?)",
"Returns whether this address section represents a subnet block of addresses associated its prefix length.\n\nReturns false if it has no prefix length, if it is a single address with a prefix length ... |
public static void append(File file, Object text, String charset) throws IOException {
Writer writer = null;
try {
FileOutputStream out = new FileOutputStream(file, true);
if (!file.exists()) {
writeUTF16BomIfRequired(charset, out);
}
write... | [
"Append the text at the end of the File, using a specified encoding.\n\n@param file a File\n@param text the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0"
] | [
"Use this API to update nsconfig.",
"Resamples a trajectory\n@param t Trajectory to resample\n@param n Resample rate\n@return Returns a resampled trajectory which contains every n'th position of t",
"sets the initialization method for this descriptor",
"Compare two integers, accounting for null values.\n\n@pa... |
private void
executeSubBatch(final int batchId,
RebalanceBatchPlanProgressBar progressBar,
final Cluster batchRollbackCluster,
final List<StoreDefinition> batchRollbackStoreDefs,
final List<Rebala... | [
"The smallest granularity of rebalancing where-in we move partitions for a\nsub-set of stores. Finally at the end of the movement, the node is\nremoved out of rebalance state\n\n<br>\n\nAlso any errors + rollback procedures are performed at this level itself.\n\n<pre>\n| Case | hasRO | hasRW | finishedRO | Action |... | [
"JSObject will return the String \"undefined\" at certain times, so we\nneed to make sure we're not getting a value that looks valid, but isn't.\n\n@param val The value from Javascript to be checked.\n@return Either null or the value passed in.",
"directive dynamic xxx,yy\n@param node\n@return",
"Finds all vari... |
public String getUrl(){
final StringBuilder sb = new StringBuilder();
sb.append("http://");
sb.append(getHttpConfiguration().getBindHost().get());
sb.append(":");
sb.append(getHttpConfiguration().getPort());
return sb.toString();
} | [
"Returns the complete Grapes root URL\n\n@return String"
] | [
"Sorts the entries into the order we want to present them in, which is by position, with hot cues coming after\nordinary memory points if both exist at the same position, which often happens.\n\n@param loadedEntries the unsorted entries we have loaded from a dbserver message, metadata cache, or rekordbox\ndatabase ... |
private static XMLStreamException unexpectedAttribute(final XMLStreamReader reader, final int index) {
return SecurityManagerLogger.ROOT_LOGGER.unexpectedAttribute(reader.getAttributeName(index), reader.getLocation());
} | [
"Gets an exception reporting an unexpected XML attribute.\n\n@param reader a reference to the stream reader.\n@param index the attribute index.\n@return the constructed {@link javax.xml.stream.XMLStreamException}."
] | [
"If credentials are incorrect or not provided for Basic Auth, then Android\nmay throw this exception when an HTTP 401 is received. A separate exception\nis thrown for proxy authentication errors. Checking for this response and\nreturning the proper status.\n@param ex the exception raised from Android\n@return HTTP ... |
public static void columnMaxAbs( DMatrixSparseCSC A , double []values ) {
if( values.length < A.numCols )
throw new IllegalArgumentException("Array is too small. "+values.length+" < "+A.numCols);
for (int i = 0; i < A.numCols; i++) {
int idx0 = A.col_idx[i];
int idx1... | [
"Finds the maximum abs in each column of A and stores it into values\n@param A (Input) Matrix\n@param values (Output) storage for column max abs"
] | [
"Decode a content Type header line into types and parameters pairs",
"Notification that a connection was closed.\n\n@param closed the closed connection",
"Create and register the declaration of class D with the given metadata.\n\n@param metadata the metadata to create the declaration\n@return the created declar... |
public static double getFloatingPointDateFromDate(LocalDateTime referenceDate, LocalDateTime date) {
Duration duration = Duration.between(referenceDate, date);
return ((double)duration.getSeconds()) / SECONDS_PER_DAY;
} | [
"Convert a given date to a floating point date using a given reference date.\n\n@param referenceDate The reference date associated with \\( t=0 \\).\n@param date The given date to be associated with the return value \\( T \\).\n@return The value T measuring the distance of reference date and date by ACT/365 with SE... | [
"Reopen the associated static logging stream. Set to null to redirect to System.out.",
"Get the target file for misc items.\n\n@param item the misc item\n@return the target location",
"Before closing the PersistenceBroker ensure that the session\ncache is cleared",
"Adds OPT_P | OPT_PARTITION option to Option... |
public void clear() {
if (arrMask != null) {
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
arrMask[x][y] = false;
}
}
}
} | [
"Clear the mask for a new selection"
] | [
"Create a Vendor from a Callable",
"Adds a metadata classification to the specified file.\n\n@param classificationType the metadata classification type.\n@return the metadata classification type added to the file.",
"Inserts a CharSequence array value into the mapping of the underlying Bundle, replacing any\nex... |
public <T> List<T> query(String query, Class<T> classOfT) {
InputStream instream = null;
List<T> result = new ArrayList<T>();
try {
Reader reader = new InputStreamReader(instream = queryForStream(query), "UTF-8");
JsonObject json = new JsonParser().parse(reader).getA... | [
"Queries a Search Index and returns ungrouped results. In case the query\nused grouping, an empty list is returned\n\n@param <T> Object type T\n@param query the Lucene query to be passed to the Search index\n@param classOfT The class of type T\n@return The result of the search query as a {@code List<T> }"
] | [
"Use this API to update tmtrafficaction resources.",
"Groups all of the metadata cache files that are candidates for auto-attachment to player slots into lists\nthat are keyed by the playlist ID used to create the cache file. Files that cache all tracks have a playlist\nID of 0.\n\n@return a map from playlist ID ... |
public static boolean changeHost(String hostName,
boolean enable,
boolean disable,
boolean remove,
boolean isEnabled,
boolean exists) t... | [
"Only one boolean param should be true at a time for this function to return the proper results\n\n@param hostName\n@param enable\n@param disable\n@param remove\n@param isEnabled\n@param exists\n@return\n@throws Exception"
] | [
"Handle a \"current till end\" change event.\n@param event the change event.",
"Check if the gravity and orientation are not in conflict one with other.\n@param gravity\n@param orientation\n@return true if orientation and gravity can be applied together, false - otherwise",
"Update the project properties from t... |
public final void setValue(String value) {
if ((null == value) || value.isEmpty()) {
setDefaultValue();
} else {
try {
tryToSetParsedValue(value);
} catch (@SuppressWarnings("unused") Exception e) {
CmsDebugLog.consoleLog("Could not se... | [
"Set the value as provided.\n@param value the serial date value as JSON string."
] | [
"Use this API to fetch the statistics of all service_stats resources that are configured on netscaler.",
"Constructs a triangule Face from vertices v0, v1, and v2.\n\n@param v0\nfirst vertex\n@param v1\nsecond vertex\n@param v2\nthird vertex",
"Select item by it's position\n\n@param position int value of... |
public final synchronized void shutdown() { // synchronize on 'this' to avoid races with registerStreams
stopped = true;
// If the cleanup task is running tell it to stop looping, and then remove it from the scheduled executor
if (cleanupTaskFuture != null) {
cleanupTaskFuture.cance... | [
"Closes any registered stream entries that have not yet been consumed"
] | [
"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... |
public static int[] arrayFromStringOfIntegers(String str) throws IllegalArgumentException {
StringTokenizer tokenizer = new StringTokenizer(str, ",");
int n = tokenizer.countTokens();
int[] list = new int[n];
for (int i = 0; i < n; i++) {
String token = tokenizer.nextToken();... | [
"Split string of comma-delimited ints into an a int array\n\n@param str\n@return\n@throws IllegalArgumentException"
] | [
"Returns a list of files in given addon passing given filter.",
"Joins the given ranges into the fewest number of ranges.\nIf no joining can take place, the original array is returned.\n\n@param ranges\n@return",
"Use this API to fetch filterpolicy_binding resource of given name .",
"Create the metadata which... |
public PhotoList<Photo> getPopularPhotos(Date date, StatsSort sort, int perPage, int page) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_POPULAR_PHOTOS);
if (date != null) {
parameters.put("date", String.... | [
"List the photos with the most views, comments or favorites.\n\n@param date\n(Optional) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day. If no date is provided, all time view counts... | [
"Resolve a resource transformer for a given address.\n\n@param address the address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the resource transformer",
"Decompiles a single type.\n\n@param metadataSystem\n@param typeName\n@return\n@throws IO... |
public static double Magnitude(ComplexNumber z) {
return Math.sqrt(z.real * z.real + z.imaginary * z.imaginary);
} | [
"Magnitude of complex number.\n\n@param z Complex number.\n@return Magnitude of complex number."
] | [
"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.",
"Waits until all pending operations are complete and closes this repository.\n\n@param failureCauseSupplier the {@link Supplier} that create... |
public static void main(String[] args) throws IOException {
ExampleHelpers.configureLogging();
JsonSerializationProcessor.printDocumentation();
JsonSerializationProcessor jsonSerializationProcessor = new JsonSerializationProcessor();
ExampleHelpers.processEntitiesFromWikidataDump(jsonSerializationProcessor);
... | [
"Runs the example program.\n\n@param args\n@throws IOException\nif there was a problem in writing the output file"
] | [
"This will blur the view behind it and set it in\na imageview over the content with a alpha value\nthat corresponds to slideOffset.",
"Gets the value of the resourceRequestCriterion property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to... |
public boolean evaluate(Object feature) {
// Checks to ensure that the attribute has been set
if (attribute == null) {
return false;
}
// Note that this converts the attribute to a string
// for comparison. Unlike the math or geometry filters, which
// require specific types to function correctly, this f... | [
"Determines whether or not a given feature matches this pattern.\n\n@param feature\nSpecified feature to examine.\n\n@return Flag confirming whether or not this feature is inside the filter."
] | [
"Adds a directory to the collection of module paths.\n\n@param moduleDir the module directory to add\n\n@throws java.lang.IllegalArgumentException if the path is {@code null}",
"Read an optional int value form a JSON value.\n@param val the JSON value that should represent the int.\n@return the int from the JSON o... |
public static server_service_binding[] get(nitro_service service, String name) throws Exception{
server_service_binding obj = new server_service_binding();
obj.set_name(name);
server_service_binding response[] = (server_service_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch server_service_binding resources of given name ."
] | [
"Return true if the two connections seem to one one connection under the covers.",
"compares two java files",
"These exact lines are shared between three different tools, so\nthey have been moved here to reduce code duplication.\n@return The parsed command-line, with options removed.",
"Unregister the mbean w... |
public T transitFloat(int propertyId, float... vals) {
String property = getPropertyName(propertyId);
mHolders.put(propertyId, PropertyValuesHolder.ofFloat(property, vals));
mShadowHolders.put(propertyId, ShadowValuesHolder.ofFloat(property, vals));
return self();
} | [
"Transits a float propertyId from the start value to the end value.\n\n@param propertyId\n@param vals\n@return self"
] | [
"Print a class's relations",
"Chooses a single segment to be compressed, or null if no segment could be chosen.\n@param options\n@param createMixed\n@return",
"Gets the Correlation distance between two points.\n\n@param p A point in space.\n@param q A point in space.\n@return The Correlation distance between x ... |
public <T> T cached(String key) {
H.Session sess = session();
if (null != sess) {
return sess.cached(key);
} else {
return app().cache().get(key);
}
} | [
"Return cached object by key. The key will be concatenated with\ncurrent session id when fetching the cached object\n\n@param key\n@param <T>\nthe object type\n@return the cached object"
] | [
"binds the objects primary key and locking values to the statement, BRJ",
"Processes the template for all index descriptors of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\n@doc.t... |
public SpinJsonDataFormatException unableToParseValue(String expectedType, JsonNodeType type) {
return new SpinJsonDataFormatException(exceptionMessage("002", "Expected '{}', got '{}'", expectedType, type.toString()));
} | [
"Exception handler if we are unable to parse a json value into a java representation\n\n@param expectedType Name of the expected Type\n@param type Type of the json node\n@return SpinJsonDataFormatException"
] | [
"Pause component timer for current instance\n@param type - of component",
"Await a state.\n\n@param expected the expected state\n@return {@code true} if the state was reached, {@code false} otherwise",
"Add authentication information for the given host\n@param host the host\n@param credentials the credentials\n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.