query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
private void ensureReferencedFKs(ModelDef modelDef, CollectionDescriptorDef collDef) throws ConstraintException
{
String elementClassName = collDef.getProperty(PropertyHelper.OJB_PROPERTY_ELEMENT_CLASS_REF);
ClassDescriptorDef elementClassDef = modelDef.getClass(elementClassName);
... | [
"Ensures that the foreign keys required by the given collection are present in the element class.\n\n@param modelDef The model\n@param collDef The collection\n@throws ConstraintException If there is a problem with the foreign keys"
] | [
"Removes any child object that has the given name by performing\ncase-sensitive search.\n\n@param name name of scene object to be removed.\n\n@return number of removed objects, 0 if none was found.",
"Add the given, single header value under the given name.\n@param headerName the header name\n@param headerValue t... |
private static String getFileName(@Nullable final MapPrinter mapPrinter, final PJsonObject spec) {
String fileName = spec.optString(Constants.OUTPUT_FILENAME_KEY);
if (fileName != null) {
return fileName;
}
if (mapPrinter != null) {
final Configuration config = m... | [
"Read filename from spec."
] | [
"Adjusts beforeIndex to account for the possibility that the given widget is\nalready a child of this panel.\n\n@param child the widget that might be an existing child\n@param beforeIndex the index at which it will be added to this panel\n@return the modified index",
"set the textColor of the ColorHolder to a vie... |
public ILog getLog(String topic, int partition) {
TopicNameValidator.validate(topic);
Pool<Integer, Log> p = getLogPool(topic, partition);
return p == null ? null : p.get(partition);
} | [
"Get the log if exists or return null\n\n@param topic topic name\n@param partition partition index\n@return a log for the topic or null if not exist"
] | [
"Initialises JMX stuff.\n@param doRegister if true, perform registration, if false unregister",
"Return the NTSC gray level of an RGB value.\n@param rgb1 the input pixel\n@return the gray level (0-255)",
"Read a two byte integer from the data.\n\n@param offset current offset into data block\n@param data data bl... |
private int getPrototypeIndex(Renderer renderer) {
int index = 0;
for (Renderer prototype : prototypes) {
if (prototype.getClass().equals(renderer.getClass())) {
break;
}
index++;
}
return index;
} | [
"Return the index associated to the Renderer.\n\n@param renderer used to search in the prototypes collection.\n@return the prototype index associated to the renderer passed as argument."
] | [
"Calculate the file to compile a jasper report template to.\n\n@param configuration the configuration for the current app.\n@param jasperFileXml the jasper report template in xml format.\n@param extension the extension of the compiled report template.\n@param logger the logger to log errors to if an occur.",
"Upd... |
public WebSocketContext sendToTagged(String message, String tag, boolean excludeSelf) {
return sendToConnections(message, tag, manager.tagRegistry(), excludeSelf);
} | [
"Send message to all connections labeled with tag specified.\n\n@param message the message to be sent\n@param tag the string that tag the connections to be sent\n@param excludeSelf specify whether the connection of this context should be send\n@return this context"
] | [
"Returns the negative of the input variable",
"Use this API to unset the properties of sslcertkey resources.\nProperties that need to be unset are specified in args array.",
"Removes all elements in the sorted set with a score in the given range.\n@param scoreRange\n@return the number of elements removed.",
"... |
public void registerDropPasteWorker(DropPasteWorkerInterface worker)
{
this.dropPasteWorkerSet.add(worker);
defaultDropTarget.setDefaultActions(
defaultDropTarget.getDefaultActions()
| worker.getAcceptableActions(defaultDropTarget.getComponent())
... | [
"Register a new DropPasteWorkerInterface.\n@param worker The new worker"
] | [
"Record a prepare operation timeout.\n\n@param failedOperation the prepared operation",
"Determines if this value is the default value for the given field type.\n\n@param type field type\n@param value value\n@return true if the value is not default",
"Sends the collected dependencies over to the master and reco... |
private ProjectCalendar getResourceCalendar(Integer calendarID)
{
ProjectCalendar result = null;
if (calendarID != null)
{
ProjectCalendar calendar = m_calMap.get(calendarID);
if (calendar != null)
{
//
// If the resource is linked to a base calend... | [
"Retrieve the correct calendar for a resource.\n\n@param calendarID calendar ID\n@return calendar for resource"
] | [
"Returns a flag indicating if also unreleased resources should be found.\n@return A flag indicating if also unreleased resources should be found.",
"This is a service method that takes care of putting al the target values in a single array.\n@return",
"This method is called to format a currency value.\n\n@param... |
private List<CmsGitConfiguration> readConfigFiles() {
List<CmsGitConfiguration> configurations = new LinkedList<CmsGitConfiguration>();
// Default configuration file for backwards compatibility
addConfigurationIfValid(configurations, new File(DEFAULT_CONFIG_FILE));
// All files in the... | [
"Read all configuration files.\n@return the list with all available configurations"
] | [
"Create a request for elevations for samples along a path.\n\n@param req\n@param callback",
"Answer a List of InCriteria based on values, each InCriteria\ncontains only inLimit values\n@param attribute\n@param values\n@param negative\n@param inLimit the maximum number of values for IN (-1 for no limit)\n@return L... |
private static JSONObject parseStencilSet(StencilSet stencilSet) throws JSONException {
if (stencilSet != null) {
JSONObject stencilSetObject = new JSONObject();
stencilSetObject.put("url",
stencilSet.getUrl().toString());
stencilSetObject.pu... | [
"Delivers the correct JSON Object for the Stencilset\n\n@param stencilSet\n@throws org.json.JSONException"
] | [
"Add a property with the given name and the given list of values to this Properties object. Name\nand values are trimmed before the property is added.\n\n@param name the name of the property, must not be <code>null</code>.\n@param values the values of the property, must no be <code>null</code>,\nnone of the values... |
public static final double getDouble(String value)
{
return (value == null || value.length() == 0 ? 0 : Double.parseDouble(value));
} | [
"This method retrieves a double value from a String instance.\nIt returns zero by default if a null value or an empty string is supplied.\n\n@param value string representation of a double\n@return double value"
] | [
"Use this API to fetch all the cachecontentgroup resources that are configured on netscaler.",
"Sets the actual path for this ID\n\n@param pathId ID of path\n@param path value of path",
"This method extracts task data from an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Used to populate Map wi... |
public final Processor.ExecutionContext print(
final String jobId, final PJsonObject specJson, final OutputStream out)
throws Exception {
final OutputFormat format = getOutputFormat(specJson);
final File taskDirectory = this.workingDirectories.getTaskDirectory();
try {
... | [
"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."
] | [
"Changes the message of this comment.\n@param newMessage the new message for this comment.\n@return updated info about this comment.",
"Returns the y-coordinate of a vertex position.\n\n@param vertex the vertex index\n@return the y coordinate",
"Handles subscription verification callback from Facebook.\n@param... |
public static IndexableTaskItem create(final FunctionalTaskItem taskItem) {
return new IndexableTaskItem() {
@Override
protected Observable<Indexable> invokeTaskAsync(TaskGroup.InvocationContext context) {
FunctionalTaskItem.Context fContext = new FunctionalTaskItem.Conte... | [
"Creates an IndexableTaskItem from provided FunctionalTaskItem.\n\n@param taskItem functional TaskItem\n@return IndexableTaskItem"
] | [
"Set the background color of the progress spinner disc.\n\n@param colorRes Resource id of the color.",
"Run a task once, after a delay.\n\n@param task\nTask to run.\n@param delay\nUnit is seconds.\n@return An interface that lets you query the status; cancel; or\nreschedule the event.",
"Returns the Euclidean di... |
public static double[][] pseudoInverse(double[][] matrix){
if(isSolverUseApacheCommonsMath) {
// Use LU from common math
SingularValueDecomposition svd = new SingularValueDecomposition(new Array2DRowRealMatrix(matrix));
double[][] matrixInverse = svd.getSolver().getInverse().getData();
return matrixInver... | [
"Pseudo-Inverse of a matrix calculated in the least square sense.\n\n@param matrix The given matrix A.\n@return pseudoInverse The pseudo-inverse matrix P, such that A*P*A = A and P*A*P = P"
] | [
"Use this API to fetch ipset resource of given name .",
"Set the html as value inside the tooltip.",
"Cause the container to be cleaned up, including all registered bean\nmanagers, and all deployment services",
"This method is called from the task class each time an attribute\nis added, ensuring that all of t... |
public static base_response enable(nitro_service client, String id) throws Exception {
Interface enableresource = new Interface();
enableresource.id = id;
return enableresource.perform_operation(client,"enable");
} | [
"Use this API to enable Interface of given name."
] | [
"Draw text in the center of the specified box.\n\n@param text text\n@param font font\n@param box box to put text int\n@param fontColor colour",
"Returns real unquoted value for a DisplayValue\n@param key\n@return",
"Creates a db handling object.\n\n@return The db handling object\n@throws BuildException If the h... |
@SuppressForbidden("legitimate sysstreams.")
private static void redirectStreams(final Serializer serializer, final boolean flushFrequently) {
final PrintStream origSysOut = System.out;
final PrintStream origSysErr = System.err;
// Set warnings stream to System.err.
warnings = System.err;
AccessC... | [
"Redirect standard streams so that the output can be passed to listeners."
] | [
"Process StepFinishedEvent. Change last added to stepStorage step\nand add it as child of previous step.\n\n@param event to process",
"Returns the local collection representing the given namespace for raw document operations.\n\n@param namespace the namespace referring to the local collection.\n@return the local ... |
private void deliverFoundAnnouncement(final DeviceAnnouncement announcement) {
for (final DeviceAnnouncementListener listener : getDeviceAnnouncementListeners()) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
try {
... | [
"Send a device found announcement to all registered listeners.\n\n@param announcement the message announcing the new device"
] | [
"Split an artifact gavc to get the groupId\n@param gavc\n@return String",
"Creates metadata on this file in the specified template type.\n\n@param typeName the metadata template type name.\n@param metadata the new metadata values.\n@return the metadata returned from the server.",
"Creates the main component of ... |
public boolean uploadConfigurationAndProfile(String fileName, String odoImport) {
File file = new File(fileName);
MultipartEntityBuilder multipartEntityBuilder = MultipartEntityBuilder.create();
FileBody fileBody = new FileBody(file, ContentType.MULTIPART_FORM_DATA);
multipartEntityBuild... | [
"Upload file and set odo overrides and configuration of odo\n\n@param fileName File containing configuration\n@param odoImport Import odo configuration in addition to overrides\n@return If upload was successful"
] | [
"Given a set of versions, constructs a resolved list of versions based on\nthe compare function above\n\n@param values\n@return list of values after resolution",
"Returns the value of this product under the given model.\n\n@param evaluationTime Evaluation time.\n@param model The model.\n@return Value of this prod... |
public static base_responses update(nitro_service client, nd6ravariables resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
nd6ravariables updateresources[] = new nd6ravariables[resources.length];
for (int i=0;i<resources.length;i++){
updateresou... | [
"Use this API to update nd6ravariables resources."
] | [
"Performs an inline lower Cholesky decomposition on an inner row-major matrix. Only\nthe lower triangular portion of the matrix is read or written to.\n\n@param T Array containing an inner row-major matrix. Modified.\n@param indexT First index of the inner row-major matrix.\n@param n Number of rows and columns o... |
public static base_response add(nitro_service client, nspbr6 resource) throws Exception {
nspbr6 addresource = new nspbr6();
addresource.name = resource.name;
addresource.td = resource.td;
addresource.action = resource.action;
addresource.srcipv6 = resource.srcipv6;
addresource.srcipop = resource.srcipop;
... | [
"Use this API to add nspbr6."
] | [
"Calculate the child size along the axis\n@param dataIndex data index\n@param axis {@link Axis}\n@return child size",
"Process an update packet from one of the CDJs. See if it has a valid track loaded; if not, clear any\nmetadata we had stored for that player. If so, see if it is the same track we already know ab... |
protected List splitInCriteria(Object attribute, Collection values, boolean negative, int inLimit)
{
List result = new ArrayList();
Collection inCollection = new ArrayList();
if (values == null || values.isEmpty())
{
// OQL creates empty Criteria for late binding
... | [
"Answer a List of InCriteria based on values, each InCriteria\ncontains only inLimit values\n@param attribute\n@param values\n@param negative\n@param inLimit the maximum number of values for IN (-1 for no limit)\n@return List of InCriteria"
] | [
"Return all levels of moneyness for which data exists.\nMoneyness is returned as actual difference strike - par swap rate.\n\n@return The levels of moneyness as difference of strike to par swap rate.",
"Creates an encryptor for queryable text strings that uses standard password-based encryption. Uses a shared, or... |
private void registerChildInternal(IgnoreDomainResourceTypeResource child) {
child.setParent(this);
children.put(child.getName(), child);
} | [
"call with lock on 'children' held"
] | [
"Find the fields in which the Activity ID and Activity Type are stored.",
"Select this tab item.",
"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",
"Return a new File object based on the baseDi... |
private void readBlock(int blockIndex, int startIndex, int blockLength) throws Exception
{
logBlock(blockIndex, startIndex, blockLength);
if (blockLength < 128)
{
readTableBlock(startIndex, blockLength);
}
else
{
readColumnBlock(startIndex, blockLength);
}... | [
"Read a block of data from the FastTrack file and determine if\nit contains a table definition, or columns.\n\n@param blockIndex index of the current block\n@param startIndex start index of the block in the file\n@param blockLength block length"
] | [
"Returns the log message id used by this checker. This is used to group it so that all attributes failing a type of rejction\nend up in the same error message. This default implementation uses the formatted log message with an empty attribute map as the id.\n\n@return the log message id",
"Add the line to the con... |
private void setExceptions(ProjectCalendar mpxjCalendar, Calendars gpCalendar)
{
List<net.sf.mpxj.ganttproject.schema.Date> dates = gpCalendar.getDate();
for (net.sf.mpxj.ganttproject.schema.Date date : dates)
{
addException(mpxjCalendar, date);
}
} | [
"Add exceptions to the calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param gpCalendar GanttProject calendar"
] | [
"Use this API to add nsacl6.",
"returns a collection of Reader LockEntries for object obj.\nIf now LockEntries could be found an empty Vector is returned.",
"Returns a compact representation of all of the subtasks of a task.\n\n@param task The task to get the subtasks of.\n@return Request object",
"Calculate... |
public static void applyToOrTransparent(ColorHolder colorHolder, Context ctx, GradientDrawable gradientDrawable) {
if (colorHolder != null && gradientDrawable != null) {
colorHolder.applyTo(ctx, gradientDrawable);
} else if (gradientDrawable != null) {
gradientDrawable.setColor(C... | [
"a small static helper to set the color to a GradientDrawable null save\n\n@param colorHolder\n@param ctx\n@param gradientDrawable"
] | [
"to check availability, then class name is truncated to bundle id",
"Helper to return the first item in the iterator or null.\n\n@return T the first item or null.",
"Configures a RequestBuilder to send an RPC request.\n\n@param <T> return type for the AsyncCallback\n@param responseReader instance used to read t... |
private static String quoteSort(Sort[] sort) {
LinkedList<String> sorts = new LinkedList<String>();
for (Sort pair : sort) {
sorts.add(String.format("{%s: %s}", Helpers.quote(pair.getName()), Helpers.quote(pair.getOrder().toString())));
}
return sorts.toString();
} | [
"sorts are a bit more awkward and need a helper..."
] | [
"Create the grid feature type.\n\n@param mapContext the map context containing the information about the map the grid will be\nadded to.\n@param geomClass the geometry type",
"Returns new boolean matrix with true or false values selected with equal probability.\n\n@param numRow Number of rows in the new matrix.\n... |
public void writeNameValuePair(String name, String value) throws IOException
{
internalWriteNameValuePair(name, escapeString(value));
} | [
"Write a string attribute.\n\n@param name attribute name\n@param value attribute value"
] | [
"Returns the configured body or the default value.",
"Changes the volume of an existing sound.\n@param volume volume value. Should range from 0 (mute) to 1 (max)",
"Helper method that stores in a hash map how often a certain key occurs.\nIf the key has not been encountered yet, a new entry is created for it in\... |
public static base_response update(nitro_service client, clusterinstance resource) throws Exception {
clusterinstance updateresource = new clusterinstance();
updateresource.clid = resource.clid;
updateresource.deadinterval = resource.deadinterval;
updateresource.hellointerval = resource.hellointerval;
updater... | [
"Use this API to update clusterinstance."
] | [
"Retrieve a specific row by index number, creating a blank row if this row does not exist.\n\n@param index index number\n@return MapRow instance",
"Set source url for a server\n\n@param newUrl new URL\n@param id Server ID",
"The handling method.",
"Remove a role from the list of defined roles.\n\n@param roleN... |
public DynamicReport build() {
if (built) {
throw new DJBuilderException("DynamicReport already built. Cannot use more than once.");
} else {
built = true;
}
report.setOptions(options);
if (!globalVariablesGroup.getFooterVariables().isEmpty() || !globalV... | [
"Builds the DynamicReport object. Cannot be used twice since this produced\nundesired results on the generated DynamicReport object\n\n@return"
] | [
"Returns the timestamp for the time at which the suite finished executing.\nThis is determined by finding the latest end time for each of the individual\ntests in the suite.\n@param suite The suite to find the end time of.\n@return The end time (as a number of milliseconds since 00:00 1st January 1970 UTC).",
"In... |
public void fire(TestCaseEvent event) {
TestCaseResult testCase = testCaseStorage.get();
event.process(testCase);
notifier.fire(event);
} | [
"Process TestCaseEvent. You can change current testCase context\nusing this method.\n\n@param event to process"
] | [
"Returns the field definition with the specified name.\n\n@param name The name of the desired field\n@return The field definition or <code>null</code> if there is no such field",
"Computes the eigenvalue of the provided tridiagonal matrix. Note that only the upper portion\nneeds to be tridiagonal. The bottom di... |
private void readRelationships(Document cdp)
{
for (Link link : cdp.getLinks().getLink())
{
readRelationship(link);
}
} | [
"Read all task relationships from a ConceptDraw PROJECT file.\n\n@param cdp ConceptDraw PROJECT file"
] | [
"This method is used by non-blocking code to determine if the give buffer\nrepresents a complete request. Because the non-blocking code can by\ndefinition not just block waiting for more data, it's possible to get\npartial reads, and this identifies that case.\n\n@param buffer Buffer to check; the buffer is reset t... |
public static bridgegroup_nsip_binding[] get(nitro_service service, Long id) throws Exception{
bridgegroup_nsip_binding obj = new bridgegroup_nsip_binding();
obj.set_id(id);
bridgegroup_nsip_binding response[] = (bridgegroup_nsip_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch bridgegroup_nsip_binding resources of given name ."
] | [
"Add a user by ID to the list of people to notify when the retention period is ending.\n@param userID The ID of the user to add to the list.",
"Finds or creates a ResourceStorageLoadable for the given resource.\nClients should first call shouldLoadFromStorage to check whether there exists a storage version\nof th... |
public String putProperty(String key,
String value) {
return this.getProperties().put(key,
value);
} | [
"changes an existing property with the same name, or adds a new one\n@param key property name with which the specified value is to be\nassociated\n@param value value to be associated with the specified property name\n@return the previous value associated with property name, or null if\nthere was no mapping for prop... | [
"Verify that all OGM custom externalizers are present.\nN.B. even if some Externalizer is only needed in specific configuration,\nit is not safe to start a CacheManager without one as the same CacheManager\nmight be used, or have been used in the past, to store data using a different\nconfiguration.\n\n@see Externa... |
private void centerOnCurrentItem() {
if(!mPieData.isEmpty()) {
PieModel current = mPieData.get(getCurrentItem());
int targetAngle;
if(mOpenClockwise) {
targetAngle = (mIndicatorAngle - current.getStartAngle()) - ((current.getEndAngle() - current.getStartAngle... | [
"Kicks off an animation that will result in the pointer being centered in the\npie slice of the currently selected item."
] | [
"It will look for all the deployments under the deploymentsRootAddress with a runtimeName in the specified list of\nruntime names and then transform the operation so that every server having those deployments will redeploy the\naffected deployments.\n\n@see #transformOperation\n@param removeOperation\n@param contex... |
@Override
public CopticDate date(int prolepticYear, int month, int dayOfMonth) {
return CopticDate.of(prolepticYear, month, dayOfMonth);
} | [
"Obtains a local date in Coptic calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Coptic local date, not null\n@throws DateTimeException if unable to create t... | [
"Gets a byte within this sequence of bytes\n\n@param i index into sequence\n@return byte\n@throws IllegalArgumentException if i is out of range",
"Send a beat grid update announcement to all registered listeners.\n\n@param player the player whose beat grid information has changed\n@param beatGrid the new beat gri... |
private void bumpScores(Map<Long, Score> candidates,
List<Bucket> buckets,
int ix) {
for (; ix < buckets.size(); ix++) {
Bucket b = buckets.get(ix);
if (b.nextfree > CUTOFF_FACTOR_2 * candidates.size())
return;
double score = b.getScore()... | [
"Goes through the buckets from ix and out, checking for each\ncandidate if it's in one of the buckets, and if so, increasing\nits score accordingly. No new candidates are added."
] | [
"Creates an attachment from a given array of bytes.\nThe bytes will be Base64 encoded.\n@throws java.lang.IllegalArgumentException if mediaType is not binary",
"Use this API to fetch all the responderpolicy resources that are configured on netscaler.",
"Helper to format term updates as expected by the Wikibase ... |
public String findPlatformFor(String jdbcSubProtocol, String jdbcDriver)
{
String platform = (String)jdbcSubProtocolToPlatform.get(jdbcSubProtocol);
if (platform == null)
{
platform = (String)jdbcDriverToPlatform.get(jdbcDriver);
}
return platform;
} | [
"Derives the OJB platform to use for a database that is connected via a url using the specified\nsubprotocol, and where the specified jdbc driver is used.\n\n@param jdbcSubProtocol The JDBC subprotocol used to connect to the database\n@param jdbcDriver The JDBC driver used to connect to the database\n@return T... | [
"Adds a new metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value.\n@return this metadata object.",
"The MapReduce framework should operate sequentially, so thread safety shouldn't be a problem.",
"Prints to a file. If the file does not exist, rew... |
private void addCheckBox(final String internalValue, String labelMessageKey) {
CmsCheckBox box = new CmsCheckBox(Messages.get().key(labelMessageKey));
box.setInternalValue(internalValue);
box.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
public void onValueChange(... | [
"Creates a check box and adds it to the week panel and the checkboxes.\n@param internalValue the internal value of the checkbox\n@param labelMessageKey key for the label of the checkbox"
] | [
"Clear the connection that was previously saved.\n\n@return True if the connection argument had been saved.",
"Register a new SingleServiceWrapperInterceptor for the bean being\nwrapped, associate it with the PerformanceMonitor and tell it which methods\nto intercept.\n\n@param source An Attribute node from the s... |
public GVRRenderData setDrawMode(int drawMode) {
if (drawMode != GL_POINTS && drawMode != GL_LINES
&& drawMode != GL_LINE_STRIP && drawMode != GL_LINE_LOOP
&& drawMode != GL_TRIANGLES && drawMode != GL_TRIANGLE_STRIP
&& drawMode != GL_TRIANGLE_FAN) {
t... | [
"Set the draw mode for this mesh. Default is GL_TRIANGLES.\n\n@param drawMode"
] | [
"returns array with all allowed values\n@return allowed values",
"Try to fire a given event on the Browser.\n\n@param eventable the eventable to fire\n@return true iff the event is fired",
"Retrieves the work variance.\n\n@return work variance",
"get the default profile\n\n@return representation of default pr... |
protected synchronized int loadSize() throws PersistenceBrokerException
{
PersistenceBroker broker = getBroker();
try
{
return broker.getCount(getQuery());
}
catch (Exception ex)
{
throw new PersistenceBrokerException(ex);
}
... | [
"Determines the number of elements that the query would return. Override this\nmethod if the size shall be determined in a specific way.\n\n@return The number of elements"
] | [
"Run the configured crawl. This method blocks until the crawl is done.\n\n@return the CrawlSession once the crawl is done.",
"Read the given number of bytes into a long\n\n@param bytes The byte array to read from\n@param offset The offset at which to begin reading\n@param numBytes The number of bytes to read\n@re... |
public static boolean blockAligned( int blockLength , DSubmatrixD1 A ) {
if( A.col0 % blockLength != 0 )
return false;
if( A.row0 % blockLength != 0 )
return false;
if( A.col1 % blockLength != 0 && A.col1 != A.original.numCols ) {
return false;
}
... | [
"Checks to see if the submatrix has its boundaries along inner blocks.\n\n@param blockLength Size of an inner block.\n@param A Submatrix.\n@return If it is block aligned or not."
] | [
"Returns the input to parse including the whitespace left to the cursor position since\nit may be relevant to the list of proposals for whitespace sensitive languages.",
"Returns a string that should be used as a label for the given property.\n\n@param propertyIdValue\nthe property to label\n@return the label",
... |
public void fireEvent(final WorkerEvent event, final Worker worker, final String queue, final Job job,
final Object runner, final Object result, final Throwable t) {
final ConcurrentSet<WorkerListener> listeners = this.eventListenerMap.get(event);
if (listeners != null) {
for (f... | [
"Notify all WorkerListeners currently registered for the given WorkerEvent.\n@param event the WorkerEvent that occurred\n@param worker the Worker that the event occurred in\n@param queue the queue the Worker is processing\n@param job the Job related to the event (only supply for JOB_PROCESS, JOB_EXECUTE, JOB_SUCCES... | [
"Function to compute the bias gradient for batch convolution",
"This produces a string with no compressed segments and all segments of full length,\nwhich is 3 characters for IPv4 segments.",
"Parses coordinates into a Spatial4j point shape.",
"Process the given batch of files and pass the results back to the... |
private synchronized void freeClient(Client client) {
int current = useCounts.get(client);
if (current > 0) {
timestamps.put(client, System.currentTimeMillis()); // Mark that it was used until now.
useCounts.put(client, current - 1);
if ((current == 1) && (idleLimit.... | [
"Decrements the client's use count, and makes it eligible for closing if it is no longer in use.\n\n@param client the dbserver connection client which is no longer being used for a task"
] | [
"returns array with length 3 and optional entries version, encoding, standalone",
"Retrieve an instance of the ResourceField class based on the data read from an\nMPX file.\n\n@param value value from an MS Project file\n@return instance of this class",
"Retrieve the default aliases to be applied to MPXJ task an... |
public static Node removePartitionFromNode(final Node node, Integer donatedPartition) {
return UpdateClusterUtils.removePartitionsFromNode(node, Sets.newHashSet(donatedPartition));
} | [
"Remove a partition from the node provided\n\n@param node The node from which we're removing the partition\n@param donatedPartition The partitions to remove\n@return The new node without the partition"
] | [
"Parses btch api response to create a list of BoxAPIResponse objects.\n@param batchResponse response of a batch api request\n@return list of BoxAPIResponses",
"Get photos from the user's contacts.\n\nThis method requires authentication with 'read' permission.\n\n@param count\nThe number of photos to return\n@para... |
private void initPropertyBundle() throws CmsLoaderException, CmsException, IOException {
for (Locale l : m_locales) {
String filePath = m_sitepath + m_basename + "_" + l.toString();
CmsResource resource = null;
if (m_cms.existsResource(
filePath,
... | [
"Initialization necessary for editing a property bundle.\n\n@throws CmsLoaderException thrown if loading a bundle file fails.\n@throws CmsException thrown if loading a bundle file fails.\n@throws IOException thrown if loading a bundle file fails."
] | [
"Gets information about the device pin.\n@param fields the fields to retrieve.\n@return info about the device pin.",
"This method extracts resource data from a Phoenix file.\n\n@param phoenixProject parent node for resources",
"Remove a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n... |
public DynamicReportBuilder setColspan(int colNumber, int colQuantity, String colspanTitle) {
this.setColspan(colNumber, colQuantity, colspanTitle, null);
return this;
} | [
"Set a colspan in a group of columns. First add the cols to the report\n\n@param colNumber the index of the col\n@param colQuantity the number of cols how i will take\n@param colspanTitle colspan title\n@return a Dynamic Report Builder\n@throws ColumnBuilderException When the index of the cols is out of\nbounds... | [
"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... |
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
// If the API level is less than 11, we can't rely on the view animation system to
// do the scrolling animation. Need to tick it here and call postInvalidate() until the scrolling is done.
if (Build.VERSION.SDK_... | [
"Implement this to do your drawing.\n\n@param canvas the canvas on which the background will be drawn"
] | [
"Invokes a closure passing it a new Sql instance created from the given JDBC connection URL.\nThe created connection will be closed if required.\n\n@param url a database url of the form\n<code>jdbc:<em>subprotocol</em>:<em>subname</em></code>\n@param c the Closure to call\n@see #newInstance(String)\n@throws SQLExce... |
public String addExtent(Properties attributes) throws XDocletException
{
String name = attributes.getProperty(ATTRIBUTE_NAME);
if (!_model.hasClass(name))
{
throw new XDocletException(Translator.getString(XDocletModulesOjbMessages.class,
... | [
"Adds an extent relation to the current class definition.\n\n@param attributes The attributes of the tag\n@return An empty string\n@exception XDocletException If an error occurs\n@doc.tag type=\"content\"\n@doc.param name=\"name\" optional=\"fal... | [
"Starts the named animation.\n@see GVRAvatar#stop(String)\n@see GVRAnimationEngine#start(GVRAnimation)",
"Checks if the name of the file follows the version-n format\n\n@param versionDir The directory\n@return Returns true if the name is correct, else false",
"Utility method used to convert a Number into a BigI... |
public Set<? extends AbstractBean<?, ?>> resolveSpecializedBeans(Bean<?> specializingBean) {
if (specializingBean instanceof AbstractClassBean<?>) {
AbstractClassBean<?> abstractClassBean = (AbstractClassBean<?>) specializingBean;
if (abstractClassBean.isSpecializing()) {
... | [
"Returns a set of beans specialized by this bean. An empty set is returned if this bean does not specialize another beans."
] | [
"Get the known locations where the secure keyring can be located.\nLooks through known locations of the GNU PG secure keyring.\n\n@return The location of the PGP secure keyring if it was found,\nnull otherwise",
"Insert a new value prior to the index location in the existing value array,\nincreasing the field len... |
public static PJsonObject parseSpec(final String spec) {
final JSONObject jsonSpec;
try {
jsonSpec = new JSONObject(spec);
} catch (JSONException e) {
throw new RuntimeException("Cannot parse the spec file: " + spec, e);
}
return new PJsonObject(jsonSpec, ... | [
"Parse the JSON string and return the object. The string is expected to be the JSON print data from the\nclient.\n\n@param spec the JSON formatted string.\n@return The encapsulated JSON object"
] | [
"Determines the encoding block groups for the specified data.",
"Request a scoped transactional token for a particular resource.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@param resource resource transactional token has access to.\n@return a BoxAPIConnection which ... |
protected void removeSequence(String sequenceName)
{
// lookup the sequence map for calling DB
Map mapForDB = (Map) sequencesDBMap.get(getBrokerForClass()
.serviceConnectionManager().getConnectionDescriptor().getJcdAlias());
if(mapForDB != null)
{
s... | [
"Remove the sequence for given sequence name.\n\n@param sequenceName Name of the sequence to remove."
] | [
"Choose from three numbers based on version.",
"Returns the full record for a single story.\n\n@param story Globally unique identifier for the story.\n@return Request object",
"Enable or disable this component.\n@param flag true to enable, false to disable.\n@see #enable()\n@see #disable()\n@see #isEnabled()",... |
private void queryDatabaseMetaData()
{
ResultSet rs = null;
try
{
Set<String> tables = new HashSet<String>();
DatabaseMetaData dmd = m_connection.getMetaData();
rs = dmd.getTables(null, null, null, null);
while (rs.next())
{
tables.add(rs.ge... | [
"Queries database meta data to check for the existence of\nspecific tables."
] | [
"Adds is Null criteria,\ncustomer_id is Null\nThe attribute will NOT be translated into column name\n\n@param column The column name to be used without translation",
"Safe write error response.\n\n@param channel the channel\n@param header the request header\n@param error the exception",
"Returns values aggre... |
protected Map<String, String> getGalleryOpenParams(
CmsObject cms,
CmsMessages messages,
I_CmsWidgetParameter param,
String resource,
long hashId) {
Map<String, String> result = new HashMap<String, String>();
result.put(I_CmsGalleryProviderConstants.CONFIG_GALLER... | [
"Returns the required gallery open parameters.\n\n@param cms an initialized instance of a CmsObject\n@param messages the dialog messages\n@param param the widget parameter to generate the widget for\n@param resource the resource being edited\n@param hashId the field id hash\n\n@return the gallery open parameters"
] | [
"Ask the specified player for the waveform preview in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param trackReference uniquely identifies the desired waveform preview\n@param failIfPassive will prevent the... |
public static boolean hasValidContentAdditionParameterDefined(ModelNode operation) {
for (String s : DeploymentAttributes.MANAGED_CONTENT_ATTRIBUTES.keySet()) {
if (operation.hasDefined(s)) {
return true;
}
}
return false;
} | [
"Checks to see if a valid deployment parameter has been defined.\n\n@param operation the operation to check.\n\n@return {@code true} of the parameter is valid, otherwise {@code false}."
] | [
"Read a FastTrack file.\n\n@param file FastTrack file",
"Retrieve an instance of the TaskField class based on the data read from an\nMPX file.\n\n@param value value from an MS Project file\n@return TaskField instance",
"read data from channel to buffer\n\n@param channel readable channel\n@param buffer bytebuff... |
public Collection<Argument> getArguments(final String key) {
final Collection<Argument> args = map.get(key);
if (args != null) {
return new ArrayList<>(args);
}
return Collections.emptyList();
} | [
"Gets the value for the key.\n\n@param key the key to check for the value\n\n@return the value or an empty collection if no values were set"
] | [
"Sets a property on this Javascript object for which the value is a\nJavascript object itself.\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property.",
"Logout the current session. After calling this method,\nthe session will be cleared",
"Non-blocking call\n\n@param k... |
public String convertToJavaString(String input, boolean useUnicode) {
int length = input.length();
StringBuilder result = new StringBuilder(length + 4);
for (int i = 0; i < length; i++) {
escapeAndAppendTo(input.charAt(i), useUnicode, result);
}
return result.toString();
} | [
"Escapes control characters with a preceding backslash.\nOptionally encodes special chars as unicode escape sequence.\nThe resulting string is safe to be put into a Java string literal between\nthe quotes."
] | [
"Gets the Square Euclidean distance between two points.\n\n@param x A point in space.\n@param y A point in space.\n@return The Square Euclidean distance between x and y.",
"Returns a list of metadata property paths.\n@return the list of metdata property paths.",
"Support the subscript operator for String.\n\n@p... |
protected String buildErrorSetMsg(Object obj, Object value, Field aField)
{
String eol = SystemUtils.LINE_SEPARATOR;
StringBuffer buf = new StringBuffer();
buf
.append(eol + "[try to set 'object value' in 'target object'")
.append(eol + "target obj class... | [
"Build a String representation of given arguments."
] | [
"This method is used to calculate the duration of work between two fixed\ndates according to the work schedule defined in the named calendar. The\ncalendar used is the \"Standard\" calendar. If this calendar does not exist,\nand exception will be thrown.\n\n@param startDate start of the period\n@param endDate end o... |
public static final UUID getUUID(InputStream is) throws IOException
{
byte[] data = new byte[16];
is.read(data);
long long1 = 0;
long1 |= ((long) (data[3] & 0xFF)) << 56;
long1 |= ((long) (data[2] & 0xFF)) << 48;
long1 |= ((long) (data[1] & 0xFF)) << 40;
long1 |= ((long) (d... | [
"Retrieve a UUID from an input stream.\n\n@param is input stream\n@return UUID instance"
] | [
"Load the installation state based on the identity\n\n@param installedIdentity the installed identity\n@return the installation state\n@throws IOException",
"Adjust the date according to the whole day options.\n\n@param date the date to adjust.\n@param isEnd flag, indicating if the date is the end of the event (i... |
public static void setTranslucentStatusFlag(Activity activity, boolean on) {
if (Build.VERSION.SDK_INT >= 19) {
setFlag(activity, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, on);
}
} | [
"helper method to set the TranslucentStatusFlag\n\n@param on"
] | [
"Load a cube map texture asynchronously.\n\nThis is the implementation of\n{@link GVRAssetLoader#loadCubemapTexture(GVRAndroidResource)} - it will\nusually be more convenient (and more efficient) to call that directly.\n\n@param gvrContext\nThe GVRF context\n@param textureCache\nTexture cache - may be {@code null}\... |
private String getProperty(String name) {
return System.getSecurityManager() == null ? System.getProperty(name) : doPrivileged(new ReadPropertyAction(name));
} | [
"Get a System property by its name.\n\n@param name the name of the wanted System property.\n@return the System property value - null if it is not defined."
] | [
"Set trimmed value.\n\n@param t Trimmed value.",
"Await service container stability ignoring thread interruption.\n\n@param timeout maximum period to wait for service container stability\n@param timeUnit unit in which {@code timeout} is expressed\n\n@throws java.util.concurrent.TimeoutException if service contain... |
private void writeAttributeTypes(String name, FieldType[] types) throws IOException
{
m_writer.writeStartObject(name);
for (FieldType field : types)
{
m_writer.writeNameValuePair(field.name().toLowerCase(), field.getDataType().getValue());
}
m_writer.writeEndObject();
} | [
"Generates a mapping between attribute names and data types.\n\n@param name name of the map\n@param types types to write"
] | [
"Guesses the best set to use at the specified index by looking at the surrounding sets. In general, characters in\nlower-numbered sets are more common, so we choose them if we can. If no good surrounding sets can be found, the default\nvalue returned is the first value from the valid set.\n\n@param index the curren... |
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("/graph/{name}/{version}")
public Response getModuleGraph(@PathParam("name") final String moduleName,
@PathParam("version") final String moduleVersion,
@Context final UriInfo uriInfo){
... | [
"Perform a module dependency graph of the target and return the graph as a JSON\n\n@param moduleName\n@param moduleVersion\n@param uriInfo\n@return Response"
] | [
"Returns the connection count by key specified in this registry\n\nNote it might count connections that are closed but not removed from registry yet\n\n@param key\nthe key\n@return connection count by key",
"Get replication document state for a given replication document ID.\n\n@param docId The replication docume... |
public Weld property(String key, Object value) {
properties.put(key, value);
return this;
} | [
"Set the configuration property.\n\n@param key\n@param value\n@return self\n@see #ARCHIVE_ISOLATION_SYSTEM_PROPERTY\n@see #SHUTDOWN_HOOK_SYSTEM_PROPERTY\n@see #DEV_MODE_SYSTEM_PROPERTY\n@see ConfigurationKey"
] | [
"Remove the S3 file that contains the domain controller data.\n\n@param directoryName the name of the directory that contains the S3 file",
"get the type signature corresponding to given class\n\n@param clazz\n@return",
"Converts the paged list.\n\n@param uList the resource list to convert from\n@return the con... |
protected Connection obtainInternalConnection(ConnectionHandle connectionHandle) throws SQLException {
boolean tryAgain = false;
Connection result = null;
Connection oldRawConnection = connectionHandle.getInternalConnection();
String url = this.getConfig().getJdbcUrl();
int acquireRetryAttempts = thi... | [
"Obtains a database connection, retrying if necessary.\n@param connectionHandle\n@return A DB connection.\n@throws SQLException"
] | [
"Returns the associated SQL WHERE statement.",
"Get a list of all methods.\n\n@return The method names\n@throws FlickrException",
"Filter on a search term. Can be course name, code or full ID. Must be at least 3 characters\n@param searchTerm Search term to filter by\n@return This object to allow adding more opt... |
public static java.sql.Time rollTime(java.util.Date startDate, int period, int amount) {
GregorianCalendar gc = new GregorianCalendar();
gc.setTime(startDate);
gc.add(period, amount);
return new java.sql.Time(gc.getTime().getTime());
} | [
"Roll the java.util.Time forward or backward.\n\n@param startDate - The start date\n@param period Calendar.YEAR etc\n@param amount - Negative to rollbackwards."
] | [
"Use this API to fetch csvserver_copolicy_binding resources of given name .",
"Saves meta tree, writes database root and flushes the log.\n\n@param metaTree mutable meta tree\n@param env enclosing environment\n@param expired expired loggables (database root to be added)\n@return database root loggable which... |
public static Face createTriangle(Vertex v0, Vertex v1, Vertex v2, double minArea) {
Face face = new Face();
HalfEdge he0 = new HalfEdge(v0, face);
HalfEdge he1 = new HalfEdge(v1, face);
HalfEdge he2 = new HalfEdge(v2, face);
he0.prev = he2;
he0.next = he1;
he1.p... | [
"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"
] | [
"Deletes all steps of scenario cases where a data table\nis generated to reduce the size of the data file.\nIn this case only the steps of the first scenario case are actually needed.",
"Overridden 'consume' method. Corresponding parent method will be called necessary number of times\n\n@param initialVars - a map... |
private <T> Observable<PollingState<T>> updateStateFromGetResourceOperationAsync(final PollingState<T> pollingState, String url) {
return pollAsync(url, pollingState.loggingContext())
.flatMap(new Func1<Response<ResponseBody>, Observable<PollingState<T>>>() {
@Override
... | [
"Polls from the provided URL and updates the polling state with the\npolling response.\n\n@param pollingState the polling state for the current operation.\n@param url the url to poll from\n@param <T> the return type of the caller."
] | [
"Use this API to fetch cmppolicylabel_policybinding_binding resources of given name .",
"Use this API to update gslbsite.",
"Add an index on the given collection and field\n\n@param collection the collection to use for the index\n@param field the field to use for the index\n@param asc the sorting di... |
protected void appendSQLClause(SelectionCriteria c, StringBuffer buf)
{
// BRJ : handle SqlCriteria
if (c instanceof SqlCriteria)
{
buf.append(c.getAttribute());
return;
}
// BRJ : criteria attribute is a query
if (c.getAttri... | [
"Answer the SQL-Clause for a SelectionCriteria\nIf the Criteria references a class with extents an OR-Clause is\nadded for each extent\n@param c SelectionCriteria"
] | [
"Use this API to fetch autoscalepolicy_binding resource of given name .",
"Returns the indices that would sort an array.\n\n@param array Array.\n@param ascending Ascending order.\n@return Array of indices.",
"Parses a duration and returns the corresponding number of milliseconds.\n\nDurations consist of a s... |
public Duration getStartSlack()
{
Duration startSlack = (Duration) getCachedValue(TaskField.START_SLACK);
if (startSlack == null)
{
Duration duration = getDuration();
if (duration != null)
{
startSlack = DateHelper.getVariance(this, getEarlyStart(), getLateSta... | [
"Retrieve the start slack.\n\n@return start slack"
] | [
"The transaction will be executed. While it is running, any semantic state change\nin the given resource will be ignored and the cache will not be cleared.",
"The grammar elements that may occur at the given offset.",
"You should use the server's time here. Otherwise you might get unexpected results.\n\nThe typ... |
public static base_responses add(nitro_service client, authenticationradiusaction resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
authenticationradiusaction addresources[] = new authenticationradiusaction[resources.length];
for (int i=0;i<resource... | [
"Use this API to add authenticationradiusaction resources."
] | [
"Find Flickr Places information by Place ID.\n\n@deprecated This method has been deprecated. It won't be removed but you should use {@link #getInfo(String, String)} instead.\n@param placeId\n@return A Location\n@throws FlickrException",
"Add a 'IS NULL' clause so the column must be null. '=' NULL does not work.",... |
@Override
public Object invoke(Object self, Method method, Method proceed, Object[] args) throws Throwable {
if ("destroy".equals(method.getName()) && Marker.isMarker(0, method, args)) {
if (bean.getEjbDescriptor().isStateful()) {
if (!reference.isRemoved()) {
... | [
"Looks up the EJB in the container and executes the method on it\n\n@param self the proxy instance.\n@param method the overridden method declared in the super class or\ninterface.\n@param proceed the forwarder method for invoking the overridden method. It\nis null if the overridden method is abstract or declare... | [
"This method writes data for a single calendar to an MSPDI file.\n\n@param bc Base calendar data\n@return New MSPDI calendar instance",
"Add the given person to the photo. Optionally, send in co-ordinates\n\n@param photoId\n@param userId\n@param bounds\n@throws FlickrException",
"Returns an attribute's list val... |
public TokenList extractSubList( Token begin , Token end ) {
if( begin == end ) {
remove(begin);
return new TokenList(begin,begin);
} else {
if( first == begin ) {
first = end.next;
}
if( last == end ) {
last = b... | [
"Removes elements from begin to end from the list, inclusive. Returns a new list which\nis composed of the removed elements"
] | [
"Parses the result and returns the failure description.\n\n@param result the result of executing an operation\n\n@return the failure description if defined, otherwise a new undefined model node\n\n@throws IllegalArgumentException if the outcome of the operation was successful",
"Compares two vectors and determine... |
private void updateBaseCalendarNames(List<Pair<ProjectCalendar, Integer>> baseCalendars, HashMap<Integer, ProjectCalendar> map)
{
for (Pair<ProjectCalendar, Integer> pair : baseCalendars)
{
ProjectCalendar cal = pair.getFirst();
Integer baseCalendarID = pair.getSecond();
Projec... | [
"The way calendars are stored in an MPP14 file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method ... | [
"Compare two versions\n\n@param other\n@return an integer: 0 if equals, -1 if older, 1 if newer\n@throws IncomparableException is thrown when two versions are not coparable",
"Process an operand value used in the definition of the graphical\nindicator criteria.\n\n@param index position in operand list\n@param typ... |
public static SpinXmlElement XML(Object input) {
return SpinFactory.INSTANCE.createSpin(input, DataFormats.xml());
} | [
"Creates a spin wrapper for a data input. The data format of the\ninput is assumed to be XML.\n\n@param input the input to wrap\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided (such as 'null')"
] | [
"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",
"Frees the temporary LOBs when an exception is raised in the application\nor when the LOBs are no longer needed. If the LOBs are ... |
protected void setRandom(double lower, double upper, Random generator) {
double range = upper - lower;
x = generator.nextDouble() * range + lower;
y = generator.nextDouble() * range + lower;
z = generator.nextDouble() * range + lower;
} | [
"Sets the elements of this vector to uniformly distributed random values\nin a specified range, using a supplied random number generator.\n\n@param lower\nlower random value (inclusive)\n@param upper\nupper random value (exclusive)\n@param generator\nrandom number generator"
] | [
"Processes the template for all extents of the current class.\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\"",
"Callback when each frame in the indicator animation sh... |
public Where<T, ID> lt(String columnName, Object value) throws SQLException {
addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value,
SimpleComparison.LESS_THAN_OPERATION));
return this;
} | [
"Add a '<' clause so the column must be less-than the value."
] | [
"return the workspace size needed for ctc",
"Returns a site record for the site of the given name, creating a new one\nif it does not exist yet.\n\n@param siteKey\nthe key of the site\n@return the suitable site record",
"Removes all events from table\n\n@param table the table to remove events",
"Parse a stri... |
private void ensureFields(ClassDescriptorDef classDef, Collection fields) throws ConstraintException
{
boolean forceVirtual = !classDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_GENERATE_REPOSITORY_INFO, true);
for (Iterator it = fields.iterator(); it.hasNext();)
{
Fi... | [
"Ensures that the specified fields are present in the given class.\n\n@param classDef The class to copy the fields into\n@param fields The fields to copy\n@throws ConstraintException If there is a conflict between the new fields and fields in the class"
] | [
"LRN cross-channel forward computation. Double parameters cast to tensor data type",
"Add key value pair to extra info\n\n@param key Key of new item\n@param value New value to add",
"Invokes the given configurator, obtaining the correct global context type via the datastore configuration type of\nthe current da... |
public void moveUp(I_CmsEditableGroupRow row) {
int index = m_container.getComponentIndex(row);
if (index > 0) {
m_container.removeComponent(row);
m_container.addComponent(row, index - 1);
}
updateButtonBars();
} | [
"Moves the given row up.\n\n@param row the row to move"
] | [
"Checks if there's exactly one option that exists among all opts.\n\n@param options OptionSet to checked\n@param opts List of options to be checked\n@throws VoldemortException",
"Adds a row to the internal storage, indexed by primary key.\n\n@param uniqueID unique ID of the row\n@param map row data as a simpe map... |
private void verityLicenseIsConflictFree(final DbLicense newComer) {
if(newComer.getRegexp() == null || newComer.getRegexp().isEmpty()) {
return;
}
final DbLicense existing = repoHandler.getLicense(newComer.getName());
final List<DbLicense> licenses = repoHandler.getAllLicen... | [
"Check if new license pattern is valid and doesn't match any existing one\n@param newComer License being added or edited\n@throws WebApplicationException if conflicts involving the newComer are detected"
] | [
"Set an attribute.\n\n@param name attribute name.\n@param value attribute value.",
"Summarizes balance for the given nodeId to PartitionCount.\n\n@param nodeIdToPartitionCount\n@param title for use in pretty string\n@return Pair: getFirst() is utility value to be minimized, getSecond() is\npretty summary string ... |
public void setStructuredAppendMessageId(String messageId) {
if (messageId != null && !messageId.matches("^[\\x21-\\x7F]+$")) {
throw new IllegalArgumentException("Invalid Aztec Code structured append message ID: " + messageId);
}
this.structuredAppendMessageId = messageId;
... | [
"If this Aztec Code symbol is part of a series of Aztec Code symbols appended in a structured format,\nthis method sets the unique message ID for the series. Values may not contain spaces and must contain\nonly printable ASCII characters. Message IDs are optional.\n\n@param messageId the unique message ID for the s... | [
"Perform the work of processing the various OperationContext.Stage queues, and then the DONE stage.",
"Updates the indices in the index buffer from a Java char array.\nAll of the entries of the input char array are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old in... |
public static Bitmap flip(Bitmap src) {
Matrix m = new Matrix();
m.preScale(-1, 1);
return Bitmap.createBitmap(src, 0, 0, src.getWidth(), src.getHeight(), m, false);
} | [
"Mirrors the given bitmap"
] | [
"Executes the given xpath and returns the result with the type specified.",
"Returns the URL to the property file that contains CRS definitions.\n\n@return The URL to the epsg file containing custom EPSG codes",
"Convert an object to a set.\n\n@param mapper the object mapper\n@param source ... |
public static void dumpClusterToFile(String outputDirName, String fileName, Cluster cluster) {
if(outputDirName != null) {
File outputDir = new File(outputDirName);
if(!outputDir.exists()) {
Utils.mkdirs(outputDir);
}
try {
FileUt... | [
"Prints a cluster xml to a file.\n\n@param outputDirName\n@param fileName\n@param cluster"
] | [
"Delivers the correct JSON Object for the dockers\n\n@param dockers\n@throws org.json.JSONException",
"Used to read the domain model when a slave host connects to the DC\n\n@param transformers the transformers for the host\n@param transformationInputs parameters for the transformation\n@param ignoredTransformatio... |
private boolean hasMultipleCostRates()
{
boolean result = false;
CostRateTable table = getCostRateTable();
if (table != null)
{
//
// We assume here that if there is just one entry in the cost rate
// table, this is an open ended rate which covers any work, it won't... | [
"Used to determine if multiple cost rates apply to this assignment.\n\n@return true if multiple cost rates apply to this assignment"
] | [
"Introspect the given object.\n\n@param obj object for introspection.\n\n@return a map containing object's field values.\n\n@throws IntrospectionException if an exception occurs during introspection\n@throws InvocationTargetException if property getter throws an exception\n@throws IllegalAccessException if property... |
private Class getDynamicProxyClass(Class baseClass) {
Class[] m_dynamicProxyClassInterfaces;
if (foundInterfaces.containsKey(baseClass)) {
m_dynamicProxyClassInterfaces = (Class[])foundInterfaces.get(baseClass);
} else {
m_dynamicProxyClassInterfaces = getInterfaces(... | [
"returns a dynamic Proxy that implements all interfaces of the\nclass described by this ClassDescriptor.\n\n@return Class the dynamically created proxy class"
] | [
"Exit reporting up to distributor, using information gained from status reports to the LineCountManager\n\n@return a boolean of whether this consumer should immediately exit",
"Get range around median containing specified percentage of values.\n@param values Values.\n@param percent Values percentage around median... |
public static Thumbor create(String host, String key) {
if (key == null || key.length() == 0) {
throw new IllegalArgumentException("Key must not be blank.");
}
return new Thumbor(host, key);
} | [
"Create a new instance for the specified host and encryption key.\n\n@see #create(String)"
] | [
"Parse currency.\n\n@param value currency value\n@return currency value",
"Use this API to unlink sslcertkey.",
"Use this API to clear configuration on netscaler.\n@param force clear confirmation without prompting.\n@param level clear config according to the level. eg: basic, extended, full\n@return status of t... |
private int[] readColorTable(int ncolors) {
int nbytes = 3 * ncolors;
int[] tab = null;
byte[] c = new byte[nbytes];
try {
rawData.get(c);
// Max size to avoid bounds checks.
tab = new int[MAX_BLOCK_SIZE];
int i = 0;
int j = 0... | [
"Reads color table as 256 RGB integer values.\n\n@param ncolors int number of colors to read.\n@return int array containing 256 colors (packed ARGB with full alpha)."
] | [
"Use this API to fetch cachepolicylabel_binding resource of given name .",
"Passes the Socket's InputStream and OutputStream to the closure. The\nstreams will be closed after the closure returns, even if an exception\nis thrown.\n\n@param socket a Socket\n@param closure a Closure\n@return the value returned by ... |
private void registerInterceptor(Node source,
String beanName,
BeanDefinitionRegistry registry) {
List<String> methodList = buildMethodList(source);
BeanDefinitionBuilder initializer =
BeanDefinitionBuilder.rootBeanDe... | [
"Register a new SingleServiceWrapperInterceptor for the bean being\nwrapped, associate it with the PerformanceMonitor and tell it which methods\nto intercept.\n\n@param source An Attribute node from the spring configuration\n@param beanName The name of the bean that this performance monitor is wrapped around\n@para... | [
"Read the metadata from a hadoop SequenceFile\n\n@param fs The filesystem to read from\n@param path The file to read from\n@return The metadata from this file",
"Computes the householder vector used in QR decomposition.\n\nu = x / max(x)\nu(0) = u(0) + |u|\nu = u / u(0)\n\n@param x Input vector. Unmodified.\n@re... |
private FieldDescriptor getFldFromJoin(TableAlias aTableAlias, String aColName)
{
FieldDescriptor fld = null;
// Search Join Structure for attribute
if (aTableAlias.joins != null)
{
Iterator itr = aTableAlias.joins.iterator();
while (itr.hasNext())
... | [
"Get FieldDescriptor from joined superclass."
] | [
"Start with specifying the artifactId",
"Sets the path of the edited file in the corresponding display.\n@param editedFilePath path of the edited file to set.",
"Sets the top padding character for all cells in the table.\n@param paddingTopChar new padding character, ignored if null\n@return this to allow chaini... |
public int scrollToItem(int position) {
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "scrollToItem position = %d", position);
scrollToPosition(position);
return mCurrentItemIndex;
} | [
"Scroll to the specific position\n@param position\n@return the new current item after the scrolling processed."
] | [
"Called after creating the first connection. The adapter should create its caches and do all initialization it requires. Most\nimportantly, the SQL query cache should be created.\n\n@param cnx\nan open ready to use connection to the database.",
"Handles a key change.\n\n@param event the key change event.\n@param ... |
private void setVerticalScrollbar(final CmsScrollBar scrollbar, int width) {
// Validate.
if ((scrollbar == m_scrollbar) || (scrollbar == null)) {
return;
}
// Detach new child.
scrollbar.asWidget().removeFromParent();
// Remove old child.
... | [
"Set the scrollbar used for vertical scrolling.\n\n@param scrollbar the scrollbar, or null to clear it\n@param width the width of the scrollbar in pixels"
] | [
"Creates the DAO if we have config information cached and caches the DAO.",
"Check exactly the week check-boxes representing the given weeks.\n@param weeksToCheck the weeks selected.",
"Get a property of type java.util.Properties or return the default if\nno such property is defined\n@param props properties\n@p... |
public void forAllIndexDescriptorDefinitions(String template, Properties attributes) throws XDocletException
{
for (Iterator it = _curClassDef.getIndexDescriptors(); it.hasNext(); )
{
_curIndexDescriptorDef = (IndexDescriptorDef)it.next();
generate(template);
}
... | [
"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.tag type=\"block\""
] | [
"updates the values for locking fields , BRJ\nhandles int, long, Timestamp\nrespects updateLock so locking field are only updated when updateLock is true\n@throws PersistenceBrokerException if there is an erros accessing obj field values",
"Use this API to update ntpserver resources.",
"Use this API to fetch dn... |
public void parseVersion( String version )
{
DefaultVersioning artifactVersion = new DefaultVersioning( version );
getLog().debug( "Parsed Version" );
getLog().debug( " major: " + artifactVersion.getMajor() );
getLog().debug( " minor: " + artifactVersion.getMinor() )... | [
"Parse a version String and add the components to a properties object.\n\n@param version the version to parse"
] | [
"Read a task from a ConceptDraw PROJECT file.\n\n@param projectIdentifier parent project identifier\n@param map outline number to task map\n@param task ConceptDraw PROJECT task",
"Tell a device to become tempo master.\n\n@param deviceNumber the device we want to take over the role of tempo master\n\n@throws IOExc... |
@AsParameterConverter
public Trader retrieveTrader(String name) {
for (Trader trader : traders) {
if (trader.getName().equals(name)) {
return trader;
}
}
return mockTradePersister().retrieveTrader(name);
} | [
"Method used as dynamical parameter converter"
] | [
"Throws an IllegalArgumentException when the given value is not true.\n@param value the value to assert if true\n@param message the message to display if the value is false\n@return the value",
"This function is intended to detect the subset of IOException which are not\nconsidered recoverable, in which case we w... |
static void setSingleParam(String key, String value, DbConn cnx)
{
QueryResult r = cnx.runUpdate("globalprm_update_value_by_key", value, key);
if (r.nbUpdated == 0)
{
cnx.runUpdate("globalprm_insert", key, value);
}
cnx.commit();
} | [
"Checks if a parameter exists. If it exists, it is updated. If it doesn't, it is created. Only works for parameters which key is\nunique. Will create a transaction on the given entity manager."
] | [
"From three tagNames, if one is under sectorTag and one under rowTag, returns the remaining one, which is supposedly the a box label. Otherwise,\nreturns null.",
"Generate the init script from the Artifactory URL.\n\n@return The generated script.",
"The only difference between version 1.5 and 1.6 of the schema ... |
public static double[][] diag(double[] vector){
// Note: According to the Java Language spec, an array is initialized with the default value, here 0.
double[][] diagonalMatrix = new double[vector.length][vector.length];
for(int index = 0; index < vector.length; index++) {
diagonalMatrix[index][index] = vecto... | [
"Generates a diagonal matrix with the input vector on its diagonal\n\n@param vector The given matrix A.\n@return diagonalMatrix The matrix with the vectors entries on its diagonal"
] | [
"Remove a key for all language versions. If a descriptor is present, the key is only removed in the descriptor.\n\n@param key the key to remove.\n@return <code>true</code> if removing was successful, <code>false</code> otherwise.",
"Use this API to fetch statistics of service_stats resource of given name .",
"G... |
@Override
public String printHelp() {
List<CommandLineParser<CI>> parsers = getChildParsers();
if (parsers != null && parsers.size() > 0) {
StringBuilder sb = new StringBuilder();
sb.append(processedCommand.printHelp(helpNames()))
.append(Config.getLineSep... | [
"Returns a usage String based on the defined command and options.\nUseful when printing \"help\" info etc."
] | [
"Converts a byte array to a hexadecimal string representation\n@param bb the byte array to convert\n@return string the string representation",
"Log a message with a throwable at the provided level.",
"Sets the database dialect.\n\n@param dialect\nthe database dialect",
"Check if the given class represents an ... |
public void deleteRebalancingState(RebalanceTaskInfo stealInfo) {
// acquire write lock
writeLock.lock();
try {
RebalancerState rebalancerState = getRebalancerState();
if(!rebalancerState.remove(stealInfo))
throw new IllegalArgumentException("Couldn't fin... | [
"Delete the partition steal information from the rebalancer state\n\n@param stealInfo The steal information to delete"
] | [
"Use this API to fetch all the gslbsite resources that are configured on netscaler.",
"Get the permission information for the specified photo.\n\nThis method requires authentication with 'read' permission.\n\n@param photoId\nThe photo id\n@return The Permissions object\n@throws FlickrException",
"Check if new l... |
public static java.sql.Time newTime() {
return new java.sql.Time(System.currentTimeMillis() % DAY_MILLIS);
} | [
"Create a new Time, with no date component."
] | [
"handle case where Instant is outside the bounds of OffsetDateTime",
"Returns the formula for the percentage\n@param group\n@param type\n@return",
"Checks that all the qualifiers in the set requiredQualifiers are in the set of qualifiers. Qualifier equality rules for\nannotation members are followed.\n\n@param ... |
public GVRTexture getSplashTexture(GVRContext gvrContext) {
Bitmap bitmap = BitmapFactory.decodeResource( //
gvrContext.getContext().getResources(), //
R.drawable.__default_splash_screen__);
GVRTexture tex = new GVRTexture(gvrContext);
tex.setImage(new GVRBitmapIm... | [
"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"
] | [
"appends a HAVING-clause to the Statement\n@param having\n@param crit\n@param stmt",
"Add a marker so we can recognize this as a metadata archive. I would use the ZipFile comment, but\nthat is not available until Java 7, and Beat Link is supposed to be backwards compatible with Java 6.\nSince we are doing this an... |
public String getPendingChanges() {
JsonObject jsonObject = this.getPendingJSONObject();
if (jsonObject == null) {
return null;
}
return jsonObject.toString();
} | [
"Gets a JSON string containing any pending changes to this object that can be sent back to the Box API.\n@return a JSON string containing the pending changes."
] | [
"Use this API to fetch a cmpglobal_cmppolicy_binding resources.",
"Returns an object which represents the data to be transferred. The class\nof the object returned is defined by the representation class of the flavor.\n\n@param flavor the requested flavor for the data\n@see DataFlavor#getRepresentationClass\n@ex... |
private static BindingType map2BindingType(String bindingId) {
BindingType type;
if (SOAP11_BINDING_ID.equals(bindingId)) {
type = BindingType.SOAP11;
} else if (SOAP12_BINDING_ID.equals(bindingId)) {
type = BindingType.SOAP12;
} else if (JAXRS_BINDING_ID.equals(b... | [
"Maps a bindingId to its corresponding BindingType.\n@param bindingId\n@return"
] | [
"Records that there is media mounted in a particular media player slot, updating listeners if this is a change.\nAlso send a query to the player requesting details about the media mounted in that slot, if we don't already\nhave that information.\n\n@param slot the slot in which media is mounted",
"Sets an attribu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.