query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
private FieldConversion[] getPkFieldConversion(ClassDescriptor cld)
{
FieldDescriptor[] pks = cld.getPkFields();
FieldConversion[] fc = new FieldConversion[pks.length];
for (int i= 0; i < pks.length; i++)
{
fc[i] = pks[i].getFieldConversion();
}
... | [
"Answer the FieldConversions for the PkFields\n@param cld\n@return the pk FieldConversions"
] | [
"Add statistics about sent emails.\n\n@param recipients The list of recipients.\n@param storageUsed If a remote storage was used.",
"Uncompresses the given textual content and writes it to the given file.\n\n@param file The file to write to\n@param compressedContent The content\n@throws IOException I... |
public static authenticationldappolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{
authenticationldappolicy_authenticationvserver_binding obj = new authenticationldappolicy_authenticationvserver_binding();
obj.set_name(name);
authenticationldappolicy_authenticationvse... | [
"Use this API to fetch authenticationldappolicy_authenticationvserver_binding resources of given name ."
] | [
"Add \"ORDER BY\" clause to the SQL query statement. This can be called multiple times to add additional \"ORDER BY\"\nclauses. Ones earlier are applied first.",
"Creates the event type.\n\n@param type the EventEnumType\n@return the event type",
"Start the actual migration. Take the version of the database, get... |
public static final String removeAmpersands(String name)
{
if (name != null)
{
if (name.indexOf('&') != -1)
{
StringBuilder sb = new StringBuilder();
int index = 0;
char c;
while (index < name.length())
{
c = na... | [
"Utility method to remove ampersands embedded in names.\n\n@param name name text\n@return name text without embedded ampersands"
] | [
"Returns the compact project records for all projects in the workspace.\n\n@param workspace The workspace or organization to find projects in.\n@return Request object",
"Add a new download. The download will start automatically once the download manager is\nready to execute it and connectivity is available.\n\n... |
public static Date min(Date d1, Date d2)
{
Date result;
if (d1 == null)
{
result = d2;
}
else
if (d2 == null)
{
result = d1;
}
else
{
result = (d1.compareTo(d2) < 0) ? d1 : d2;
}
return result;
... | [
"Returns the earlier of two dates, handling null values. A non-null Date\nis always considered to be earlier than a null Date.\n\n@param d1 Date instance\n@param d2 Date instance\n@return Date earliest date"
] | [
"Converts the results to CSV data.\n\n@return the CSV data",
"Return an instance of this class.\n\n@param container Solr CoreContainer container object in order to create a server object.\n\n@return instance of CmsSolrSpellchecker",
"this method is called from the event methods",
"Use this API to fetch nsacl6... |
public T insert(T entity) {
if (!hasPrimaryKey(entity)) {
throw new RuntimeException(String.format("Tried to insert entity of type %s with null or zero primary key",
entity.getClass().getSimpleName()));
}
InsertCreator insert = new InsertCreator(table);
... | [
"Insert entity object. The caller must first initialize the primary key\nfield."
] | [
"Update the anchor based on arcore best knowledge of the world\n\n@param scale",
"Use this API to fetch statistics of servicegroup_stats resource of given name .",
"Calculates the next snapshot version based on the current release version\n\n@param fromVersion The version to bump to next development version\n@r... |
public Duration getWork(Date startDate, Date endDate, TimeUnit format)
{
DateRange range = new DateRange(startDate, endDate);
Long cachedResult = m_workingDateCache.get(range);
long totalTime = 0;
if (cachedResult == null)
{
//
// We want the start date to be the earl... | [
"This method retrieves a Duration instance representing the amount of\nwork between two dates based on this calendar.\n\n@param startDate start date\n@param endDate end date\n@param format required duration format\n@return amount of work"
] | [
"Process encoded payload.\n\n@throws IOException Signals that an I/O exception has occurred.",
"Write a Byte Order Mark at the beginning of the file\n\n@param stream the FileOutputStream to write the BOM to\n@param bigEndian true if UTF 16 Big Endian or false if Low Endian\n@throws IOException if an IOExceptio... |
private void printKeySet() {
Set<?> keys = keySet();
System.out.println("printing keyset:");
for (Object o: keys) {
//System.out.println(Arrays.asList((Object[]) i.next()));
System.out.println(o);
}
} | [
"below is testing code"
] | [
"Generate a schedule for the given start and end date.\n\n@param referenceDate The reference date (corresponds to \\( t = 0 \\).\n@param startDate The start date.\n@param endDate The end date.\n@return The schedule",
"Exchanges the initial fully-formed messages which establishes the transaction context for querie... |
public static long get1D(DMatrixRMaj A , int n ) {
long before = System.currentTimeMillis();
double total = 0;
for( int iter = 0; iter < n; iter++ ) {
int index = 0;
for( int i = 0; i < A.numRows; i++ ) {
int end = index+A.numCols;
whil... | [
"Get by index is used here."
] | [
"sets the row reader class name for thie class descriptor",
"Write a relation list field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Read hints from a file.",
"Adds a child to this node and sets this node as its parent node.\n\n@param node The node to add.",
"if any item in... |
public static base_response unset(nitro_service client, snmpalarm resource, String[] args) throws Exception{
snmpalarm unsetresource = new snmpalarm();
unsetresource.trapname = resource.trapname;
return unsetresource.unset_resource(client,args);
} | [
"Use this API to unset the properties of snmpalarm resource.\nProperties that need to be unset are specified in args array."
] | [
"This method extracts calendar data from a Phoenix file.\n\n@param phoenixProject Root node of the Phoenix file",
"Converts any string into a string that is safe to use as a file name.\nThe result will only include ascii characters and numbers, and the \"-\",\"_\", and \".\" characters.",
"Sets the bootstrap UR... |
private void writeResource(Resource mpxj)
{
ResourceType xml = m_factory.createResourceType();
m_apibo.getResource().add(xml);
xml.setAutoComputeActuals(Boolean.TRUE);
xml.setCalculateCostFromUnits(Boolean.TRUE);
xml.setCalendarObjectId(getCalendarUniqueID(mpxj.getResourceCalendar()));... | [
"Write a single resource.\n\n@param mpxj Resource instance"
] | [
"Use this API to update autoscaleprofile.",
"Adds a new gender item and an initial name.\n\n@param entityIdValue\nthe item representing the gender\n@param name\nthe label to use for representing the gender",
"Create a rollback patch based on the recorded actions.\n\n@param patchId the new patch id, depending ... |
public boolean getEnterpriseFlag(int index)
{
return (BooleanHelper.getBoolean((Boolean) getCachedValue(selectField(TaskFieldLists.ENTERPRISE_FLAG, index))));
} | [
"Retrieve an enterprise field value.\n\n@param index field index\n@return field value"
] | [
"Retrieve the Activity ID value for this task.\n@param task Task instance\n@return Activity ID value",
"Tries to load a property file with the specified name.\n\n@param localizedName the name\n@return the resource bundle if it was loaded, otherwise the backup",
"returns the values of the orientation tag",
"Ut... |
public static DMatrixRMaj nullspaceQR( DMatrixRMaj A , int totalSingular ) {
SolveNullSpaceQR_DDRM solver = new SolveNullSpaceQR_DDRM();
DMatrixRMaj nullspace = new DMatrixRMaj(1,1);
if( !solver.process(A,totalSingular,nullspace))
throw new RuntimeException("Solver failed. try SVD ... | [
"Computes the null space using QR decomposition. This is much faster than using SVD\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space"
] | [
"Used to populate Map with given annotations\n\n@param annotations initial value for annotations",
"Read one collection element from the current row of the JDBC result set\n\n@param optionalOwner the collection owner\n@param optionalKey the collection key\n@param persister the collection persister\n@param descrip... |
@SuppressWarnings("WeakerAccess")
public synchronized void stop() {
if (isRunning()) {
MetadataFinder.getInstance().removeTrackMetadataListener(metadataListener);
running.set(false);
pendingUpdates.clear();
queueHandler.interrupt();
queueHandler = ... | [
"Stop finding beat grids for all active players."
] | [
"Connect to the HC and retrieve the current model updates.\n\n@param controller the server controller\n@param callback the operation completed callback\n\n@throws IOException for any error",
"Creates a string representation of the given node. Useful for debugging.\n\n@return a debug string for the given node.",
... |
public PlanarImage toDirectColorModel(RenderedImage img) {
BufferedImage dest = new BufferedImage(img.getWidth(), img.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);
BufferedImage source = new BufferedImage(img.getColorModel(), (WritableRaster) img.getData(), img
.getColorModel().isAlphaPremultiplied(), null);
C... | [
"Converts an image to a RGBA direct color model using a workaround via buffered image directly calling the\nColorConvert operation fails for unknown reasons ?!\n\n@param img image to convert\n@return converted image"
] | [
"Use this API to fetch all the callhome resources that are configured on netscaler.",
"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.",
... |
public void makePickable(GVRSceneObject sceneObject) {
try {
GVRMeshCollider collider = new GVRMeshCollider(sceneObject.getGVRContext(), false);
sceneObject.attachComponent(collider);
} catch (Exception e) {
// Possible that some objects (X3D panel nodes) are without ... | [
"Makes the scene object pickable by eyes. However, the object has to be touchable to process\nthe touch events.\n\n@param sceneObject"
] | [
"Converts a boolean array containing the pixel data in BINARY mode to an\ninteger array with the pixel data in RGB mode.\n\n@param binaryArray pixel binary data\n@return pixel integer data in RGB mode.",
"Adds all fields declared directly in the object's class to the output\n@return this",
"Update rows in the d... |
private String getRelativePomPath(MavenModule mavenModule, MavenModuleSetBuild mavenBuild) {
String relativePath = mavenModule.getRelativePath();
if (StringUtils.isBlank(relativePath)) {
return POM_NAME;
}
// If this is the root module, return the root pom path.
if (... | [
"Retrieve the relative path to the pom of the module"
] | [
"We need to distinguish the case where we're newly available and the case\nwhere we're already available. So we check the node status before we\nupdate it and return it to the caller.\n\n@param isAvailable True to set to available, false to make unavailable\n\n@return Previous value of isAvailable",
"Use this API... |
public static String getPrefix(String column) {
return column.contains( "." ) ? DOT_SEPARATOR_PATTERN.split( column )[0] : null;
} | [
"If the column name is a dotted column, returns the first part.\nReturns null otherwise.\n\n@param column the column that might have a prefix\n@return the first part of the prefix of the column or {@code null} if the column does not have a prefix."
] | [
"Stops the server. This method does nothing if the server is stopped already.",
"A convenience method for creating an immutable list\n\n@param self a List\n@return an immutable List\n@see java.util.Collections#unmodifiableList(java.util.List)\n@since 1.0",
"Makes object obj persistent in the underlying persiste... |
public static ActorSystem createAndGetActorSystem() {
if (actorSystem == null || actorSystem.isTerminated()) {
actorSystem = ActorSystem.create(PcConstants.ACTOR_SYSTEM, conf);
}
return actorSystem;
} | [
"Create and get actor system.\n\n@return the actor system"
] | [
"Retrieve and validate the timestamp value from the REST request.\n\"X_VOLD_REQUEST_ORIGIN_TIME_MS\" is timestamp header\n\nTODO REST-Server 1. Change Time stamp header to a better name.\n\n@return true if present, false if missing",
"Populate time ranges.\n\n@param ranges time ranges from a Synchro table\n@param... |
public BoxFolder.Info getFolderInfo(String folderID, String... fields) {
String queryString = new QueryStringBuilder().appendParam("fields", fields).toString();
URL url = FOLDER_INFO_URL_TEMPLATE.buildWithQuery(this.api.getBaseURL(), queryString, folderID);
BoxAPIRequest request = new BoxAPIRequ... | [
"Gets information about a trashed folder that's limited to a list of specified fields.\n@param folderID the ID of the trashed folder.\n@param fields the fields to retrieve.\n@return info about the trashed folder containing only the specified fields."
] | [
"Creates a simple, annotation defined Enterprise Web Bean using the annotations specified on type\n\n@param <T> The type\n@param beanManager the current manager\n@param type the AnnotatedType to use\n@return An Enterprise Web Bean",
"Retrieve the jdbc type for the field descriptor that is related\n... |
private String createPomPath(String relativePath, String moduleName) {
if (!moduleName.contains(".xml")) {
// Inside the parent pom, the reference is to the pom.xml file
return relativePath + "/" + POM_NAME;
}
// There is a reference to another xml file, which is not the ... | [
"Creates the actual path to the xml file of the module."
] | [
"Checks, if the end type is valid for the set pattern type.\n@return a flag, indicating if the end type is valid for the pattern type.",
"Helper. Current transaction is committed in some cases.",
"Set the pointer on the bar. With the Value value.\n\n@param value float between 0 and 1",
"Send a tempo changed a... |
private String commaSeparate(Collection<String> strings)
{
StringBuilder buffer = new StringBuilder();
Iterator<String> iterator = strings.iterator();
while (iterator.hasNext())
{
String string = iterator.next();
buffer.append(string);
if (iterator... | [
"Takes a list of Strings and combines them into a single comma-separated\nString.\n@param strings The Strings to combine.\n@return The combined, comma-separated, String."
] | [
"Parses a String comprised of 0 or more comma-delimited key=value pairs.\n\n@param s the string to parse\n@return the Map of parsed key value pairs",
"Returns the orthogonal U matrix.\n\n@param U If not null then the results will be stored here. Otherwise a new matrix will be created.\n@return The extracted Q ma... |
private void updateProjectProperties(Task task)
{
ProjectProperties props = m_projectFile.getProjectProperties();
props.setComments(task.getNotes());
} | [
"Update the project properties from the project summary task.\n\n@param task project summary task"
] | [
"Decide which donor node to steal from. This is a policy implementation.\nI.e., in the future, additional policies could be considered. At that\ntime, this method should be overridden in a sub-class, or a policy object\nought to implement this algorithm.\n\nCurrent policy:\n\n1) If possible, a stealer node that is ... |
public static sslvserver_sslcertkey_binding[] get(nitro_service service, String vservername) throws Exception{
sslvserver_sslcertkey_binding obj = new sslvserver_sslcertkey_binding();
obj.set_vservername(vservername);
sslvserver_sslcertkey_binding response[] = (sslvserver_sslcertkey_binding[]) obj.get_resources(s... | [
"Use this API to fetch sslvserver_sslcertkey_binding resources of given name ."
] | [
"Get components list for current instance\n@return components",
"Adds a resource collection with execution hints.",
"Return the project name or the default project name.",
"Get a list of people in a given photo.\n\n@param photoId\n@throws FlickrException",
"2-D Complex Gabor function.\n\n@param x ... |
public static final Date getDate(InputStream is) throws IOException
{
long timeInSeconds = getInt(is);
if (timeInSeconds == 0x93406FFF)
{
return null;
}
timeInSeconds -= 3600;
timeInSeconds *= 1000;
return DateHelper.getDateFromLong(timeInSeconds);
} | [
"Read a Synchro date from an input stream.\n\n@param is input stream\n@return Date instance"
] | [
"Returns a new analysis context builder that extracts the information about the available extensions from\nthe provided Revapi instance.\n\n<p>The extensions have to be known so that both old and new style of configuration can be usefully worked with.\n\n@param revapi the revapi instance to read the available exten... |
List<File> getRecursiveThriftFiles(MavenProject project, String outputDirectory, List<File> files) throws IOException {
HashFunction hashFun = Hashing.md5();
File dir = new File(new File(project.getFile().getParent(), "target"), outputDirectory);
if (dir.exists()) {
URI baseDir = getFileURI(dir);
... | [
"Walk project references recursively, adding thrift files to the provided list."
] | [
"Sets object for statement at specific index, adhering to platform- and null-rules.\n@param stmt the statement\n@param index the current parameter index\n@param value the value to set\n@param sqlType the JDBC SQL-type of the value\n@throws SQLException on platform error",
"disables the current active id, enables ... |
public static String writeSingleClientConfigAvro(Properties props) {
// TODO: Use a dedicated json lib. We shouldn't be manually manipulating json...
String avroConfig = "";
Boolean firstProp = true;
for(String key: props.stringPropertyNames()) {
if(firstProp) {
... | [
"Assembles an avro format string of single store config from store\nproperties\n\n@param props Store properties\n@return String in avro format that contains single store configs"
] | [
"Converts the List to PagedList.\n@param list list to be converted in to paged list\n@param <InnerT> the wrapper inner type\n@return the Paged list for the inner type.",
"Prepare the baseURL to make a request.\n\n@param matrixId matrixId\n@param row row\n@param col cold\n@param layerParam layerParam",
"Normaliz... |
public static void stop(){
//--Close logger
isClosed = true; // <- not a thread-safe boolean
Thread.yield(); //poor man's synchronization attempt (let everything else log that wants to)
Thread.yield();
//--Close Tracks
while(depth > 0){
depth -= 1;
//(send signal to handlers)... | [
"Stop Redwood, closing all tracks and prohibiting future log messages."
] | [
"Checks the preconditions for creating a new RequireSubStr processor with a List of Strings.\n\n@param requiredSubStrings\nthe required substrings\n@throws NullPointerException\nif requiredSubStrings or one of its elements is null\n@throws IllegalArgumentException\nif requiredSubStrings is empty",
"Flush the netw... |
private void logBlock(int blockIndex, int startIndex, int blockLength)
{
if (m_log != null)
{
m_log.println("Block Index: " + blockIndex);
m_log.println("Length: " + blockLength + " (" + Integer.toHexString(blockLength) + ")");
m_log.println();
m_log.println(FastTrackU... | [
"Log block data.\n\n@param blockIndex current block index\n@param startIndex start index\n@param blockLength length"
] | [
"Makes this pose the inverse of the input pose.\n@param src pose to invert.",
"2-D Double array to integer array.\n\n@param array Double array.\n@return Integer array.",
"Sets the category display options that affect how the category selection dialog is shown.\n\n@param displayCategoriesByRepository if true, th... |
public CliCommandBuilder setController(final String protocol, final String hostname, final int port) {
setController(formatAddress(protocol, hostname, port));
return this;
} | [
"Sets the protocol, hostname and port to connect to.\n\n@param protocol the protocol to use\n@param hostname the host name\n@param port the port\n\n@return the builder"
] | [
"Use this API to fetch nsrpcnode resources of given names .",
"Creates a ServiceCall from a paging operation.\n\n@param first the observable to the first page\n@param next the observable to poll subsequent pages\n@param callback the client-side callback\n@param <E> the element type\n@return the future based Servi... |
@Override
protected String getToken() {
GetAccessTokenResult token = accessToken.get();
if (token == null || isExpired(token)
|| (isAboutToExpire(token) && refreshInProgress.compareAndSet(false, true))) {
lock.lock();
try {
token = accessToken.get();
if (token == null || is... | [
"Attempts to return the token from cache. If this is not possible because it is expired or was\nnever assigned, a new token is requested and parallel requests will block on retrieving a new\ntoken. As such no guarantee of maximum latency is provided.\n\nTo avoid blocking the token is refreshed before it's expiratio... | [
"Fired whenever a browser event is received.\n@param event Event to process",
"Use this API to fetch cacheselector resources of given names .",
"Progress info message\n\n@param tag Message that precedes progress info. Indicate 'keys' or\n'entries'.",
"Process a file.\n\n@param file the file to be processed\n@... |
protected Violation createViolationForImport(SourceCode sourceCode, String className, String alias, String violationMessage) {
Map importInfo = ImportUtil.sourceLineAndNumberForImport(sourceCode, className, alias);
Violation violation = new Violation();
violation.setRule(this);
violation... | [
"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 alias - the alias for the import statement\n@param violationMessage - the violation message; may be ... | [
"Cancel the pause operation",
"Get a state handler for a given patching artifact.\n\n@param artifact the patching artifact\n@param <P>\n@param <S>\n@return the state handler, {@code null} if there is no handler registered for the given artifact",
"Adds a new role to the list of defined roles.\n\n@param roleName... |
private <T> T request(ClientRequest<T> delegate, String operationName) {
long startTimeMs = -1;
long startTimeNs = -1;
if(logger.isDebugEnabled()) {
startTimeMs = System.currentTimeMillis();
}
ClientRequestExecutor clientRequestExecutor = pool.checkout(destination);
... | [
"This method handles submitting and then waiting for the request from the\nserver. It uses the ClientRequest API to actually write the request and\nthen read back the response. This implementation will block for a\nresponse from the server.\n\n@param <T> Return type\n\n@param clientRequest ClientRequest implementat... | [
"Returns a list of all the eigenvalues",
"Sets the duration for the animation to be played.\n\n@param start the animation will start playing from the specified time\n@param end the animation will stop playing at the specified time\n\n@return {@code this}, so you can chain setProperty() calls.\n@throws IllegalArgu... |
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (position == super.getCount() && isEnableRefreshing()) {
return (mFooter);
}
return (super.getView(position, convertView, parent));
} | [
"Get a View that displays the data at the specified\nposition in the data set. In this case, if we are at\nthe end of the list and we are still in append mode, we\nask for a pending view and return it, plus kick off the\nbackground task to append more data to the wrapped\nadapter.\n\n@param position Position of ... | [
"Find the collision against a specific collider in a list of collisions.\n@param pickList collision list\n@param findme collider to find\n@return collision with the specified collider, null if not found",
"The sniffing Loggers are some special Loggers, whose level will be set to TRACE forcedly.\n@param logger",... |
public static void initializeDomainRegistry(final TransformerRegistry registry) {
//The chains for transforming will be as follows
//For JBoss EAP: 8.0.0 -> 5.0.0 -> 4.0.0 -> 1.8.0 -> 1.7.0 -> 1.6.0 -> 1.5.0
registerRootTransformers(registry);
registerChainedManagementTransformers(regi... | [
"Initialize the domain registry.\n\n@param registry the domain registry"
] | [
"This internal method is used to convert from a Date instance to an\ninteger representing the number of minutes past midnight.\n\n@param date date instance\n@return minutes past midnight as an integer",
"Handles the response of the Request node request.\n@param incomingMessage the response message to process.",
... |
public String getString(Integer type)
{
String result = null;
byte[] item = m_map.get(type);
if (item != null)
{
result = m_data.getString(getOffset(item));
}
return (result);
} | [
"Retrieves a string value from the extended data.\n\n@param type Type identifier\n@return string value"
] | [
"Adds a perspective camera constructed from the designated\nperspective camera to describe the shadow projection.\nThis type of camera is used for shadows generated by spot lights.\n@param centerCam GVRPerspectiveCamera to derive shadow projection from\n@param coneAngle spot light cone angle\n@return Perspective ca... |
public String getKeySchema() throws IOException {
Schema schema = getInputPathAvroSchema();
String keySchema = schema.getField(keyFieldName).schema().toString();
return keySchema;
} | [
"Extract schema of the key field"
] | [
"Curries a function that takes three arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes two arguments. Never <code>null</code>.",
"Ensures that the specified fields are present in the gi... |
private static void listAssignmentsByTask(ProjectFile file)
{
for (Task task : file.getTasks())
{
System.out.println("Assignments for task " + task.getName() + ":");
for (ResourceAssignment assignment : task.getResourceAssignments())
{
Resource resource = assignmen... | [
"This method displays the resource assignments for each task. This time\nrather than just iterating through the list of all assignments in\nthe file, we extract the assignments on a task-by-task basis.\n\n@param file MPX file"
] | [
"Appends formatted text to the source.\n\n<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their\n{@link Object#toString()} method, except that:<ul>\n<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names\n(no \"package \" prefix).\n<li> {@l... |
public static JMXServiceURL getLocalConnectorAddress(Process p, boolean startAgent) {
return getLocalConnectorAddress(Integer.toString(getPid(p)), startAgent);
} | [
"Returns the JMX connector address of a child process.\n\n@param p the process to which to connect\n@param startAgent whether to installed the JMX agent in the target process if not already in place\n@return a {@link JMXServiceURL} to the process's MBean server"
] | [
"This method is used to change the credentials of CleverTap account Id and token programmatically\n@param accountID CleverTap Account Id\n@param token CleverTap Account Token",
"Check if this path matches the address path.\nAn address matches this address if its path elements match or are valid\nmulti targets for... |
protected Element createRectangleElement(float x, float y, float width, float height, boolean stroke, boolean fill)
{
float lineWidth = transformWidth(getGraphicsState().getLineWidth());
float wcor = stroke ? lineWidth : 0.0f;
float strokeOffset = wcor == 0 ? 0 : wcor / 2;
width = width... | [
"Creates an element that represents a rectangle drawn at the specified coordinates in the page.\n@param x the X coordinate of the rectangle\n@param y the Y coordinate of the rectangle\n@param width the width of the rectangle\n@param height the height of the rectangle\n@param stroke should there be a stroke around?\... | [
"Terminates with a help message if the parse is not successful\n\n@param args command line arguments to\n@return the format in a correct state",
"Executes the query and returns the factory found, if there is only one factory.\nIf multiple factories match the query, one is selected.\n\n@param query the factory qu... |
private JSONArray toJsonStringArray(Collection<? extends Object> collection) {
if (null != collection) {
JSONArray array = new JSONArray();
for (Object o : collection) {
array.put("" + o);
}
return array;
} else {
return null;
... | [
"Convert a collection of objects to a JSON array with the string representations of that objects.\n@param collection the collection of objects.\n@return the JSON array with the string representations."
] | [
"Returns the dimensions for the video\n@param videoFile Video file\n@return the dimensions\n@throws IOException",
"Use this API to delete systementitydata.",
"Registers a handler and returns the callback key to be passed to\nJavascript.\n\n@param handler Handler to be registered.\n@return A String random UUID t... |
protected BoneCP createPool(BoneCPConfig config) {
try{
return new BoneCP(config);
} catch (SQLException e) {
throw new HibernateException(e);
}
} | [
"Creates the given connection pool with the given configuration. Extracted here to make unit mocking easier.\n@param config configuration object.\n@return BoneCP connection pool handle."
] | [
"Get by index is used here.",
"Runs the module import script.\n\n@param cms the CMS context to use\n@param module the module for which to run the script",
"Pause the current entry point, and invoke the provided listener when all current requests have finished.\n\nIf individual control point tracking is not enab... |
private String resolveExpressionString(final String unresolvedString) throws OperationFailedException {
// parseAndResolve should only be providing expressions with no leading or trailing chars
assert unresolvedString.startsWith("${") && unresolvedString.endsWith("}");
// Default result is no ... | [
"Resolve the given string using any plugin and the DMR resolve method"
] | [
"Unlink the specified reference object.\nMore info see OJB doc.\n@param source The source object with the specified reference field.\n@param attributeName The field name of the reference to unlink.\n@param target The referenced object to unlink.",
"Add the list with given bundles to the \"Require-Bundle\" main at... |
public static ClassLoader overrideThreadContextClassLoader(ClassLoader classLoaderToUse) {
Thread currentThread = Thread.currentThread();
ClassLoader threadContextClassLoader = currentThread.getContextClassLoader();
if (classLoaderToUse != null && !classLoaderToUse.equals(threadContextClassLoader)) {
currentTh... | [
"Override the thread context ClassLoader with the environment's bean ClassLoader\nif necessary, i.e. if the bean ClassLoader is not equivalent to the thread\ncontext ClassLoader already.\n@param classLoaderToUse the actual ClassLoader to use for the thread context\n@return the original thread context ClassLoader, o... | [
"Creates the row key of the given association row; columns present in the given association key will be obtained\nfrom there, all other columns from the given native association row.",
"Validate an RIBean. This includes validating whether two beans specialize\nthe same bean\n\n@param bean the bean to ... |
protected FluentModelTImpl find(String key) {
for (Map.Entry<String, FluentModelTImpl> entry : this.childCollection.entrySet()) {
if (entry.getKey().equalsIgnoreCase(key)) {
return entry.getValue();
}
}
return null;
} | [
"Finds a child resource with the given key.\n\n@param key the child resource key\n@return null if no child resource exists with the given name else the child resource"
] | [
"Find documents using an index\n\n@param selectorJson String representation of a JSON object describing criteria used to\nselect documents. For example:\n{@code \"{ \\\"selector\\\": {<your data here>} }\"}.\n@param classOfT The class of Java objects to be returned\n@param <T> the type of the Java obje... |
public static void registerParams(DynamicJasperDesign jd, Map _parameters) {
for (Object key : _parameters.keySet()) {
if (key instanceof String) {
try {
Object value = _parameters.get(key);
if (jd.getParametersMap().get(key) != null) {
... | [
"For every String key, it registers the object as a parameter to make it available\nin the report.\n\n@param jd\n@param _parameters"
] | [
"adds the qualified names to the export-package attribute, if not already\npresent.\n\n@param packages - passing parameterized packages is not supported",
"Returns the squared of the Euclidean distance between this vector and\nvector v.\n\n@return squared distance between this vector and v",
"Creates an operati... |
public boolean fling(float velocityX, float velocityY, float velocityZ) {
boolean scrolled = true;
float viewportX = mScrollable.getViewPortWidth();
if (Float.isNaN(viewportX)) {
viewportX = 0;
}
float maxX = Math.min(MAX_SCROLLING_DISTANCE,
viewportX... | [
"Fling the content\n\n@param velocityX The initial velocity in the X direction. Positive numbers mean that the\nfinger/cursor is moving to the left on the screen, which means we want to\nscroll towards the beginning.\n@param velocityY The initial velocity in the Y direction. Positive numbers mean that the\nfinger/c... | [
"Put features in a tile. This will assure all features are only added in one tile. When a feature's unique tile\nis different from this one a link is added in the tile.\n\n@param tile\ntile to put features in\n@param maxTileExtent\nthe maximum tile extent\n@throws GeomajasException oops",
"Create the actual patch... |
public static void copyStream(final InputStream src, OutputStream dest) throws IOException {
byte[] buffer = new byte[1024];
int read;
while ((read = src.read(buffer)) > -1) {
dest.write(buffer, 0, read);
}
dest.flush();
} | [
"Writes the content of an input stream to an output stream\n\n@throws IOException"
] | [
"Serialize a parameterized object to an OutputStream.\n\n@param object The object to serialize.\n@param parameterizedType The ParameterizedType describing the object. Ex: LoganSquare.serialize(object, new ParameterizedType<MyModel<OtherModel>>() { }, os);\n@param os The OutputStream being written to.",... |
@Override
public CopticDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | [
"Obtains a local date in Coptic calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Coptic era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Coptic local date, not null\n@throws DateTimeException if unable to create the date\n@throws C... | [
"Initialize the style generators for the messages table.",
"Print out the template information that the client needs for performing a request.\n\n@param json the writer to write the information to.",
"Use this API to fetch aaapreauthenticationpolicy_aaaglobal_binding resources of given name .",
"Set the model... |
public static void checkXerbla() {
double[] x = new double[9];
System.out.println("Check whether we're catching XERBLA errors. If you see something like \"** On entry to DGEMM parameter number 4 had an illegal value\", it didn't work!");
try {
NativeBlas.dgemm('N', 'N', 3, -1, 3, 1... | [
"Check whether error handling works. If it works, you should see an\nok, otherwise, you might see the actual error message and then\nthe program exits."
] | [
"Pause the current entry point, and invoke the provided listener when all current requests have finished.\n\nIf individual control point tracking is not enabled then the listener will be invoked straight away\n\n@param requestCountListener The listener to invoke",
"Extracts a duration from a JAXBElement instance.... |
public static AT_Row createContentRow(Object[] content, TableRowStyle style){
Validate.notNull(content);
Validate.notNull(style);
Validate.validState(style!=TableRowStyle.UNKNOWN);
LinkedList<AT_Cell> cells = new LinkedList<AT_Cell>();
for(Object o : content){
cells.add(new AT_Cell(o));
}
r... | [
"Creates a new row with content with given cell context and a normal row style.\n@param content the content for the row, each member of the array represents the content for a cell in the row, must not be null but can contain null members\n@return a new row with content\n@throws {@link NullPointerException} if conte... | [
"Calculates the static drift. Static means, that the drift does not change direction or intensity over time.\n\n@param tracks Tracks which seems to exhibit a local drift\n@return The static drift over all trajectories",
"Returns new boolean matrix with true or false values selected with equal probability.\n\n@par... |
public static boolean isListLiteralWithOnlyConstantValues(Expression expression) {
if (expression instanceof ListExpression) {
List<Expression> expressions = ((ListExpression) expression).getExpressions();
for (Expression e : expressions) {
if (!isConstantOrConstantLi... | [
"Returns true if a List literal that contains only entries that are constants.\n@param expression - any expression"
] | [
"End building the prepared script, adding a return value statement\n@param value the value to return\n@param config the configuration for the script to build\n@return the new {@link LuaPreparedScript} instance",
"Creates a timestamp from the equivalent long value. This conversion\ntakes account of the time zone a... |
private MetadataManager initOJB()
{
try
{
if (_ojbPropertiesFile == null)
{
_ojbPropertiesFile = new File("OJB.properties");
if (!_ojbPropertiesFile.exists())
{
throw new BuildException("Could not fi... | [
"Initializes OJB for the purposes of this task.\n\n@return The metadata manager used by OJB"
] | [
"A method for determining from and to information when using this IntRange to index an aggregate object of the specified size.\nNormally only used internally within Groovy but useful if adding range indexing support for your own aggregates.\n\n@param size the size of the aggregate being indexed\n@return the calcula... |
public static Message create( String text, Object data, ProcessingUnit owner )
{
return new SimpleMessage( text, data, owner);
} | [
"Creates a new Message from the specified text."
] | [
"If the HttpRequest is valid and handled it will be sent upstream, if it cannot be invoked\nthe response will be written back immediately.",
"Use this API to fetch a dnsglobal_binding resource .",
"Constructs a reference of the given type to the given\nreferent. The reference is registered with the queue\nfor ... |
public static void symmetric(DMatrixRMaj A, double min, double max, Random rand) {
if( A.numRows != A.numCols )
throw new IllegalArgumentException("A must be a square matrix");
double range = max-min;
int length = A.numRows;
for( int i = 0; i < length; i++ ) {
... | [
"Sets the provided square matrix to be a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\n\n@param A The matrix that is to be modified. Must be square. Modified.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have... | [
"This method evaluates a if a graphical indicator should\nbe displayed, given a set of Task or Resource data. The\nmethod will return -1 if no indicator should be displayed.\n\n@param container Task or Resource instance\n@return indicator index",
"Does this procedure return any values to the 'caller'?\n\n@return ... |
public RangeInfo subListBorders(int size) {
if (inclusive == null) throw new IllegalStateException("Should not call subListBorders on a non-inclusive aware IntRange");
int tempFrom = from;
if (tempFrom < 0) {
tempFrom += size;
}
int tempTo = to;
if (tempTo < 0... | [
"A method for determining from and to information when using this IntRange to index an aggregate object of the specified size.\nNormally only used internally within Groovy but useful if adding range indexing support for your own aggregates.\n\n@param size the size of the aggregate being indexed\n@return the calcula... | [
"We are adding a redeploy operation step for each specified deployment runtime name.\n\n@param context\n@param deploymentsRootAddress\n@param deploymentNames\n@throws OperationFailedException",
"Checks whether a built of the indices is necessary.\n@param cms The appropriate CmsObject instance.\n@return true, if t... |
public static onlinkipv6prefix[] get(nitro_service service, String ipv6prefix[]) throws Exception{
if (ipv6prefix !=null && ipv6prefix.length>0) {
onlinkipv6prefix response[] = new onlinkipv6prefix[ipv6prefix.length];
onlinkipv6prefix obj[] = new onlinkipv6prefix[ipv6prefix.length];
for (int i=0;i<ipv6prefix... | [
"Use this API to fetch onlinkipv6prefix resources of given names ."
] | [
"Helper xml end tag writer\n\n@param value the output stream to use in writing",
"Detaches or removes the value from this context.\n\n@param key the key to the attachment.\n@param <V> the value type of the attachment.\n\n@return the attachment if found otherwise {@code null}.",
"Retrieves the formatted parent W... |
List<String> getRuleFlowNames(HttpServletRequest req) {
final String[] projectAndBranch = getProjectAndBranchNames(req);
// Query RuleFlowGroups for asset project and branch
List<RefactoringPageRow> results = queryService.query(
DesignerFindRuleFlowNamesQuery.NAME,
... | [
"package scope in order to test the method"
] | [
"Inserts the result of the migration into the migration table\n\n@param migration the migration that was executed\n@param wasSuccessful indicates if the migration was successful or not",
"Returns an empty Search object in Json\n@return String\n@throws IOException",
"Gets the Hamming distance between two str... |
private void setW() {
if( saveW ) {
W.col0 = Y.col0;
W.col1 = Y.col1;
W.row0 = Y.row0;
W.row1 = Y.row1;
} else {
W.col1 = Y.col1 - Y.col0;
W.row0 = Y.row0;
}
} | [
"Sets the submatrix of W up give Y is already configured and if it is being cached or not."
] | [
"Returns a Bic object holding the value of the specified String.\n\n@param bic the String to be parsed.\n@return a Bic object holding the value represented by the string argument.\n@throws BicFormatException if the String doesn't contain parsable Bic.\nUnsupportedCountryException if bic's country is not supported."... |
protected void finishBox()
{
if (textLine.length() > 0)
{
String s;
if (isReversed(Character.getDirectionality(textLine.charAt(0))))
s = textLine.reverse().toString();
else
s = textLine.toString();
curstyle.setLeft(textMetric... | [
"Finishes the current box - empties the text line buffer and creates a DOM element from it."
] | [
"EAP 7.1",
"Run through the map and remove any references that have been null'd out by the GC.",
"Helper method to split a string by a given character, with empty parts omitted.",
"Returns an text table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, a... |
private AssignmentField selectField(AssignmentField[] fields, int index)
{
if (index < 1 || index > fields.length)
{
throw new IllegalArgumentException(index + " is not a valid field index");
}
return (fields[index - 1]);
} | [
"Maps a field index to an AssignmentField instance.\n\n@param fields array of fields used as the basis for the mapping.\n@param index required field index\n@return AssignmnetField instance"
] | [
"Sets the baseline start text value.\n\n@param baselineNumber baseline number\n@param value baseline start text value",
"Generate a uniform random number in the range [lo, hi)\n\n@param lo lower limit of range\n@param hi upper limit of range\n@return a uniform random real in the range [lo, hi)",
"Given the curr... |
private void revisitGateways(Definitions def) {
List<RootElement> rootElements = def.getRootElements();
for (RootElement root : rootElements) {
if (root instanceof Process) {
setGatewayInfo((Process) root);
}
}
} | [
"Updates the gatewayDirection attributes of all gateways.\n@param def"
] | [
"Reports that a node is faulted.\n\n@param faulted the node faulted\n@param throwable the reason for fault",
"Sends a text message using given server setup for SMTP.\n\n@param to the to address.\n@param from the from address.\n@param subject the subject.\n@param msg the test message.\n@param setup t... |
public void shutdown() {
debugConnection = null;
shuttingDown = true;
try {
if (serverSocket != null) {
serverSocket.close();
}
} catch (IOException e) {
e.printStackTrace();
}
} | [
"Shuts down the server. Active connections are not affected."
] | [
"If the Artifact does not exist, it will add it to the database. Nothing if it already exit.\n\n@param fromClient DbArtifact",
"just as facade but we keep the qualifiers so that we can recognize Bean from @Intercepted Bean.",
"Get image ID from imageTag on the current agent.\n\n@param imageTag\n@return",
"Asy... |
private static JsonObject getFieldJsonObject(Field field) {
JsonObject fieldObj = new JsonObject();
fieldObj.add("type", field.getType());
fieldObj.add("key", field.getKey());
fieldObj.add("displayName", field.getDisplayName());
String fieldDesc = field.getDescription();
... | [
"Gets the JsonObject representation of the given field object.\n@param field represents a template field\n@return the json object"
] | [
"This filter permit to return an image sized exactly as requested wherever is its ratio by\nfilling with chosen color the missing parts. Usually used with \"fit-in\" or \"adaptive-fit-in\"\n\n@param color integer representation of color.",
"Throw fault.\n\n@param code the fault code\n@param message the message\n@... |
public static Interface get(nitro_service service, String id) throws Exception{
Interface obj = new Interface();
obj.set_id(id);
Interface response = (Interface) obj.get_resource(service);
return response;
} | [
"Use this API to fetch Interface resource of given name ."
] | [
"Register a data type with the manager.",
"look for zero after country code, and remove if present",
"Waits the given amount of time in seconds for a managed domain to start. A domain is considered started when each\nof the servers in the domain are started unless the server is disabled.\n\n@param client ... |
public static Result generate(@Nonnull final String code, @Nonnull final ImmutableSettings settings) {
Check.notNull(code, "code");
final ImmutableSettings.Builder settingsBuilder = new ImmutableSettings.Builder(Check.notNull(settings, "settings"));
final InterfaceAnalysis analysis = InterfaceAnalyzer.analyze(co... | [
"The specified interface must not contain methods, that changes the state of this object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@param settings\nsettings to generate code\n@return generated source code as string in a result wrapper"
] | [
"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",
"Set the value of a field using its alias.\n\n@param alias field alias\n@param value field value",
"Mark a PersistenceBroker as preferred choice for ... |
private Priority getPriority(Integer gpPriority)
{
int result;
if (gpPriority == null)
{
result = Priority.MEDIUM;
}
else
{
int index = gpPriority.intValue();
if (index < 0 || index >= PRIORITY.length)
{
result = Priority.MEDIUM;
... | [
"Given a GanttProject priority value, turn this into an MPXJ Priority instance.\n\n@param gpPriority GanttProject priority\n@return Priority instance"
] | [
"Returns true if the default profile for the specified uuid is active\n\n@return true if active, otherwise false",
"Returns the site path for the edited bundle file.\n\n@return the site path for the edited bundle file.",
"If the layer transformer has not been prepared yet, do it.\n\n@param transformer the trans... |
private void readBitFields(MppBitFlag[] flags, FieldContainer container, byte[] data)
{
for (MppBitFlag flag : flags)
{
flag.setValue(container, data);
}
} | [
"Iterate through a set of bit field flags and set the value for each one\nin the supplied container.\n\n@param flags bit field flags\n@param container field container\n@param data source data"
] | [
"Extract the parameters from a method using the Jmx annotation if present,\nor just the raw types otherwise\n\n@param m The method to extract parameters from\n@return An array of parameter infos",
"compute Cosh using Taylor Series.\n\n@param x An angle, in radians.\n@param nTerms Number of terms.\n@return Re... |
synchronized void start(final ManagedServerBootCmdFactory factory) {
final InternalState required = this.requiredState;
// Ignore if the server is already started
if(required == InternalState.SERVER_STARTED) {
return;
}
// In case the server failed to start, try to st... | [
"Start a managed server.\n\n@param factory the boot command factory"
] | [
"Update the default time unit for work based on data read from the file.\n\n@param column column data",
"Use this API to fetch all the dnstxtrec resources that are configured on netscaler.\nThis uses dnstxtrec_args which is a way to provide additional arguments while fetching the resources.",
"Pops resource req... |
void setLanguage(final Locale locale) {
if (!m_languageSelect.getValue().equals(locale)) {
m_languageSelect.setValue(locale);
}
} | [
"Sets the currently edited locale.\n@param locale the locale to set."
] | [
"Get all the handlers at a specific address.\n\n@param address the address\n@param inherited true to include the inherited operations\n@return the handlers",
"Builds a configuration object based on given properties.\n\n@param properties the properties.\n@return a configuration and never null.",
"Send a request ... |
public <V> V getAttachment(final AttachmentKey<V> key) {
assert key != null;
return key.cast(contextAttachments.get(key));
} | [
"Retrieves an object that has been attached to this context.\n\n@param key the key to the attachment.\n@param <V> the value type of the attachment.\n\n@return the attachment if found otherwise {@code null}."
] | [
"Copies the jdb log files, with additional verification of the checksums.\n\n@param sourceFile\n@param destFile\n@throws IOException",
"Internal utility to dump relationship lists in a structured format\nthat can easily be compared with the tabular data in MS Project.\n\n@param relations relation list",
"Close ... |
public static base_response add(nitro_service client, clusternodegroup resource) throws Exception {
clusternodegroup addresource = new clusternodegroup();
addresource.name = resource.name;
addresource.strict = resource.strict;
return addresource.add_resource(client);
} | [
"Use this API to add clusternodegroup."
] | [
"Generates a sub-trajectory",
"Redirect to page\n\n@param model\n@return",
"Does the bitwise conjunction with this address. Useful when subnetting.\n\n@param mask\n@param retainPrefix whether to drop the prefix\n@return\n@throws IncompatibleAddressException",
"Parses the buffer into body content\n@param in B... |
public String generateSignature(HashMap<String, Integer> defined, GVRLight[] lightlist)
{
return getClass().getSimpleName();
} | [
"Create a unique signature for this shader.\nThe signature for simple shaders is just the class name.\nFor the more complex shaders generated by GVRShaderTemplate\nthe signature includes information about the vertex attributes,\nuniforms, textures and lights used by the shader variant.\n\n@param defined\nnames to b... | [
"Generates the cache key for Online links.\n@param cms the current CmsObject\n@param targetSiteRoot the target site root\n@param detailPagePart the detail page part\n@param absoluteLink the absolute (site-relative) link to the resource\n@return the cache key",
"Return the serialized form of this Identity.\n\n@ret... |
public static void redeployDeployments(OperationContext context, PathAddress deploymentsRootAddress, Set<String> deploymentNames) throws OperationFailedException {
for (String deploymentName : deploymentNames) {
PathAddress address = deploymentsRootAddress.append(DEPLOYMENT, deploymentName);
... | [
"We are adding a redeploy operation step for each specified deployment runtime name.\n\n@param context\n@param deploymentsRootAddress\n@param deploymentNames\n@throws OperationFailedException"
] | [
"Get an extent aware Iterator based on the Query\n\n@param query\n@param cld the ClassDescriptor\n@return OJBIterator",
"Prints the results of the equation to standard out. Useful for debugging",
"Add a dependency task item for this model.\n\n@param dependency the dependency task item.\n@return key to be used a... |
public static service_stats get(nitro_service service, String name) throws Exception{
service_stats obj = new service_stats();
obj.set_name(name);
service_stats response = (service_stats) obj.stat_resource(service);
return response;
} | [
"Use this API to fetch statistics of service_stats resource of given name ."
] | [
"Add the currentSceneObject to an active Level-of-Detail",
"Adds the includes of the fileset to the handling.\n\n@param handling The handling\n@param fileSet The fileset",
"Returns all the dependencies taken into account the artifact of the module that will be removed from the dependencies\n\n@param module Mod... |
protected void prepareForwardedRequestHeaders(RequestData request, ForwardDestination destination) {
HttpHeaders headers = request.getHeaders();
headers.set(HOST, destination.getUri().getAuthority());
headers.remove(TE);
} | [
"Remove any protocol-level headers from the clients request that\ndo not apply to the new request we are sending to the remote server.\n\n@param request\n@param destination"
] | [
"Removes the specified object in index from the array.\n\n@param index The index to remove.",
"Publish the changes to main registry",
"Logs an error by sending an error event to all listeners.\n\nError events can be generated by any part of GearVRF,\nfrom any thread. They are always sent to the event receiver\n... |
@Override
public synchronized void resume() {
this.paused = false;
ServerActivityCallback listener = listenerUpdater.get(this);
if (listener != null) {
listenerUpdater.compareAndSet(this, listener, null);
}
while (!taskQueue.isEmpty() && (activeRequestCount < maxR... | [
"Unpause the server, allowing it to resume normal operations"
] | [
"Function to go through all the store definitions contained in the STORES\ndirectory and\n\n1. Update metadata cache.\n\n2. Update STORES_KEY by stitching together all these keys.\n\n3. Update 'storeNames' list.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will correctly handle ... |
private static IndexOptions prepareOptions(MongoDBIndexType indexType, Document options, String indexName, boolean unique) {
IndexOptions indexOptions = new IndexOptions();
indexOptions.name( indexName ).unique( unique ).background( options.getBoolean( "background" , false ) );
if ( unique ) {
// MongoDB only... | [
"Prepare the options by adding additional information to them.\n@see <a href=\"https://docs.mongodb.com/manual/core/index-ttl/\">TTL Indexes</a>"
] | [
"Checks if provided class package is on the exclude list\n\n@param classPackageName\nname of class package\n@return false if class package is on the {@link #excludePackages} list",
"Reorder the objects in the table to resolve referential integrity dependencies.",
"Deletes an individual alias\n\n@param alias\nth... |
@Override
public void registerCapabilities(ManagementResourceRegistration resourceRegistration) {
if (capabilities!=null) {
for (RuntimeCapability c : capabilities) {
resourceRegistration.registerCapability(c);
}
}
if (incorporatingCapabilities != null... | [
"Register capabilities associated with this resource.\n\n<p>Classes that overrides this method <em>MUST</em> call {@code super.registerCapabilities(resourceRegistration)}.</p>\n\n@param resourceRegistration a {@link ManagementResourceRegistration} created from this definition"
] | [
"Record the resource request queue length\n\n@param dest Destination of the socket for which resource request is\nenqueued. Will actually record if null. Otherwise will call this\non self and corresponding child with this param null.\n@param queueLength The number of entries in the \"asynchronous\" resource\nreques... |
private void readFormDataFromFile() {
List<FormInput> formInputList =
FormInputValueHelper.deserializeFormInputs(config.getSiteDir());
if (formInputList != null) {
InputSpecification inputSpecs = config.getCrawlRules().getInputSpecification();
for (FormInput input : formInputList) {
inputSpecs.input... | [
"Reads input data from a JSON file in the output directory."
] | [
"Creates the graphic element to be shown when the datasource is empty",
"Resize picture to desired size.\n\n@param width Desired width.\n@param height Desired height.\n@throws IllegalArgumentException if {@code width} or {@code height} is less than 0 or both are\n0.",
"Initialize. create the httpClientStore, tc... |
public ParallelTaskBuilder prepareHttpDelete(String url) {
reinitIfClosed();
ParallelTaskBuilder cb = new ParallelTaskBuilder();
cb.getHttpMeta().setHttpMethod(HttpMethod.DELETE);
cb.getHttpMeta().setRequestUrlPostfix(url);
return cb;
} | [
"Prepare a parallel HTTP DELETE Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder"
] | [
"The ID field contains the identifier number that Microsoft Project\nautomatically assigns to each task as you add it to the project.\nThe ID indicates the position of a task with respect to the other tasks.\n\n@param val ID",
"Determines if the queue identified by the given key is used.\n\n@param jedis\nconnecti... |
public ArrayList getPrimaryKeys()
{
ArrayList result = new ArrayList();
FieldDescriptorDef fieldDef;
for (Iterator it = getFields(); it.hasNext();)
{
fieldDef = (FieldDescriptorDef)it.next();
if (fieldDef.getBooleanProperty(PropertyHelper.OJB... | [
"Returns the primarykey fields.\n\n@return The field descriptors of the primarykey fields"
] | [
"Store the deployment contents and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws O... |
public CRFDatum<List<String>, CRFLabel> makeDatum(List<IN> info, int loc,
edu.stanford.nlp.sequences.FeatureFactory<IN> featureFactory) {
pad.set(AnswerAnnotation.class, flags.backgroundSymbol);
PaddedList<IN> pInfo = new PaddedList<IN>(info, pad);
ArrayList<List<String>> features = new ArrayLis... | [
"Makes a CRFDatum by producing features and a label from input data at a\nspecific position, using the provided factory.\n\n@param info\nThe input data\n@param loc\nThe position to build a datum at\n@param featureFactory\nThe FeatureFactory to use to extract features\n@return The constructed CRFDatum"
] | [
"Gen error response.\n\n@param t\nthe t\n@return the response on single request",
"Get result report.\n\n@param reportURI the URI of the report\n@return the result report.",
"a small helper to set the text color to a textView null save\n\n@param textView\n@param colorDefault",
"Add an element assigned with it... |
public static base_response update(nitro_service client, csparameter resource) throws Exception {
csparameter updateresource = new csparameter();
updateresource.stateupdate = resource.stateupdate;
return updateresource.update_resource(client);
} | [
"Use this API to update csparameter."
] | [
"Attempts to checkout a resource so that one queued request can be\nserviced.\n\n@param key The key for which to process the requestQueue\n@return true iff an item was processed from the Queue.",
"Check that all nodes in the new cluster have a corresponding entry in\nstoreRepository and innerStores. add a NodeSto... |
private void addPropertyCounters(UsageStatistics usageStatistics,
PropertyIdValue property) {
if (!usageStatistics.propertyCountsMain.containsKey(property)) {
usageStatistics.propertyCountsMain.put(property, 0);
usageStatistics.propertyCountsQualifier.put(property, 0);
usageStatistics.propertyCountsRefere... | [
"Initializes the counters for a property to zero if not done yet.\n\n@param usageStatistics\nstatistics object to initialize\n@param property\nthe property to count"
] | [
"Sets the matrix 'inv' equal to the inverse of the matrix that was decomposed.\n\n@param inv Where the value of the inverse will be stored. Modified.",
"Figure out, based on how much time has elapsed since we received an update, and the playback position,\nspeed, and direction at the time of that update, where t... |
@SuppressWarnings({ "rawtypes", "unchecked" })
private IntegrationFlowBuilder getFlowBuilder() {
IntegrationFlowBuilder flowBuilder;
URLName urlName = this.properties.getUrl();
if (this.properties.isIdleImap()) {
flowBuilder = getIdleImapFlow(urlName);
}
else {
MailInboundChannelAdapterSpec adapterS... | [
"Method to build Integration Flow for Mail. Suppress Warnings for\nMailInboundChannelAdapterSpec.\n@return Integration Flow object for Mail Source"
] | [
"Extract predecessor data.",
"Convenience method for retrieving a char resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value",
"Fills in the element with the InputValues for input\n\n@param element the node element\n@param input the input data",
"Returns the \"msgCoun... |
public static final Bytes of(String s, Charset c) {
Objects.requireNonNull(s);
Objects.requireNonNull(c);
if (s.isEmpty()) {
return EMPTY;
}
byte[] data = s.getBytes(c);
return new Bytes(data);
} | [
"Creates a Bytes object by copying the value of the given String with a given charset"
] | [
"generate a prepared DELETE-Statement for the Class\ndescribed by cld.\n@param cld the ClassDescriptor",
"Use this API to fetch all the appfwsignatures resources that are configured on netscaler.",
"Create an instance from the given config.\n\n@param param Grid param from the request.",
"Creates the server bo... |
public void fireResourceReadEvent(Resource resource)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.resourceRead(resource);
}
}
} | [
"This method is called to alert project listeners to the fact that\na resource has been read from a project file.\n\n@param resource resource instance"
] | [
"Get the days difference",
"Return the list of all the module submodules\n\n@param module\n@return List<DbModule>",
"Read an individual GanttProject resource assignment.\n\n@param gpAllocation GanttProject resource assignment.",
"Reads color table as 256 RGB integer values.\n\n@param ncolors int number of col... |
@SuppressWarnings("SameParameterValue")
private void delegatingRepaint(int x, int y, int width, int height) {
final RepaintDelegate delegate = repaintDelegate.get();
if (delegate != null) {
//logger.info("Delegating repaint: " + x + ", " + y + ", " + width + ", " + height);
d... | [
"Determine whether we should use the normal repaint process, or delegate that to another component that is\nhosting us in a soft-loaded manner to save memory.\n\n@param x the left edge of the region that we want to have redrawn\n@param y the top edge of the region that we want to have redrawn\n@param width the widt... | [
"We have obtained album art for a device, so store it and alert any listeners.\n\n@param update the update which caused us to retrieve this art\n@param art the album art which we retrieved",
"Processes the most recent dump of the given type using the given dump\nprocessor.\n\n@see DumpProcessingController#process... |
public Object toInternal(Attribute<?> attribute) throws GeomajasException {
if (attribute instanceof PrimitiveAttribute<?>) {
return toPrimitiveObject((PrimitiveAttribute<?>) attribute);
} else if (attribute instanceof AssociationAttribute<?>) {
return toAssociationObject((AssociationAttribute<?>) attribute);... | [
"Converts a DTO attribute into a generic attribute object.\n\n@param attribute\nThe DTO attribute.\n@return The server side attribute representation. As we don't know at this point what kind of object the\nattribute is (that's a problem for the <code>FeatureModel</code>), we return an <code>Object</code>."
] | [
"Returns the first product found in the vector of calibration products\nwhich matches the given symbol, where symbol is the String set in\nthe calibrationSpecs.\n\n@param symbol A given symbol string.\n@return The product associated with that symbol.",
"Insert a value into the right bucket of the histogram. If th... |
public List<Class<?>> scanClasses(Predicate<String> filter)
{
List<Class<?>> discoveredClasses = new ArrayList<>(128);
// For each Forge addon...
for (Addon addon : furnace.getAddonRegistry().getAddons(AddonFilters.allStarted()))
{
List<String> discoveredFileNames = filt... | [
"Scans all Forge addons for classes accepted by given filter.\n\nTODO: Could be refactored - scan() is almost the same."
] | [
"Counts the number of elements in A which are not zero.\n@param A A matrix\n@return number of non-zero elements",
"Adds an individual alias. It will be merged with the current\nlist of aliases, or added as a label if there is no label for\nthis item in this language yet.\n\n@param alias\nthe alias to add",
"Rea... |
protected CDI11Deployment createDeployment(ServletContext context, CDI11Bootstrap bootstrap) {
ImmutableSet.Builder<Metadata<Extension>> extensionsBuilder = ImmutableSet.builder();
extensionsBuilder.addAll(bootstrap.loadExtensions(WeldResourceLoader.getClassLoader()));
if (isDevModeEnabled) {
... | [
"Create servlet deployment.\n\nCan be overridden with custom servlet deployment. e.g. exact resources listing in restricted env like GAE\n\n@param context the servlet context\n@param bootstrap the bootstrap\n@return new servlet deployment"
] | [
"Returns a description String based on the defined command and options.\nUseful when printing \"help\" info etc.",
"Handle http Request.\n\n@param request HttpRequest to be handled.\n@param responder HttpResponder to write the response.\n@param groupValues Values needed for the invocation.",
"Clear out our DAO... |
private Number calculatePercentComplete(Row row)
{
Number result;
switch (PercentCompleteType.getInstance(row.getString("complete_pct_type")))
{
case UNITS:
{
result = calculateUnitsPercentComplete(row);
break;
}
case DURATION:
{... | [
"Determine which type of percent complete is used on on this task,\nand calculate the required value.\n\n@param row task data\n@return percent complete value"
] | [
"Sets the working directory.\n\n@param dir The directory\n@throws IOException If the directory does not exist or cannot be written/read",
"Use this API to add linkset.",
"This method writes resource data to a JSON file.",
"Create a hazard curve from given times and given discount factors using default interpo... |
public List<Response> bulk(List<?> objects, boolean allOrNothing) {
assertNotEmpty(objects, "objects");
InputStream responseStream = null;
HttpConnection connection;
try {
final JsonObject jsonObject = new JsonObject();
if(allOrNothing) {
jsonObjec... | [
"Performs a Bulk Documents insert request.\n\n@param objects The {@link List} of objects.\n@param allOrNothing Indicates whether the request has <tt>all-or-nothing</tt> semantics.\n@return {@code List<Response>} Containing the resulted entries."
] | [
"Add a single header key-value pair. If one with the name already exists,\nboth stay in the header map.\n\n@param name the name of the header.\n@param value the value of the header.\n@return the interceptor instance itself.",
"Hide multiple channels. All other channels will be shown.\n@param channels The channel... |
public static String minus(CharSequence self, Pattern pattern) {
return pattern.matcher(self).replaceFirst("");
} | [
"Remove a part of a CharSequence. This replaces the first occurrence\nof the pattern within self with '' and returns the result.\n\n@param self a String\n@param pattern a Pattern representing the part to remove\n@return a String minus the part to be removed\n@since 2.2.0"
] | [
"Set the duration option.\n@param value the duration option to set ({@link EndType} as string).",
"The handling method.",
"Unmarshals the XML content and adds the file to the bundle files.\n@throws CmsException thrown if reading the file or unmarshaling fails.",
"Checks the given collection descriptor.\n\n@pa... |
public static int isValid( DMatrixRMaj cov ) {
if( !MatrixFeatures_DDRM.isDiagonalPositive(cov) )
return 1;
if( !MatrixFeatures_DDRM.isSymmetric(cov,TOL) )
return 2;
if( !MatrixFeatures_DDRM.isPositiveSemidefinite(cov) )
return 3;
return 0;
} | [
"Performs a variety of tests to see if the provided matrix is a valid\ncovariance matrix.\n\n@return 0 = is valid 1 = failed positive diagonal, 2 = failed on symmetry, 2 = failed on positive definite"
] | [
"touch event without ripple support",
"On host controller reload, remove a not running server registered in the process controller declared as down.",
"Use this API to add clusterinstance resources.",
"Find a toBuilder method, if the user has provided one.",
"Scans all Forge addons for classes accepted by g... |
public static int getDayAsReadableInt(long time) {
Calendar cal = calendarThreadLocal.get();
cal.setTimeInMillis(time);
return getDayAsReadableInt(cal);
} | [
"Readable yyyyMMdd int representation of a day, which is also sortable."
] | [
"Formats the supplied value using the specified DateTimeFormat.\n\n@return \"\" if the value is null",
"Returns the address for the operation.\n\n@param op the operation\n\n@return the operation address or a new undefined model node",
"Write the provided chunk at the offset specified in the token. If finalChunk... |
void handleAddKey() {
String key = m_addKeyInput.getValue();
if (m_listener.handleAddKey(key)) {
Notification.show(
key.isEmpty()
? m_messages.key(Messages.GUI_NOTIFICATION_MESSAGEBUNDLEEDITOR_EMPTY_KEY_SUCCESSFULLY_ADDED_0)
: m_messages.key(M... | [
"Handles adding a key. Calls the registered listener and wraps it's method in some GUI adjustments."
] | [
"Write entries into the storage.\nOverriding methods should first delegate to super before adding their own entries.",
"Retrieves the constructor that is used by OJB to create instances of the given collection proxy\nclass.\n\n@param proxyClass The proxy class\n@param baseType The required base type of the proxy ... |
public void performStep() {
// check for zeros
for( int i = helper.x2-1; i >= helper.x1; i-- ) {
if( helper.isZero(i) ) {
helper.splits[helper.numSplits++] = i;
helper.x1 = i+1;
return;
}
}
double lambda;
i... | [
"First looks for zeros and then performs the implicit single step in the QR Algorithm."
] | [
"Checks if two claims are equivalent in the sense that they have the same\nmain snak and the same qualifiers, but possibly in a different order.\n\n@param claim1\n@param claim2\n@return true if claims are equivalent",
"add some validation to see if this miss anything.\n\n@return true, if successful\n@throws Paral... |
public void useOldRESTService() throws Exception {
List<Object> providers = createJAXRSProviders();
com.example.customerservice.CustomerService customerService = JAXRSClientFactory
.createFromModel("http://localhost:" + port + "/examples/direct/rest",
com.examp... | [
"Old REST client uses old REST service"
] | [
"A Maven stub is a Maven Project for which we have found information, but the project has not yet been located\nwithin the input application. If we have found an application of the same GAV within the input app, we should\nfill out this stub instead of creating a new one.",
"Sets the jdbc connection to use.\n\n@p... |
public static <T> Collection<MemberResponse<T>> executeOptimistic(IExecutorService execSvc, Set<Member> members, Callable<T> callable, long maxWaitTime, TimeUnit unit) {
Collection<MemberResponse<T>> result = new ArrayList<MemberResponse<T>>(members.size());
Map<Member, Future<T>> resultFutures = execSv... | [
"We will always try to gather as many results as possible and never throw an exception.\n\nTODO: Make MemberResponse hold an exception that we can populate if something bad happens so we always\nget to return something for a member in order to indicate a failure. Getting the result when there\nis an error should t... | [
"Provides a normalized string which is lowercase for host strings, and which is a normalized string for addresses.\n@return",
"The smallest granularity of rebalancing where-in we move partitions for a\nsub-set of stores. Finally at the end of the movement, the node is\nremoved out of rebalance state\n\n<br>\n\nAl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.