query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
public static BoxUser.Info createEnterpriseUser(BoxAPIConnection api, String login, String name,
CreateUserParams params) {
JsonObject requestJSON = new JsonObject();
requestJSON.add("login", login);
requestJSON.add("name", name);
if (params != null) {
if (params.ge... | [
"Provisions a new user in an enterprise with additional user information.\n@param api the API connection to be used by the created user.\n@param login the email address the user will use to login.\n@param name the name of the user.\n@param params additional user information.\n@return the created us... | [
"Converts a parameter map to the parameter string.\n@param parameters the parameter map.\n@return the parameter string.",
"Generate random velocities for every particle. The direction is obtained by assuming\nthe position of a particle as a vector. This normalised vector is scaled by\nthe speed range.\n\n@return"... |
public static BoxStoragePolicyAssignment.Info create(BoxAPIConnection api, String policyID, String userID) {
URL url = STORAGE_POLICY_ASSIGNMENT_URL_TEMPLATE.build(api.getBaseURL());
BoxJSONRequest request = new BoxJSONRequest(api, url, HttpMethod.POST);
JsonObject requestJSON = new JsonObject()... | [
"Create a BoxStoragePolicyAssignment for a BoxStoragePolicy.\n@param api the API connection to be used by the resource.\n@param policyID the policy ID of the BoxStoragePolicy.\n@param userID the user ID of the to assign the BoxStoragePolicy to.\n@return the informa... | [
"Puts the cached security context in the thread local.\n\n@param context the cache context",
"Override this method to supply a custom splash screen image.\n\n@param gvrContext\nThe new {@link GVRContext}\n@return Texture to display\n\n@since 1.6.4",
"Creates a server setup based on provided properties.\n\n@para... |
public final void unregisterView(final View view) {
mActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
if (null != mRenderableViewGroup && view.getParent() == mRenderableViewGroup) {
mRenderableViewGroup.removeView(view);
... | [
"Remove a child view of Android hierarchy view .\n\n@param view View to be removed."
] | [
"Retrieves the default calendar for this project based on the calendar name\ngiven in the project properties. If a calendar of this name cannot be found, then\nthe first calendar listed for the project will be returned. If the\nproject contains no calendars, then a default calendar is added.\n\n@return default proj... |
public static auditsyslogpolicy_aaauser_binding[] get(nitro_service service, String name) throws Exception{
auditsyslogpolicy_aaauser_binding obj = new auditsyslogpolicy_aaauser_binding();
obj.set_name(name);
auditsyslogpolicy_aaauser_binding response[] = (auditsyslogpolicy_aaauser_binding[]) obj.get_resources(se... | [
"Use this API to fetch auditsyslogpolicy_aaauser_binding resources of given name ."
] | [
"Multiplies all positions with a factor v\n@param v Multiplication factor",
"Retrieves the real subject from the underlying RDBMS. Override this\nmethod if the object is to be materialized in a specific way.\n\n@return The real subject of the proxy",
"Shows the given step.\n\n@param step the step",
"Distribut... |
public void await() {
boolean intr = false;
final Object lock = this.lock;
try {
synchronized (lock) {
while (! readClosed) {
try {
lock.wait();
} catch (InterruptedException e) {
... | [
"Wait for the read side to close. Used when the writer needs to know when\nthe reader finishes consuming a message."
] | [
"Update artifact provider\n\n@param gavc String\n@param provider String",
"Find the path.\n\n@param start key of first node in the path\n@param end key of last node in the path\n@return string containing the nodes keys in the path separated by arrow symbol",
"Load the given class using the default constructor\n... |
public Where<T, ID> raw(String rawStatement, ArgumentHolder... args) {
for (ArgumentHolder arg : args) {
String columnName = arg.getColumnName();
if (columnName == null) {
if (arg.getSqlType() == null) {
throw new IllegalArgumentException("Either the column name or SqlType must be set on each argument"... | [
"Add a raw statement as part of the where that can be anything that the database supports. Using more structured\nmethods is recommended but this gives more control over the query and allows you to utilize database specific\nfeatures.\n\n@param rawStatement\nThe statement that we should insert into the WHERE.\n\n@p... | [
"Delete the partition steal information from the rebalancer state\n\n@param stealInfo The steal information to delete",
"We have received notification that a device is no longer on the network, so clear out all its beat grids.\n\n@param announcement the packet which reported the device’s disappearance",
"Log un... |
private double goldenMean(double a, double b) {
if (geometric) {
return a * Math.pow(b / a, GOLDEN_SECTION);
} else {
return a + (b - a) * GOLDEN_SECTION;
}
} | [
"The point that is the GOLDEN_SECTION along the way from a to b.\na may be less or greater than b, you find the point 60-odd percent\nof the way from a to b.\n\n@param a Interval minimum\n@param b Interval maximum\n@return The GOLDEN_SECTION along the way from a to b."
] | [
"Use this API to add inat.",
"Samples a batch of indices in the range [0, numExamples) with replacement.",
"Generates a Map of query parameters for Module regarding the filters\n\n@return Map<String, Object>",
"Gets a tokenizer from a reader.",
"Get the spin scripting environment\n\n@param language the lang... |
public DiscreteInterval plus(DiscreteInterval other) {
return new DiscreteInterval(this.min + other.min, this.max + other.max);
} | [
"Returns an interval representing the addition of the\ngiven interval with this one.\n@param other interval to add to this one\n@return interval sum"
] | [
"Create a HashSet with the given initial values.\n\n@param values The values\n@param <T> The type.",
"Use this API to add responderpolicy.",
"Creates an encryptor for queryable text strings that uses standard password-based encryption. Uses a shared, or\nconstant 16 byte initialization vector so encrypting the ... |
private void processProjectID()
{
if (m_projectID == null)
{
List<Row> rows = getRows("project", null, null);
if (!rows.isEmpty())
{
Row row = rows.get(0);
m_projectID = row.getInteger("proj_id");
}
}
} | [
"If the user has not specified a project ID, this method\nretrieves the ID of the first project in the file."
] | [
"Use this API to add sslaction resources.",
"Use this API to fetch tunneltrafficpolicy resource of given name .",
"Prints associations recovered from the fields of a class. An association is inferred only\nif another relation between the two classes is not already in the graph.\n@param classes",
"Retrieve a n... |
private void checkOrMarkPrivateAccess(Expression source, MethodNode mn) {
if (mn==null) {
return;
}
ClassNode declaringClass = mn.getDeclaringClass();
ClassNode enclosingClassNode = typeCheckingContext.getEnclosingClassNode();
if (declaringClass != enclosingClassNode ... | [
"Given a method node, checks if we are calling a private method from an inner class."
] | [
"Create a MfClientHttpRequestFactory for adding the specified headers.\n\n@param requestFactory the basic request factory. It should be unmodified and just wrapped with\na proxy class.\n@param matchers The matchers.\n@param headers The headers.\n@return",
"This method is called to format a constraint type.\n\n@p... |
public static String formatConnectionEstablishmentMessage(final String connectionName, final String host, final String connectionReason) {
return CON_ESTABLISHMENT_FORMAT.format(new Object[] { connectionName, host, connectionReason });
} | [
"Helper method for formatting connection establishment messages.\n\n@param connectionName\nThe name of the connection\n@param host\nThe remote host\n@param connectionReason\nThe reason for establishing the connection\n@return A formatted message in the format:\n\"[<connectionName>] remote host[<host>] &... | [
"Selects the specified value in the list.\n\n@param value the new value\n@param fireEvents if true, a ValueChangeEvent event will be fired\n@see #setAddMissingValue",
"Computes the rank of a matrix using the specified tolerance.\n\n@param A Matrix whose rank is to be calculated. Not modified.\n@param threshold T... |
public static ServiceActivator create(final ModelNode endpointConfig, final URI managementURI, final String serverName, final String serverProcessName,
final String authKey, final boolean managementSubsystemEndpoint, final Supplier<SSLContext> sslContextSupplier) {
ret... | [
"Create a new service activator for the domain server communication services.\n\n@param endpointConfig the endpoint configuration\n@param managementURI the management connection URI\n@param serverName the server name\n@param serverProcessName the server process name\n@param authKey the authentication key\n@param ma... | [
"Use this API to update vserver.",
"Request a scoped transactional token.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@return a BoxAPIConnection which can be used to perform transactional requests.",
"Sets the specified date attribute to the specified value.\n\n@pa... |
static void doDifference(
Map<String, String> left,
Map<String, String> right,
Map<String, String> onlyOnLeft,
Map<String, String> onlyOnRight,
Map<String, String> updated
) {
onlyOnRight.clear();
onlyOnRight.putAll(right);
for (Map... | [
"calculate the difference of the two maps, so we know what was added, removed & updated\n@param left\n@param right\n@param onlyOnLeft\n@param onlyOnRight\n@param updated"
] | [
"convenience method for setting working or non-working days.\n\n@param day required day\n@param working flag indicating if the day is a working day",
"Prepares the CmsObject for jumping to this favorite location, and returns the appropriate URL.\n\n@param cms the CmsObject to initialize for jumping to the favorit... |
private static long createLongSeed(byte[] seed)
{
if (seed == null || seed.length != SEED_SIZE_BYTES)
{
throw new IllegalArgumentException("Java RNG requires a 64-bit (8-byte) seed.");
}
return BinaryUtils.convertBytesToLong(seed, 0);
} | [
"Helper method to convert seed bytes into the long value required by the\nsuper class."
] | [
"Creates a searchable item that represents a metadata field found for a track.\n\n@param menuItem the rendered menu item containing the searchable metadata field\n@return the searchable metadata field",
"Gets the persistence broker used by this indirection handler.\nIf no PBKey is available a runtime exception wi... |
public static systemcollectionparam get(nitro_service service) throws Exception{
systemcollectionparam obj = new systemcollectionparam();
systemcollectionparam[] response = (systemcollectionparam[])obj.get_resources(service);
return response[0];
} | [
"Use this API to fetch all the systemcollectionparam resources that are configured on netscaler."
] | [
"Feeds input stream to data consumer using metadata from tar entry.\n@param consumer the consumer\n@param inputStream the stream to feed\n@param entry the entry to use for metadata\n@throws IOException on consume error",
"Compiles the allowable actions for a file or folder.\n\n@param cms the current CMS context\n... |
private static void listResources(ProjectFile file)
{
for (Resource resource : file.getResources())
{
System.out.println("Resource: " + resource.getName() + " (Unique ID=" + resource.getUniqueID() + ") Start=" + resource.getStart() + " Finish=" + resource.getFinish());
}
System.out.p... | [
"This method lists all resources defined in the file.\n\n@param file MPX file"
] | [
"Use this API to delete snmpmanager.",
"Query zipcode from Yahoo to find associated WOEID",
"Ensures that the given collection descriptor has the collection-class property if necessary.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic... |
@NonNull
@Override
public File getParent(@NonNull final File from) {
if (from.getPath().equals(getRoot().getPath())) {
// Already at root, we can't go higher
return from;
} else if (from.getParentFile() != null) {
return from.getParentFile();
} else {
... | [
"Return the path to the parent directory. Should return the root if\nfrom is root.\n\n@param from either a file or directory\n@return the parent directory"
] | [
"Read an individual GanttProject resource assignment.\n\n@param gpAllocation GanttProject resource assignment.",
"Sets the value of the given variable\n\n@param name the name of the variable to set\n@param value the new value for the given variable",
"Deletes the metadata on this folder associated with a speci... |
public static final Integer getInteger(Number value)
{
Integer result = null;
if (value != null)
{
if (value instanceof Integer)
{
result = (Integer) value;
}
else
{
result = Integer.valueOf((int) Math.round(value.doubleValue()));... | [
"Utility method used to convert an arbitrary Number into an Integer.\n\n@param value Number instance\n@return Integer instance"
] | [
"Calculate the signature by which we can reliably recognize a loaded track.\n\n@param title the track title\n@param artist the track artist, or {@code null} if there is no artist\n@param duration the duration of the track in seconds\n@param waveformDetail the monochrome waveform detail of the track\n@param beatGrid... |
public void replaceItem(@NonNull final T oldObject, @NonNull final T newObject) {
synchronized (mLock) {
final int position = getPosition(oldObject);
if (position == -1) {
// not found, don't replace
return;
}
mObjects.remove(posit... | [
"replaces the old with the new item. The new item will not be added when the old one is not\nfound.\n\n@param oldObject will be removed\n@param newObject is added only when hte old item is removed"
] | [
"Recursively loads the metadata for this node",
"Translate the string to bytes using the given encoding\n\n@param string The string to translate\n@param encoding The encoding to use\n@return The bytes that make up the string",
"Adds new holes to the polygon.\n\n@param holes holes, must be contained in the exter... |
@Override
public void start(String[] arguments) {
boolean notStarted = !started.getAndSet(true);
if (notStarted) {
start(new SingleInstanceWorkloadStrategy(job, name, arguments, endpointRegistry, execService));
}
} | [
"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}"
] | [
"Print the class's operations m",
"Load the installation state based on the identity\n\n@param installedIdentity the installed identity\n@return the installation state\n@throws IOException",
"Check if the the nodeId is present in the cluster managed by the metadata store\nor throw an exception.\n\n@param nodeId... |
@Nullable
public final Credentials toCredentials(final AuthScope authscope) {
try {
if (!matches(MatchInfo.fromAuthScope(authscope))) {
return null;
}
} catch (UnknownHostException | MalformedURLException | SocketException e) {
throw new RuntimeEx... | [
"Check if this applies to the provided authorization scope and return the credentials for that scope or\nnull if it doesn't apply to the scope.\n\n@param authscope the scope to test against."
] | [
"Obtains a local date in Ethiopic calendar system from the\nera, year-of-era, month-of-year and day-of-month fields.\n\n@param era the Ethiopic era, not null\n@param yearOfEra the year-of-era\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Ethiopic local date, not null\n@throws ... |
public int getCurrentMethodOrdinal(int overrideId, int pathId, String clientUUID, String[] filters) throws Exception {
int currentOrdinal = 0;
List<EnabledEndpoint> enabledEndpoints = getEnabledEndpoints(pathId, clientUUID, filters);
for (EnabledEndpoint enabledEndpoint : enabledEndpoints) {
... | [
"Get the ordinal value for the last of a particular override on a path\n\n@param overrideId Id of the override to check\n@param pathId Path the override is on\n@param clientUUID UUID of the client\n@param filters If supplied, only endpoints ending with values in filters are returned\n@return The integer ordinal\n@t... | [
"Compute \"sent\" date\n\n@param msg Message to take sent date from. May be null to use default\n@param defaultVal Default if sent date is not present\n@return Sent date or now if no date could be found",
"Use this API to fetch statistics of spilloverpolicy_stats resource of given name .",
"Use this API ... |
private void readResources(Storepoint phoenixProject)
{
Resources resources = phoenixProject.getResources();
if (resources != null)
{
for (net.sf.mpxj.phoenix.schema.Project.Storepoints.Storepoint.Resources.Resource res : resources.getResource())
{
Resource resource = ... | [
"This method extracts resource data from a Phoenix file.\n\n@param phoenixProject parent node for resources"
] | [
"Creates a timespan from a list of other timespans.\n\n@return a timespan representing the sum of all the timespans provided",
"Returns the spread value such that the sum of cash flows of the bond discounted with a given reference curve\nwith the additional spread coincides with a given price.\n\n@param bondPrice... |
public <CT> CT callBatchTasks(ConnectionSource connectionSource, Callable<CT> callable) throws SQLException {
if (connectionSource.isSingleConnection(tableInfo.getTableName())) {
synchronized (this) {
return doCallBatchTasks(connectionSource, callable);
}
} else {
return doCallBatchTasks(connectionSour... | [
"Call batch tasks inside of a connection which may, or may not, have been \"saved\"."
] | [
"Add the given pair into the map.\n\n<p>\nIf the pair key already exists in the map, its value is replaced\nby the value in the pair, and the old value in the map is returned.\n</p>\n\n@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param entry the entry (key, v... |
public BoxRetentionPolicyAssignment.Info assignTo(BoxFolder folder) {
return BoxRetentionPolicyAssignment.createAssignmentToFolder(this.getAPI(), this.getID(), folder.getID());
} | [
"Assigns this retention policy to folder.\n@param folder the folder to assign policy to.\n@return info about created assignment."
] | [
"Control whether the Virtual CDJ sends status packets to the other players. Most uses of Beat Link will not\nrequire this level of activity. However, if you want to be able to take over the tempo master role, and control\nthe tempo and beat alignment of other players, you will need to turn on this feature, which al... |
public static Cluster swapPartitions(final Cluster nextCandidateCluster,
final int nodeIdA,
final int partitionIdA,
final int nodeIdB,
final int partitionId... | [
"Swaps two specified partitions.\n\nPair-wase partition swapping may be more prone to local minima than\nlarger perturbations. Could consider \"swapping\" a list of\n<nodeId/partitionId>. This would allow a few nodes to be identified\n(random # btw 2-5?) and then \"swapped\" (shuffled? rotated?).\n\n@return modifie... | [
"Return the number of days between startDate and endDate given the\nspecific daycount convention.\n\n@param startDate The start date given as a {@link org.threeten.bp.LocalDate}.\n@param endDate The end date given as a {@link org.threeten.bp.LocalDate}.\n@param convention A convention string.\n@return The number of... |
public static <T extends DMatrix> boolean decomposeSafe(DecompositionInterface<T> decomp, T M ) {
if( decomp.inputModified() ) {
return decomp.decompose(M.<T>copy());
} else {
return decomp.decompose(M);
}
} | [
"A simple convinience function that decomposes the matrix but automatically checks the input ti make\nsure is not being modified.\n\n@param decomp Decomposition which is being wrapped\n@param M THe matrix being decomposed.\n@param <T> Matrix type.\n@return If the decomposition was successful or not."
] | [
"Enables or disables sound.\nWhen sound is disabled, nothing is played but the\naudio sources remain intact.\n@param flag true to enable sound, false to disable.",
"Stops the processing and prints the final time.",
"This method writes predecessor data to a Planner file.\nWe have to deal with a slight anomaly in... |
private void readResources(Document cdp)
{
for (Document.Resources.Resource resource : cdp.getResources().getResource())
{
readResource(resource);
}
} | [
"Reads resource data from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file"
] | [
"Take screenshot of the current window.\n\n@param target The target type/format of the Screenshot\n@return Screenshot of current window, in the requested format",
"Sets a property on this Javascript object for which the value is a\nJavascriptEnum\n\nThe value is set to what is returned by the getEnumValue() metho... |
public static void finishThread(){
//--Create Task
final long threadId = Thread.currentThread().getId();
Runnable finish = new Runnable(){
public void run(){
releaseThreadControl(threadId);
}
};
//--Run Task
if(isThreaded){
//(case: multithreaded)
attem... | [
"Signal that this thread will not log any more messages in the multithreaded\nenvironment"
] | [
"Sets the specified starting partition key.\n\n@param paging a paging state",
"Use this API to update aaaparameter.",
"Retrieves the earliest start date for all assigned tasks.\n\n@return start date",
"Set the diffuse light intensity.\n\nThis designates the color of the diffuse reflection.\nIt is multiplied b... |
public static BoxUser getCurrentUser(BoxAPIConnection api) {
URL url = GET_ME_URL.build(api.getBaseURL());
BoxAPIRequest request = new BoxAPIRequest(api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObject = JsonObject.readFrom(response.getJSON... | [
"Gets the current user.\n@param api the API connection of the current user.\n@return the current user."
] | [
"returns a sorted array of properties",
"Delete any log segments matching the given predicate function\n\n@throws IOException",
"Sign in a connection to the registry by key.\n\nNote multiple connections can be attached to the same key\n\n@param key\nthe key\n@param connection\nthe websocket connection\n@see #re... |
@Pure
public static <K, V> Map<K, V> operator_minus(Map<K, V> left, final Pair<? extends K, ? extends V> right) {
return Maps.filterEntries(left, new Predicate<Entry<K, V>>() {
@Override
public boolean apply(Entry<K, V> input) {
return !Objects.equal(input.getKey(), right.getKey()) || !Objects.equal(input.... | [
"Remove the given pair from a given map for obtaining a new map.\n\n<p>\nIf the given key is inside the map, but is not mapped to the given value, the\nmap will not be changed.\n</p>\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this ... | [
"Stops the current debug server. Active connections are\nnot affected.",
"Use this API to update ipv6.",
"Function to update store definitions. Unlike the put method, this\nfunction does not delete any existing state. It only updates the state of\nthe stores specified in the given stores.xml\n\n@param valueByte... |
@RequestMapping(value = "/api/profile", method = RequestMethod.POST)
public
@ResponseBody
HashMap<String, Object> addProfile(Model model, String name) throws Exception {
logger.info("Should be adding the profile name when I hit the enter button={}", name);
return Utils.getJQGridJSON(profileS... | [
"Add profile to database, return collection of profile data. Called when 'enter' is hit in the UI\ninstead of 'submit' button\n\n@param model\n@param name\n@return\n@throws Exception"
] | [
"add an Extent class to the current descriptor\n@param newExtentClassName name of the class to add",
"Make a copy of this Area of Interest.",
"if you want to convert some string to an object, you have an argument to parse",
"Creates a scatter query from the given user query\n\n@param query the user's query.\n... |
protected <T, A> ActiveOperation<T, A> getActiveOperation(final Integer id) {
//noinspection unchecked
return (ActiveOperation<T, A>) activeRequests.get(id);
} | [
"Get the active operation.\n\n@param id the active operation id\n@return the active operation, {@code null} if if there is no registered operation"
] | [
"Send a device update to all registered update listeners.\n\n@param update the device update that has just arrived",
"Get all backup data\n\n@param model\n@return\n@throws Exception",
"Adds a new point.\n\n@param point a point\n@return this for chaining",
"Sets the values of this input field. Only Applicable ... |
public InputStream getInstance(DirectoryEntry directory, String name) throws IOException
{
DocumentEntry entry = (DocumentEntry) directory.getEntry(name);
InputStream stream;
if (m_encrypted)
{
stream = new EncryptedDocumentInputStream(entry, m_encryptionCode);
}
else
... | [
"Method used to instantiate the appropriate input stream reader,\na standard one, or one which can deal with \"encrypted\" data.\n\n@param directory directory entry\n@param name file name\n@return new input stream\n@throws IOException"
] | [
"Gracefully stop the engine",
"Write the work weeks associated with this calendar.\n\n@param xmlCalendar XML calendar instance\n@param mpxjCalendar MPXJ calendar instance",
"Saves messages to a propertyvfsbundle file.\n\n@throws CmsException thrown if writing to the file fails.",
"Updates the image informatio... |
public static Variable deserialize(String s,
VariableType variableType) {
return deserialize(s,
variableType,
null);
} | [
"Deserializes a variable, NOT checking whether the datatype is custom\n@param s\n@param variableType\n@return"
] | [
"Compute 2-dimensional Perlin noise.\n@param x the x coordinate\n@param y the y coordinate\n@return noise value at (x,y)",
"Gets value of this function at the current point, computed on the given batch of examples.\n@param batch A set of indices indicating the examples over which the gradient should be computed.\... |
public String getDbProperty(String key) {
// extract the database key out of the entire key
String databaseKey = key.substring(0, key.indexOf('.'));
Properties databaseProperties = getDatabaseProperties().get(databaseKey);
return databaseProperties.getProperty(key, "");
} | [
"Returns the value for a given key from the database properties.\n\n@param key the property key\n\n@return the string value for a given key"
] | [
"to avoid creation of unmaterializable proxies",
"Process calendar days of the week.\n\n@param calendar project calendar\n@param root calendar data",
"Called when remote end send a message to this connection\n@param receivedMessage the message received\n@return this context",
"Remove the given pair into the m... |
private void resetCalendar() {
_calendar = getCalendar();
if (_defaultTimeZone != null) {
_calendar.setTimeZone(_defaultTimeZone);
}
_currentYear = _calendar.get(Calendar.YEAR);
} | [
"Resets the calendar"
] | [
"Set the view frustum to pick against from the given projection matrix.\n\nIf the projection matrix is null, the picker will revert to picking\nobjects that are visible from the viewpoint of the scene's current camera.\nIf a matrix is given, the picker will pick objects that are visible\nfrom the viewpoint of it's... |
private void fireEventForNonWebModules(Type eventType, Object event, Annotation... qualifiers) {
try {
BeanDeploymentModules modules = deploymentManager.getServices().get(BeanDeploymentModules.class);
if (modules != null) {
// fire event for non-web modules
... | [
"Fires given event for non-web modules. Used for @BeforeDestroyed and @Destroyed events."
] | [
"add a converted object to the pool\n\n@param converter\nthe converter that made the conversion\n@param sourceObject\nthe source object that has been converted\n@param destinationType\nthe destination type\n@param convertedObject\nthe converted object",
"Get info for a given topic\n\n@param topicId\nUnique identi... |
public Object getProperty(String property) {
if(ExpandoMetaClass.isValidExpandoProperty(property)) {
if(property.equals(ExpandoMetaClass.STATIC_QUALIFIER) ||
property.equals(ExpandoMetaClass.CONSTRUCTOR) ||
myMetaClass.hasProperty(this, property) == null) {
... | [
"this method mimics EMC behavior"
] | [
"Creates a collection from the given stream, casting each object to the\nprovided listener class. The returned collection must not necessarily be\nmutable.\n\n@param <T> Type of the listeners in the given list.\n@param listenerClass The class of the objects in the provided list.\n@param listeners The stream to obta... |
public ResponseFromManager generateUpdateExecuteTask(ParallelTask task) {
// add to map now; as can only pass final
ParallelTaskManager.getInstance().addTaskToInProgressMap(
task.getTaskId(), task);
logger.info("Added task {} to the running inprogress map...",
ta... | [
"key function to execute a parallel task.\n\n@param task the parallel task\n@return the batch response from manager"
] | [
"Configure file logging and stop console logging.\n\n@param filename\nLog to this file.",
"This method is used to quote any special characters that appear in\nliteral text that is required as part of the currency format.\n\n@param literal Literal text\n@return literal text with special characters in quotes",
"P... |
public static <T> Object callMethod(Object obj,
Class<T> c,
String name,
Class<?>[] classes,
Object[] args) {
try {
Method m = getMethod(c, ... | [
"Call the named method\n\n@param obj The object to call the method on\n@param c The class of the object\n@param name The name of the method\n@param args The method arguments\n@return The result of the method"
] | [
"Print a date.\n\n@param value Date instance\n@return string representation of a date",
"Returns new instance of OptionalValue with given value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue",
"Adds a submodule to the module.\n\n<P>\nINFO: If t... |
private void readTasks(Project plannerProject) throws MPXJException
{
Tasks tasks = plannerProject.getTasks();
if (tasks != null)
{
for (net.sf.mpxj.planner.schema.Task task : tasks.getTask())
{
readTask(null, task);
}
for (net.sf.mpxj.planner.schema... | [
"This method extracts task data from a Planner file.\n\n@param plannerProject Root node of the Planner file"
] | [
"This utility displays a list of available task filters, and a\nlist of available resource filters.\n\n@param project project file",
"Use this API to add dnssuffix.",
"Create a document that parses the tile's featureFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@return document\n@throws Rend... |
public boolean detectTierRichCss() {
boolean result = false;
//The following devices are explicitly ok.
//Note: 'High' BlackBerry devices ONLY
if (detectMobileQuick()) {
//Exclude iPhone Tier and e-Ink Kindle devices.
if (!detectTierIphone() && !detectKi... | [
"The quick way to detect for a tier of devices.\nThis method detects for devices which are likely to be capable\nof viewing CSS content optimized for the iPhone,\nbut may not necessarily support JavaScript.\nExcludes all iPhone Tier devices.\n@return detection of any device in the 'Rich CSS' Tier"
] | [
"Mbeans for FETCH_ENTRIES",
"Converts the given CharSequence into a List of Strings of one character.\n\n@param self a CharSequence\n@return a List of characters (a 1-character String)\n@see #toSet(String)\n@since 1.8.2",
"Gets information about this collaboration.\n\n@return info about this collaboration.",
... |
public static boolean queryHasResult(Statement stmt, String sql) {
try {
ResultSet rs = stmt.executeQuery(sql);
try {
return rs.next();
} finally {
rs.close();
}
} catch (SQLException e) {
throw new DukeException(e);
}
} | [
"Returns true if the query result has at least one row."
] | [
"Get the relative path.\n\n@return the relative path",
"Determine the raw type for the given generic parameter type.\n@param genericType the generic type to resolve\n@param typeVariableMap the TypeVariable Map to resolved against\n@return the resolved raw type",
"We have obtained a waveform preview for a device... |
public T withDescription(String text, String languageCode) {
withDescription(factory.getMonolingualTextValue(text, languageCode));
return getThis();
} | [
"Adds an additional description to the constructed document.\n\n@param text\nthe text of the description\n@param languageCode\nthe language code of the description\n@return builder object to continue construction"
] | [
"Use this API to fetch the statistics of all ipseccounters_stats resources that are configured on netscaler.",
"Return true if the DeclarationExpression represents a 'final' variable declaration.\n\nNOTE: THIS IS A WORKAROUND.\n\nThere does not seem to be an easy way to determine whether the 'final' modifier has ... |
private void processRequestHeaderOverrides(HttpMethod httpMethodProxyRequest) throws Exception {
RequestInformation requestInfo = requestInformation.get();
for (EndpointOverride selectedPath : requestInfo.selectedRequestPaths) {
List<EnabledEndpoint> points = selectedPath.getEnabledEndpoints... | [
"Apply any applicable header overrides to request\n\n@param httpMethodProxyRequest\n@throws Exception"
] | [
"Obtain a dbserver client session that can be used to perform some task, call that task with the client,\nthen release the client.\n\n@param targetPlayer the player number whose dbserver we wish to communicate with\n@param task the activity that will be performed with exclusive access to a dbserver connection\n@par... |
public static String httpRequest(String stringUrl, String method, Map<String, String> parameters,
String input, String charset) throws IOException {
URL url = new URL(stringUrl);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setDoOutput(true);
conn.setRequestMethod(method... | [
"Execute a HTTP request\n\n@param stringUrl URL\n@param method Method to use\n@param parameters Params\n@param input Input / Payload\n@param charset Input Charset\n@return response\n@throws IOException"
] | [
"Returns the getter method associated with the object's field.\n\n@param object\nthe object\n@param fieldName\nthe name of the field\n@return the getter method\n@throws NullPointerException\nif object or fieldName is null\n@throws SuperCsvReflectionException\nif the getter doesn't exist or is not visible",
"refre... |
private String getInitials(String name)
{
String result = null;
if (name != null && name.length() != 0)
{
StringBuilder sb = new StringBuilder();
sb.append(name.charAt(0));
int index = 1;
while (true)
{
index = name.indexOf(' ', index);
... | [
"Convert a name into initials.\n\n@param name source name\n@return initials"
] | [
"Retrieves an integer value from the extended data.\n\n@param type Type identifier\n@return integer value",
"Adds all fields declared directly in the object's class to the output\n@return this",
"Get the list of all nodes and the list of active nodes in the cluster.\n\n@return Membership object encapsulating li... |
protected BoxWatermark applyWatermark(URLTemplate itemUrl, String imprint) {
URL watermarkUrl = itemUrl.build(this.getAPI().getBaseURL(), this.getID());
URL url = WATERMARK_URL_TEMPLATE.build(watermarkUrl.toString());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT");
... | [
"Used to apply or update the watermark for the item.\n@param itemUrl url template for the item.\n@param imprint the value must be \"default\", as custom watermarks is not yet supported.\n@return the watermark associated with the item."
] | [
"List the slack values for each task.\n\n@param file ProjectFile instance",
"Use this API to delete route6 of given name.",
"Get the layer ID out of the request URL.\n\n@param request servlet request\n@return layer id",
"Helper method which supports creation of proper error messages.\n\n@param ex An exception... |
public Integer getVarDataKey(FieldType type)
{
Integer result = null;
FieldItem item = m_map.get(type);
if (item != null)
{
result = item.getVarDataKey();
}
return result;
} | [
"Retrieve the var data key for a specific field.\n\n@param type field type\n@return var data key"
] | [
"Create a new file but fail if it already exists. The check for\nexistance of the file and it's creation are an atomic operation with\nrespect to other filesystem activities.",
"Adds a data set to IIM file.\n\n@param ds\ndata set id (see constants in IIM class)\n@param value\ndata set value. Null values are silen... |
public List<Message> requestArtistMenuFrom(final SlotReference slotReference, final int sortOrder)
throws Exception {
ConnectionManager.ClientTask<List<Message>> task = new ConnectionManager.ClientTask<List<Message>>() {
@Override
public List<Message> useClient(Client client... | [
"Ask the specified player for an Artist menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packe... | [
"Record the duration of a get_all operation, along with how many values\nwere requested, how may were actually returned and the size of the values\nreturned.",
"Creates the string mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@par... |
@SuppressWarnings("unchecked")
protected <T extends Indexable> T taskResult(String key) {
Indexable result = this.taskGroup.taskResult(key);
if (result == null) {
return null;
} else {
T castedResult = (T) result;
return castedResult;
}
} | [
"Get result of one of the task that belongs to this task's task group.\n\n@param key the task key\n@param <T> the actual type of the task result\n@return the task result, null will be returned if task has not produced a result yet"
] | [
"Check exactly the week check-boxes representing the given weeks.\n@param weeksToCheck the weeks selected.",
"trim \"act.\" from conf keys",
"Saves the messages for all languages that were opened in the editor.\n\n@throws CmsException thrown if saving fails.",
"Create a patch element for the rollback patch.\n... |
public static base_response delete(nitro_service client, sslcertkey resource) throws Exception {
sslcertkey deleteresource = new sslcertkey();
deleteresource.certkey = resource.certkey;
return deleteresource.delete_resource(client);
} | [
"Use this API to delete sslcertkey."
] | [
"Computes the determinant for the specified matrix. It must be square and have\nthe same width and height as what was specified in the constructor.\n\n@param mat The matrix whose determinant is to be computed.\n@return The determinant.",
"Deletes the metadata on this folder associated with a specified scope and ... |
private void remove(String directoryName) {
if ((directoryName == null) || (conn == null))
return;
String key = S3Util.sanitize(directoryName) + "/" + S3Util.sanitize(DC_FILE_NAME);
try {
Map headers = new TreeMap();
headers.put("Content-Type", Arrays.asList(... | [
"Remove the S3 file that contains the domain controller data.\n\n@param directoryName the name of the directory that contains the S3 file"
] | [
"Adds an additional statement to the constructed document.\n\n@param statement\nthe additional statement\n@return builder object to continue construction",
"Waits for the current outstanding request retrying it with exponential backoff if it fails.\n\n@throws ClosedByInterruptException if request was interrupted\... |
private Event createEvent(Endpoint endpoint, EventTypeEnum type) {
Event event = new Event();
MessageInfo messageInfo = new MessageInfo();
Originator originator = new Originator();
event.setMessageInfo(messageInfo);
event.setOriginator(originator);
Date date = new Date(... | [
"Creates the event for endpoint with specific type.\n\n@param endpoint the endpoint\n@param type the type\n@return the event"
] | [
"Sets the site root.\n\n@param siteRoot the site root",
"Round the size of a rectangle with double values.\n\n@param rectangle The rectangle.\n@return",
"Retrieve the document with the specified ID from the database and deserialize to an\ninstance of the POJO of type T.\n\n@param <T> object type\n@param c... |
public static Object tryGetSingleton(Class<?> invokerClass, App app) {
Object singleton = app.singleton(invokerClass);
if (null == singleton) {
if (isGlobalOrStateless(invokerClass, new HashSet<Class>())) {
singleton = app.getInstance(invokerClass);
}
}
... | [
"If the `invokerClass` specified is singleton, or without field or all fields are\nstateless, then return an instance of the invoker class. Otherwise, return null\n@param invokerClass the invoker class\n@param app the app\n@return an instance of the invokerClass or `null` if invoker class is stateful class"
] | [
"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.",
"Converts a duration to duration time units.\n\n@param value duration value\n@return duration time units",
"Gets the object whose index is the integer argument.\n\n@param i the integer i... |
private void writePredecessors(Task task)
{
List<Relation> relations = task.getPredecessors();
for (Relation mpxj : relations)
{
RelationshipType xml = m_factory.createRelationshipType();
m_project.getRelationship().add(xml);
xml.setLag(getDuration(mpxj.getLag()));
... | [
"Writes task predecessor links to a PM XML file.\n\n@param task MPXJ Task instance"
] | [
"Modify a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder",
"Retrieve a table of data.\n\n@param type table type\n@return FastTrackTable instance",
"Returns new instance of ... |
@Pure
public static <K, V> Map<K, V> operator_minus(Map<K, V> left, final Map<? extends K, ? extends V> right) {
return Maps.filterEntries(left, new Predicate<Entry<K, V>>() {
@Override
public boolean apply(Entry<K, V> input) {
final V value = right.get(input.getKey());
if (value == null) {
return... | [
"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... | [
"Use this API to add clusterinstance resources.",
"Sets the HTML entity translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator\n@return this to allow chaining",
"Computes the distance from a poi... |
private PoolingHttpClientConnectionManager createConnectionMgr() {
PoolingHttpClientConnectionManager connectionMgr;
// prepare SSLContext
SSLContext sslContext = buildSslContext();
ConnectionSocketFactory plainsf = PlainConnectionSocketFactory.getSocketFactory();
// we allow to... | [
"Creates custom Http Client connection pool to be used by Http Client\n\n@return {@link PoolingHttpClientConnectionManager}"
] | [
"Obtains a local date in Symmetry010 calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Symmetry010 local date, not null\n@throws DateTimeException if unable t... |
@SuppressWarnings("unused")
public String getDevicePushToken(final PushType type) {
switch (type) {
case GCM:
return getCachedGCMToken();
case FCM:
return getCachedFCMToken();
default:
return null;
}
} | [
"Returns the device push token or null\n\n@param type com.clevertap.android.sdk.PushType (FCM or GCM)\n@return String device token or null\nNOTE: on initial install calling getDevicePushToken may return null, as the device token is\nnot yet available\nImplement CleverTapAPI.DevicePushTokenRefreshListener to get a c... | [
"Close it and ignore any exceptions.",
"Two stage distribution, dry run and actual promotion to verify correctness.\n\n@param distributionBuilder\n@param client\n@param listener\n@param buildName\n@param buildNumber\n@throws IOException",
"The token was previously determined as potentially to-be-splitted thus w... |
public void histogramToStructure(int histogram[] ) {
col_idx[0] = 0;
int index = 0;
for (int i = 1; i <= numCols; i++) {
col_idx[i] = index += histogram[i-1];
}
nz_length = index;
growMaxLength( nz_length , false);
if( col_idx[numCols] != nz_length )
... | [
"Given the histogram of columns compute the col_idx for the matrix. nz_length is automatically set and\nnz_values will grow if needed.\n@param histogram histogram of column values in the sparse matrix. modified, see above."
] | [
"Creates a combined list of Entries using the provided mapping file, and sorts them by\nfirst by priority, then the number of tokens in the regex.\n\n@param mapping The path to a file of mappings\n@return a sorted list of Entries",
"Read all task relationships from a ConceptDraw PROJECT file.\n\n@param cdp Concep... |
public int count() {
int n = 0;
for (ConcurrentMap<?, ?> bag : registry.values()) {
n += bag.size();
}
return n;
} | [
"Returns the connection count in this registry.\n\nNote it might count connections that are closed but not removed from registry yet\n\n@return the connection count"
] | [
"A map of the header key value pairs. Keys are strings and values are either list of strings or a\nstring.\n\n@param headers the header map",
"Count the number of non-zero elements in V",
"Set a status message in the JTextComponent passed to this\nmodel.\n@param message The message that should be displayed.",
... |
public double getDurationMs() {
double durationMs = 0;
for (Duration duration : durations) {
if (duration.taskFinished()) {
durationMs += duration.getDurationMS();
}
}
return durationMs;
} | [
"Returns the duration of the measured tasks in ms"
] | [
"Pause component timer for current instance\n@param type - of component",
"Inserts a Parcelable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Parcelable object, or null\n@return thi... |
public static<Z> Function0<Z> lift(Callable<Z> f) {
return bridge.lift(f);
} | [
"Lift a Java Callable to a Scala Function0\n\n@param f the function to lift\n\n@returns the Scala function"
] | [
"Returns the value of the identified field as a Float.\n@param fieldName the name of the field\n@return the value of the field as a Float\n@throws FqlException if the field cannot be expressed as an Float",
"Get the default providers list to be used.\n\n@return the default provider list and ordering, not null.",
... |
public static <T> FastEvent<T> of(Class<T> type, BeanManagerImpl manager, ObserverNotifier notifier, Annotation... qualifiers) {
ResolvedObservers<T> resolvedObserverMethods = notifier.<T> resolveObserverMethods(type, qualifiers);
if (resolvedObserverMethods.isMetadataRequired()) {
EventMeta... | [
"Constructs a new FastEvent instance\n@param type the event type\n@param manager the bean manager\n@param notifier the notifier to be used for observer method resolution\n@param qualifiers the event qualifiers\n@return"
] | [
"Log the data for a single column.\n\n@param startIndex offset into buffer\n@param length length",
"Helper method to lookup a DAO if it has already been associated with the table-config. Otherwise this returns\nnull.",
"Converts a time in milliseconds to the appropriate x coordinate for drawing something at tha... |
final void compress(final File backupFile,
final AppenderRollingProperties properties) {
if (this.isCompressed(backupFile)) {
LogLog.debug("Backup log file " + backupFile.getName()
+ " is already compressed");
return; // try not to do unnecessary work
}
final long lastModified = ... | [
"Template method responsible for file compression checks, file creation, and\ndelegation to specific strategy implementations.\n\n@param backupFile\nThe file to be compressed.\n@param properties\nThe appender's configuration."
] | [
"Finds the column with the largest normal and makes that the first column\n\n@param j Current column being inspected",
"Adds a security property to be passed to the server.\n\n@param key the property key\n@param value the property value\n\n@return the builder",
"Enqueues a message for sending on the send thre... |
public void insert( Token where , Token token ) {
if( where == null ) {
// put at the front of the list
if( size == 0 )
push(token);
else {
first.previous = token;
token.previous = null;
token.next = first;
... | [
"Inserts 'token' after 'where'. if where is null then it is inserted to the beginning of the list.\n@param where Where 'token' should be inserted after. if null the put at it at the beginning\n@param token The token that is to be inserted"
] | [
"Destroys dependent instance\n\n@param instance\n@return true if the instance was destroyed, false otherwise",
"This method is used to process an MPP8 file. This is the file format\nused by Project 98.\n\n@param reader parent file reader\n@param file Parent MPX file\n@param root Root of the POI file system.\n@thr... |
private float colorToAngle(int color) {
float[] colors = new float[3];
Color.colorToHSV(color, colors);
return (float) Math.toRadians(-colors[0]);
} | [
"Convert a color to an angle.\n\n@param color The RGB value of the color to \"find\" on the color wheel.\n\n@return The angle (in rad) the \"normalized\" color is displayed on the\ncolor wheel."
] | [
"Get the list of all nodes and the list of active nodes in the cluster.\n\n@return Membership object encapsulating lists of all nodes and the cluster nodes\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-_membership-\">\n_membership</a>",
"Checks to see if the specified ... |
@SuppressWarnings("WeakerAccess")
public boolean isPlaying() {
if (packetBytes.length >= 212) {
return (packetBytes[STATUS_FLAGS] & PLAYING_FLAG) > 0;
} else {
final PlayState1 state = getPlayState1();
return state == PlayState1.PLAYING || state == PlayState1.LOO... | [
"Was the CDJ playing a track when this update was sent?\n\n@return true if the play flag was set, or, if this seems to be a non-nexus player, if <em>P<sub>1</sub></em>\nhas a value corresponding to a playing state."
] | [
"Given a class configures the binding between a class and a Renderer class.\n\n@param clazz to bind.\n@param prototype used as Renderer.\n@return the current RendererBuilder instance.",
"Use this API to fetch a vpnglobal_auditnslogpolicy_binding resources.",
"Converts assignment duration values from minutes to ... |
private void processResources() throws IOException
{
CompanyReader reader = new CompanyReader(m_data.getTableData("Companies"));
reader.read();
for (MapRow companyRow : reader.getRows())
{
// TODO: need to sort by type as well as by name!
for (MapRow resourceRow : sort(compa... | [
"Extract resource data."
] | [
"Sets the max.\n\n@param n the new max",
"Retrieves the value of the given accessible field of the given receiver.\n\n@param receiver the container of the field, not <code>null</code>\n@param fieldName the field's name, not <code>null</code>\n@return the value of the field\n\n@throws NoSuchFieldException see {@li... |
private ModelNode createCPUNode() throws OperationFailedException {
ModelNode cpu = new ModelNode().setEmptyObject();
cpu.get(ARCH).set(getProperty("os.arch"));
cpu.get(AVAILABLE_PROCESSORS).set(ProcessorInfo.availableProcessors());
return cpu;
} | [
"Create a ModelNode representing the CPU the instance is running on.\n\n@return a ModelNode representing the CPU the instance is running on.\n@throws OperationFailedException"
] | [
"Removes the value from the Collection mapped to by this key, leaving the\nrest of the collection intact.\n\n@param key\nthe key to the Collection to remove the value from\n@param value\nthe value to remove",
"Scans the jar file and returns the paths that match the includes and excludes.\n\n@return A List of path... |
public void set(final Argument argument) {
if (argument != null) {
map.put(argument.getKey(), Collections.singleton(argument));
}
} | [
"Sets an argument to the collection of arguments. This guarantees only one value will be assigned to the\nargument key.\n\n@param argument the argument to add"
] | [
"Gets the actual type arguments of a Type\n\n@param type The type to examine\n@return The type arguments",
"Closes the connection to the dbserver. This instance can no longer be used after this action.",
"Configure the access permissions required to access this print job.\n\n@param template the containing print... |
protected void beforeLoading()
{
if (_listeners != null)
{
CollectionProxyListener listener;
if (_perThreadDescriptorsEnabled) {
loadProfileIfNeeded();
}
for (int idx = _listeners.size() - 1; idx >= 0; idx--)
{
... | [
"Notifies all listeners that the data is about to be loaded."
] | [
"Overridden to ensure that our timestamp handling is as expected",
"copied and altered from TransactionHelper",
"Read the calendar data from a Gantt Designer file.\n\n@param gantt Gantt Designer file.",
"Returns the JSON datatype for the property datatype as represented by\nthe given WDTK datatype IRI string.... |
private void processDeferredRelationship(DeferredRelationship dr) throws MPXJException
{
String data = dr.getData();
Task task = dr.getTask();
int length = data.length();
if (length != 0)
{
int start = 0;
int end = 0;
while (end != length)
{
... | [
"This method processes a single deferred relationship list.\n\n@param dr deferred relationship list data\n@throws MPXJException"
] | [
"Use this API to fetch all the vpnclientlessaccesspolicy resources that are configured on netscaler.",
"This is a generic function for retrieving any config value. The returned value\nis the one the server is operating with, no matter whether it comes from defaults\nor from the user-supplied configuration.\n\nThi... |
public void linkOneToMany(Object obj, CollectionDescriptor cod, boolean insert)
{
Object referencedObjects = cod.getPersistentField().get(obj);
storeAndLinkOneToMany(true, obj, cod,referencedObjects, insert);
} | [
"Assign FK value to all n-side objects referenced by given object.\n\n@param obj real object with 1:n reference\n@param cod {@link CollectionDescriptor} of referenced 1:n objects\n@param insert flag signal insert operation, false signals update operation"
] | [
"Fluent API builder.\n\n@param cronExpression\n@return",
"make it public for CLI interaction to reuse JobContext",
"All the attributes needed either by the processors for each datasource row or by the jasper template.\n\n@param attributes the attributes.",
"Check if a position is within a circle\n\n@param x ... |
private ProjectFile handleDosExeFile(InputStream stream) throws Exception
{
File file = InputStreamHelper.writeStreamToTempFile(stream, ".tmp");
InputStream is = null;
try
{
is = new FileInputStream(file);
if (is.available() > 1350)
{
StreamHelper.skip(... | [
"This could be a self-extracting archive. If we understand the format, expand\nit and check the content for files we can read.\n\n@param stream schedule data\n@return ProjectFile instance"
] | [
"Converts the text stream data to HTML form.\n\n@param content the content to convert\n@return the HTML version of the content",
"Record a prepare operation.\n\n@param preparedOperation the prepared operation",
"Creates an element that represents a single positioned box with no content.\n@return the resulting D... |
public static void showErrorDialog(String message, String details) {
Window window = prepareWindow(DialogWidth.wide);
window.setCaption("Error");
window.setContent(new CmsSetupErrorDialog(message, details, null, window));
A_CmsUI.get().addWindow(window);
} | [
"Shows error dialog, manually supplying details instead of getting them from an exception stack trace.\n\n@param message the error message\n@param details the details"
] | [
"Adds a new row after the given one.\n\n@param row the row after which a new one should be added",
"Create and return a new Violation for this rule and the specified import className and alias\n@param sourceCode - the SourceCode\n@param className - the class name (as specified within the import statement)\n@param... |
public void prepareServer() {
try {
server = new Server(0);
jettyHandler = new AbstractHandler() {
public void handle(String target, Request req, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletExcept... | [
"Prepares a Jetty server for communicating with consumers."
] | [
"Parses a code block with no parentheses and no commas. After it is done there should be a single token left,\nwhich is returned.",
"Sets ID field value.\n\n@param val value",
"Attach a component to this scene object.\n\nEach scene object has a list of components that may\nbe attached to it. Only one component... |
public static void writeObject(File file, Object object) throws IOException {
FileOutputStream fileOut = new FileOutputStream(file);
ObjectOutputStream out = new ObjectOutputStream(new BufferedOutputStream(fileOut));
try {
out.writeObject(object);
out.flush();
... | [
"To store an object in a quick & dirty way."
] | [
"Write exceptions into the format used by MSPDI files from\nProject 2007 onwards.\n\n@param calendar parent calendar\n@param exceptions list of exceptions",
"The Total Slack field contains the amount of time a task can be\ndelayed without delaying the project's finish date.\n\n@return string representing duration... |
private static void initInstance(final TransactionLogger instance, final Logger logger, final Logger auditor) {
instance.logger = logger;
instance.auditor = auditor;
instance.components = new LinkedHashMap<>();
instance.properties = new LinkedHashMap<>();
instance.total = new Component(TOTAL_COMPONE... | [
"Initialize new instance\n@param instance\n@param logger\n@param auditor"
] | [
"Initializes the type and validates it",
"Joins with another IPv4 segment to produce a IPv6 segment.\n\n@param creator\n@param low\n@return",
"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",
"Dele... |
public RedwoodConfiguration hideChannels(final Object[] channels){
tasks.add(new Runnable() { public void run() { Redwood.hideChannels(channels); } });
return this;
} | [
"Hide the following channels.\n@param channels The names of the channels to hide.\n@return this"
] | [
"Updates the gatewayDirection attributes of all gateways.\n@param def",
"Whether the address has the well-known prefix for IPv4 translatable addresses as in rfc 6052 and 6144\n@return",
"Convert an object to a list.\n\n@param mapper the object mapper\n@param source the source object\n@para... |
public static base_responses delete(nitro_service client, appfwlearningdata resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
appfwlearningdata deleteresources[] = new appfwlearningdata[resources.length];
for (int i=0;i<resources.length;i++){
de... | [
"Use this API to delete appfwlearningdata resources."
] | [
"Get a patch entry for either a layer or add-on.\n\n@param name the layer name\n@param addOn whether the target is an add-on\n@return the patch entry, {@code null} if it there is no such layer",
"Checks if a parameter exists. If it exists, it is updated. If it doesn't, it is created. Only works for parameters wh... |
private static InterestRateSwapLegProductDescriptor getSwapLegProductDescriptor(Element leg, String forwardCurveName, String discountCurveName,
DayCountConvention daycountConvention) {
boolean isFixed = leg.getElementsByTagName("interestType").item(0).getTextContent().equalsIgnoreCase("FIX");
ArrayList<Pe... | [
"Construct an InterestRateSwapLegProductDescriptor from a node in a FIPXML file.\n\n@param leg The node containing the leg.\n@param forwardCurveName Forward curve name form outside the node.\n@param discountCurveName Discount curve name form outside the node.\n@param daycountConvention Daycount convention from outs... | [
"Returns a new Set containing all the objects in the specified array.",
"Retrieves the earliest start date for all assigned tasks.\n\n@return start date",
"Configures a RequestBuilder to send an RPC request when the RequestBuilder\nis intended to be returned through the asynchronous proxy interface.\n\n@param <... |
private double convertTenor(int maturityInMonths, int tenorInMonths) {
Schedule schedule = fixMetaSchedule.generateSchedule(referenceDate, maturityInMonths, tenorInMonths);
return schedule.getPayment(schedule.getNumberOfPeriods()-1);
} | [
"Convert tenor given as offset in months to year fraction.\n\n@param maturityInMonths The maturity as offset in months.\n@param tenorInMonths The tenor as offset in months.\n@return THe tenor as year fraction."
] | [
"Main entry point. Reads a directory containing a P3 Btrieve database files\nand returns a map of table names and table content.\n\n@param directory directory containing the database\n@param prefix file name prefix used to identify files from the same database\n@return Map of table names to table data",
"This ret... |
public static List<DesignDocument> fromDirectory(File directory) throws FileNotFoundException {
List<DesignDocument> designDocuments = new ArrayList<DesignDocument>();
if (directory.isDirectory()) {
Collection<File> files = FileUtils.listFiles(directory, null, true);
for (Fil... | [
"Deserialize a directory of javascript design documents to a List of DesignDocument objects.\n\n@param directory the directory containing javascript files\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read"
] | [
"Copied from AbstractEntityPersister",
"Internal method that finds the matching enum for a configured field that has the name argument.\n\n@return The matching enum value or null if blank enum name.\n@throws IllegalArgumentException\nIf the enum name is not known.",
"The connection timeout for making a connecti... |
protected String getBundleJarPath() throws MalformedURLException {
Path path = PROPERTIES.getAllureHome().resolve("app/allure-bundle.jar").toAbsolutePath();
if (Files.notExists(path)) {
throw new AllureCommandException(String.format("Bundle not found by path <%s>", path));
}
... | [
"Returns the bundle jar classpath element."
] | [
"Obtains a local date in Pax calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Pax local date, not null\n@throws DateTimeException if unable to create the dat... |
public CollectionRequest<Task> findByTag(String tag) {
String path = String.format("/tags/%s/tasks", tag);
return new CollectionRequest<Task>(this, Task.class, path, "GET");
} | [
"Returns the compact task records for all tasks with the given tag.\n\n@param tag The tag in which to search for tasks.\n@return Request object"
] | [
"Delete the proxy history for the active profile\n\n@throws Exception exception",
"Sets an element in at the specified index.",
"Get a collection of all of the user's groups.\n\n@return A Collection of Group objects\n@throws FlickrException",
"Encrypt a string with HMAC-SHA1 using the specified key.\n\n@param... |
public DownloadRequest addCustomHeader(String key, String value) {
mCustomHeader.put(key, value);
return this;
} | [
"Adds custom header to request\n\n@param key\n@param value"
] | [
"Returns an entry of kind snippet with the given proposal and label and the prefix from the context, or null if the proposal is not valid.\n@since 2.16",
"Set the InputStream of request body data, of known length, to be sent to the server.\n\n@param input InputStream of request body data to be sent to the s... |
protected BufferedImage createErrorImage(final Rectangle area) {
final BufferedImage bufferedImage = new BufferedImage(area.width, area.height, TYPE_INT_ARGB_PRE);
final Graphics2D graphics = bufferedImage.createGraphics();
try {
graphics.setBackground(ColorParser.toColor(this.config... | [
"Create an error image.\n\n@param area The size of the image"
] | [
"Add the value to list of values to be used as part of the\nevaluation of this indicator.\n\n@param index position in the list\n@param value evaluation value",
"Returns a single sort option configuration as configured via the methods parameter, or null if the parameter does not specify a sort option.\n@param json... |
public void setBit(int index, boolean set)
{
assertValidIndex(index);
int word = index / WORD_LENGTH;
int offset = index % WORD_LENGTH;
if (set)
{
data[word] |= (1 << offset);
}
else // Unset the bit.
{
data[word] &= ~(1 << offs... | [
"Sets the bit at the specified index.\n@param index The index of the bit to set (0 is the least-significant bit).\n@param set A boolean indicating whether the bit should be set or not.\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string."
] | [
"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",
"Boyer Moore scan that proceeds forwards from the end of the file looking for the first LOCSIG",
"returns array with all allowed values\n@retu... |
@Override
public void join(final long millis) throws InterruptedException {
for (final Thread thread : this.threads) {
thread.join(millis);
}
} | [
"Join to internal threads and wait millis time per thread or until all\nthreads are finished if millis is 0.\n\n@param millis the time to wait in milliseconds for the threads to join; a timeout of 0 means to wait forever.\n@throws InterruptedException if any thread has interrupted the current thread.\nThe interrupt... | [
"Get list of replies\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@return A reply object\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getList.html\">API Documentation</a>",
"Implement the persistence handler for stor... |
boolean lockSharedInterruptibly(final Integer permit, final long timeout, final TimeUnit unit) throws InterruptedException {
if (permit == null) {
throw new IllegalArgumentException();
}
return sync.tryAcquireSharedNanos(permit, unit.toNanos(timeout));
} | [
"Acquire the shared lock, with a max wait timeout to acquire.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the timeout scalar quantity.\n@param unit - see {@code TimeUnit} for quantities.\n@return {@code boolean} true on successful acquire.\n@throws InterruptedE... | [
"Obtain all groups\n\n@return All Groups",
"Configures a RequestBuilder to send an RPC request.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read the return value of the\ninvocation\n@param requestData payload that encodes the addressing and arguments of the\nRPC call\n@... |
private void checkExtents(ClassDescriptorDef classDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
HashMap processedClasses = new HashMap();
InheritanceHelper helper = new Inher... | [
"Checks the extents specifications and removes unnecessary entries.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the constraint has been violated"
] | [
"Find the the qualified container port of the target service\nUses java annotations first or returns the container port.\n\n@param service\nThe target service.\n@param qualifiers\nThe set of qualifiers.\n\n@return Returns the resolved containerPort of '0' as a fallback.",
"Before closing the PersistenceBroker ens... |
public IOrientationState getOrientationStateFromParam(int orientation) {
switch (orientation) {
case Orientation.ORIENTATION_HORIZONTAL_BOTTOM:
return new OrientationStateHorizontalBottom();
case Orientation.ORIENTATION_HORIZONTAL_TOP:
return new Orientati... | [
"orientation state factory method"
] | [
"Given a rebalance-task info, convert it into the protobuf equivalent\n\n@param stealInfo Rebalance task info\n@return Protobuf equivalent of the same",
"This method is called to format a units value.\n\n@param value numeric value\n@return currency value",
"returns controller if a new device is found",
"Gets ... |
public static List<Expression> getVariableExpressions(DeclarationExpression declarationExpression) {
Expression leftExpression = declarationExpression.getLeftExpression();
// !important: performance enhancement
if (leftExpression instanceof ArrayExpression) {
List<Expression> e... | [
"Return the List of VariableExpression objects referenced by the specified DeclarationExpression.\n@param declarationExpression - the DeclarationExpression\n@return the List of VariableExpression objects"
] | [
"Load the installation state based on the identity\n\n@param installedIdentity the installed identity\n@return the installation state\n@throws IOException",
"Here we start a intern odmg-Transaction to hide transaction demarcation\nThis method could be invoked several times within a transaction, but only\nthe firs... |
private String getStringPredicate(String fieldName, List<String> filterValues, List<Object> prms)
{
if (filterValues != null && !filterValues.isEmpty())
{
String res = "";
for (String filterValue : filterValues)
{
if (filterValue == null)
... | [
"GetJob helper - String predicates are all created the same way, so this factors some code."
] | [
"Call the no-arg constructor for the given class\n\n@param <T> The type of the thing to construct\n@param klass The class\n@return The constructed thing",
"Read a text file from assets into a single string\n\n@param context\nA non-null Android Context\n@param asset\nThe asset file to read\n@return The contents or... |
public FluoMutationGenerator put(Column col, CharSequence value) {
return put(col, value.toString().getBytes(StandardCharsets.UTF_8));
} | [
"Puts value at given column\n\n@param value Will be encoded using UTF-8"
] | [
"Read correlation id from message.\n\n@param message the message\n@return the CorrelationId as string",
"Make all elements of a String array lower case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements lower case",
"This method is called by th... |
protected boolean isSavedConnection(DatabaseConnection connection) {
NestedConnection currentSaved = specialConnection.get();
if (currentSaved == null) {
return false;
} else if (currentSaved.connection == connection) {
// ignore the release when we have a saved connection
return true;
} else {
retu... | [
"Return true if the connection being released is the one that has been saved."
] | [
"Modify the transform's current rotation in quaternion terms, around a\npivot other than the origin.\n\n@param quatW\n'W' component of the rotation quaternion.\n@param quatX\n'X' component of the rotation quaternion.\n@param quatY\n'Y' component of the rotation quaternion.\n@param quatZ\n'Z' component of the rotati... |
private boolean isRelated(Task task, List<Relation> list)
{
boolean result = false;
for (Relation relation : list)
{
if (relation.getTargetTask().getUniqueID().intValue() == task.getUniqueID().intValue())
{
result = true;
break;
}
}
ret... | [
"Internal method used to test for the existence of a relationship\nwith a task.\n\n@param task target task\n@param list list of relationships\n@return boolean flag"
] | [
"Returns new instance of OptionalValue with given key and value\n@param key resource key of the created value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue with given key",
"Executes a API query action to get a new token.\nThe method only execut... |
protected void updateRotator(DMatrixRMaj Q , int m, int n, double c, double s) {
int rowA = m*Q.numCols;
int rowB = n*Q.numCols;
// for( int i = 0; i < Q.numCols; i++ ) {
// double a = Q.get(rowA+i);
// double b = Q.get(rowB+i);
// Q.set( rowA+i, c*a + s*b);
// ... | [
"Multiplied a transpose orthogonal matrix Q by the specified rotator. This is used\nto update the U and V matrices. Updating the transpose of the matrix is faster\nsince it only modifies the rows.\n\n\n@param Q Orthogonal matrix\n@param m Coordinate of rotator.\n@param n Coordinate of rotator.\n@param c cosine of... | [
"Gets a single byte return or -1 if no data is available.",
"Use this API to fetch all the tmsessionparameter resources that are configured on netscaler.",
"Utility function to zip the content of an entire folder, but not the folder itself.\n@param folder\n@param fileName optional\n@return success or not",
"C... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.