query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
public Double getProgress() {
if (state.equals(ParallelTaskState.IN_PROGRESS)) {
if (requestNum != 0) {
return 100.0 * ((double) responsedNum / (double) requestNumActual);
} else {
return 0.0;
}
}
if (state.equals(ParallelTask... | [
"Gets the progress.\n\n@return the progress"
] | [
"Submit a operations. Throw a run time exception if the operations is\nalready submitted\n\n@param operation The asynchronous operations to submit\n@param requestId Id of the request",
"Download a file asynchronously.\n@param url the URL pointing to the file\n@param retrofit the retrofit client\n@return an Observ... |
public static base_responses add(nitro_service client, dnspolicylabel resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dnspolicylabel addresources[] = new dnspolicylabel[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] =... | [
"Use this API to add dnspolicylabel resources."
] | [
"Calculates the bearing, in degrees, of the end LatLong point from this\nLatLong point.\n\n@param end The point that the bearing is calculated for.\n@return The bearing, in degrees, of the supplied point from this point.",
"Mark objects no longer available in collection for delete and new objects for insert.\n\n@... |
public static int Median( int[] values ){
int total = 0, n = values.length;
// for all values
for ( int i = 0; i < n; i++ )
{
// accumalate total
total += values[i];
}
int halfTotal = total / 2;
int median = 0, v = 0;
// find med... | [
"Calculate Median value.\n@param values Values.\n@return Median."
] | [
"Creates a file\n\n@param folder File\n@param fileName String\n@throws IOException",
"Create the ResourceIgnoredTransformationRegistry when fetching missing content, only including relevant pieces\nto a server-config.\n\n@param rc the resolution context\n@param delegate the delegate ignored resource transfo... |
private GraphicsDocument createLabelDocument(StringWriter writer, LabelStyleInfo labelStyleInfo)
throws RenderException {
if (TileMetadata.PARAM_SVG_RENDERER.equalsIgnoreCase(renderer)) {
DefaultSvgDocument document = new DefaultSvgDocument(writer, false);
document.setMaximumFractionDigits(MAXIMUM_FRACTION_... | [
"Create a document that parses the tile's labelFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@param labelStyleInfo\nlabel style info\n@return graphics document\n@throws RenderException\ncannot render"
] | [
"Call the no-arg constructor for the given class\n\n@param <T> The type of the thing to construct\n@param klass The class\n@return The constructed thing",
"Post boolean flag \"DO_NOT_USE\" to an artifact\n\n@param gavc\n@param doNotUse\n@param user\n@param password\n@throws GrapesCommunicationException",
"Execu... |
public String[] init(String[] argv, int min, int max,
Collection<CommandLineParser.Option> options)
throws IOException, SAXException {
// parse command line
parser = new CommandLineParser();
parser.setMinimumArguments(min);
parser.setMaximumArguments(max);
parser.registerO... | [
"These exact lines are shared between three different tools, so\nthey have been moved here to reduce code duplication.\n@return The parsed command-line, with options removed."
] | [
"Send post request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws IOException the io exception",
"Display mode for output streams.",
"Removes file from your assembly.\n\n@param name field name of the file to remove.",
"Wit... |
public static DeploymentUnit getTopDeploymentUnit(DeploymentUnit unit) {
Assert.checkNotNullParam("unit", unit);
DeploymentUnit parent = unit.getParent();
while (parent != null) {
unit = parent;
parent = unit.getParent();
}
return unit;
} | [
"Get top deployment unit.\n\n@param unit the current deployment unit\n@return top deployment unit"
] | [
"Return a product descriptor for a specific strike.\n\n@param referenceDate The reference date (translating the maturity floating point date to dates.\n@param index The index corresponding to the strike grid.\n@return a product descriptor for a specific strike.\n@throws ArrayIndexOutOfBoundsException Thrown if inde... |
public void setColor(int n, int color) {
int firstColor = map[0];
int lastColor = map[256-1];
if (n > 0)
for (int i = 0; i < n; i++)
map[i] = ImageMath.mixColors((float)i/n, firstColor, color);
if (n < 256-1)
for (int i = n; i < 256; i++)
map[i] = ImageMath.mixColors((float)(i-n)/(256-n), color, l... | [
"Set a knot color.\n@param n the knot index\n@param color the color"
] | [
"End building the script, adding a return value statement\n@param config the configuration for the script to build\n@param value the value to return\n@return the new {@link LuaScript} instance",
"Sets the specified range of elements in the specified array to the specified value.\n\n@param from the index of the fi... |
public static <T> void finish(T query, long correlationId, EventBus bus, String... types) {
for (String type : types) {
RemoveQuery<T> next = finish(query, correlationId, type);
bus.post(next);
}
} | [
"Publish finish events for each of the specified query types\n\n<pre>\n{@code\nRequestEvents.start(\"get\", 1l, bus, \"typeA\", \"custom\");\ntry {\nreturn \"ok\";\n} finally {\nRequestEvents.finish(\"get\", 1l, bus, \"typeA\", \"custom\");\n}\n\n}\n</pre>\n\n\n@param query Completed query\n@param correlationId Ide... | [
"Adds special accessors for private constants so that inner classes can retrieve them.",
"Copy one Gradient into another.\n@param g the Gradient to copy into",
"Alternative implementation for the drift. For experimental purposes.\n\n@param timeIndex\n@param componentIndex\n@param realizationAtTimeIndex\n@param ... |
private void populateResource(Resource resource, Record record) throws MPXJException
{
String falseText = LocaleData.getString(m_locale, LocaleData.NO);
int length = record.getLength();
int[] model = m_resourceModel.getModel();
for (int i = 0; i < length; i++)
{
int mpxFieldT... | [
"Populates a resource.\n\n@param resource resource instance\n@param record MPX record\n@throws MPXJException"
] | [
"Use this API to clear nsconfig.",
"Returns the latest change events, and clears them from the change stream listener.\n\n@return the latest change events.",
"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, an... |
private static int readObjectData(int offset, String text, List<RTFEmbeddedObject> objects)
{
LinkedList<byte[]> blocks = new LinkedList<byte[]>();
offset += (OBJDATA.length());
offset = skipEndOfLine(text, offset);
int length;
int lastOffset = offset;
while (offset != -1)
... | [
"This method extracts byte arrays from the embedded object data\nand converts them into RTFEmbeddedObject instances, which\nit then adds to the supplied list.\n\n@param offset offset into the RTF document\n@param text RTF document\n@param objects destination for RTFEmbeddedObject instances\n@return new offset into ... | [
"Collection of JRVariable\n\n@param variables\n@return",
"This utility method calculates the difference in working\ntime between two dates, given the context of a task.\n\n@param task parent task\n@param date1 first date\n@param date2 second date\n@param format required format for the resulting duration\n@return ... |
public void configure(Properties props) throws HibernateException {
try{
this.config = new BoneCPConfig(props);
// old hibernate config
String url = props.getProperty(CONFIG_CONNECTION_URL);
String username = props.getProperty(CONFIG_CONNECTION_USERNAME);
String password = props.getProperty(CON... | [
"Pool configuration.\n@param props\n@throws HibernateException"
] | [
"Returns the given text with the first letter in upper case.\n\n<h2>Examples:</h2>\n<pre>\ncapitalize(\"hi\") == \"Hi\"\ncapitalize(\"Hi\") == \"Hi\"\ncapitalize(\"hi there\") == \"hi there\"\ncapitalize(\"\") == \"\"\ncapitalize(null) == null\n</pre>\n@param text the text to capitalize\n@return text with the first... |
public byte[] getByteArray(Integer offset)
{
byte[] result = null;
if (offset != null)
{
result = m_map.get(offset);
}
return (result);
} | [
"This method retrieves a byte array containing the data at the\ngiven offset in the block. If no data is found at the given offset\nthis method returns null.\n\n@param offset offset of required data\n@return byte array containing required data"
] | [
"Returns an Object array of all FK field values of the specified object.\nIf the specified object is an unmaterialized Proxy, it will be materialized\nto read the FK values.\n\n@throws MetadataException if an error occours while accessing ForeingKey values on obj",
"Adds one statement to the list of statements to... |
public void addForeignKeyField(String newField)
{
if (m_ForeignKeyFields == null)
{
m_ForeignKeyFields = new Vector();
}
m_ForeignKeyFields.add(newField);
} | [
"add a foreign key field"
] | [
"Expands the directories from the given list and and returns a list of subfiles.\nFiles from the original list are kept as is.",
"Recursively add indirect subclasses to a class record.\n\n@param directSuperClass\nthe superclass to add (together with its own superclasses)\n@param subClassRecord\nthe subclass to ad... |
public ProjectCalendar getBaselineCalendar()
{
//
// Attempt to locate the calendar normally used by baselines
// If this isn't present, fall back to using the default
// project calendar.
//
ProjectCalendar result = getCalendarByName("Used for Microsoft Project 98 Baseline Calend... | [
"Retrieve the calendar used internally for timephased baseline calculation.\n\n@return baseline calendar"
] | [
"Removes the token from the list\n@param token Token which is to be removed",
"Use this API to delete nsip6.",
"Returns the adapter position of the Child associated with this ChildViewHolder\n\n@return The adapter position of the Child if it still exists in the adapter.\nRecyclerView.NO_POSITION if item has bee... |
public Map<InetSocketAddress, ServerPort> activePorts() {
final Server server = this.server;
if (server != null) {
return server.activePorts();
} else {
return Collections.emptyMap();
}
} | [
"Returns the ports of the server.\n\n@return the {@link Map} which contains the pairs of local {@link InetSocketAddress} and\n{@link ServerPort} is the server is started. {@link Optional#empty()} otherwise."
] | [
"Copy the contents of this buffer begginning from the srcOffset to a destination byte array\n@param srcOffset\n@param destArray\n@param destOffset\n@param size",
"Build resolution context in which message will be discovered and built\n@param components resolution components, used to identify message bundle\n@para... |
private void attributes(Options opt, FieldDoc fd[]) {
for (FieldDoc f : fd) {
if (hidden(f))
continue;
stereotype(opt, f, Align.LEFT);
String att = visibility(opt, f) + f.name();
if (opt.showType)
att += typeAnnotation(opt, f.type());
tableLine(Align.LEFT, att);
tagvalue(opt, f);
}
... | [
"Print the class's attributes fd"
] | [
"Prepare a parallel HTTP PUT 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",
"Use this API to fetch lbvserver_appflowpolicy_binding resources of given name .",
"Returns the difference of sets s1 and s2.",
"Parses th... |
private static DirectoryGrouping resolveDirectoryGrouping(final ModelNode model, final ExpressionResolver expressionResolver) {
try {
return DirectoryGrouping.forName(HostResourceDefinition.DIRECTORY_GROUPING.resolveModelAttribute(expressionResolver, model).asString());
} catch (OperationFai... | [
"Returns the value of found in the model.\n\n@param model the model that contains the key and value.\n@param expressionResolver the expression resolver to use to resolve expressions\n\n@return the directory grouping found in the model.\n\n@throws IllegalArgumentException if the {@link org.jboss.as.controller.descri... | [
"Generated the report.",
"Returns a list of resource wrappers created from the input list of resources.\n\n@param cms the current OpenCms user context\n@param list the list to create the resource wrapper list from\n\n@return the list of wrapped resources.",
"Reads a duration value. This method relies on the fac... |
public static lbmonbindings_servicegroup_binding[] get(nitro_service service, String monitorname) throws Exception{
lbmonbindings_servicegroup_binding obj = new lbmonbindings_servicegroup_binding();
obj.set_monitorname(monitorname);
lbmonbindings_servicegroup_binding response[] = (lbmonbindings_servicegroup_bindi... | [
"Use this API to fetch lbmonbindings_servicegroup_binding resources of given name ."
] | [
"Get a compatible constructor\n\n@param type\nClass to look for constructor in\n@param argumentType\nArgument type for constructor\n@return the compatible constructor or null if none found",
"Extract the subscription ID from a resource ID string.\n@param id the resource ID string\n@return the subscription ID",
... |
public Future<PutObjectResult> putAsync(String key, String value) {
return Future.of(() -> put(key, value), this.uploadService)
.flatMap(t->t.fold(p->Future.ofResult(p),e->Future.ofError(e)));
} | [
"Non-blocking call\n\n@param key\n@param value\n@return"
] | [
"Post the specified photo to a blog.\n\n@param photo\nThe photo metadata\n@param blogId\nThe blog ID\n@throws FlickrException",
"Converts the provided javascript object to JSON string.\n\n<p>If the object is a Map instance, it is stringified as key-value pairs, if it is a list, it is stringified as\na list, other... |
private List<DomainControllerData> readFromFile(String directoryName) {
List<DomainControllerData> data = new ArrayList<DomainControllerData>();
if (directoryName == null) {
return data;
}
if (conn == null) {
init();
}
try {
if (using... | [
"Read the domain controller data from an S3 file.\n\n@param directoryName the name of the directory in the bucket that contains the S3 file\n@return the domain controller data"
] | [
"Reads the bundle descriptor, sets m_desc and m_descContent.\n@throws CmsXmlException thrown when unmarshalling fails.\n@throws CmsException thrown when reading the resource fails or several bundle descriptors for the bundle exist.",
"Check if underlying connection was alive.",
"Gets information about all of th... |
public OperationTransformerRegistry resolveServer(final ModelVersion mgmtVersion, final ModelNode subsystems) {
return resolveServer(mgmtVersion, resolveVersions(subsystems));
} | [
"Resolve the server registry.\n\n@param mgmtVersion the mgmt version\n@param subsystems the subsystems\n@return the transformer registry"
] | [
"Registers an image to the images cache, so that it can be captured by the build-info proxy.\n\n@param imageId\n@param imageTag\n@param targetRepo\n@param buildInfoId\n@throws IOException",
"Publish the changes to main registry",
"Prepares transformation interceptors for a client.\n\n@param clientConfig the cli... |
@Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<AccountingDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<AccountingDate>) super.zonedDateTime(temporal);
} | [
"Obtains a Accounting zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Accounting zoned date-time, not null\n@throws DateTimeException if unable to create the date-time"
] | [
"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... |
public static List<String> getLayersDigests(String manifestContent) throws IOException {
List<String> dockerLayersDependencies = new ArrayList<String>();
JsonNode manifest = Utils.mapper().readTree(manifestContent);
JsonNode schemaVersion = manifest.get("schemaVersion");
if (schemaVersi... | [
"Get a list of layer digests from docker manifest.\n\n@param manifestContent\n@return\n@throws IOException"
] | [
"Gets the Jensen Shannon divergence.\n\n@param p U vector.\n@param q V vector.\n@return The Jensen Shannon divergence between u and v.",
"Check whether the URL contains one of the patterns.\n\n@param uri URI\n@param patterns possible patterns\n@return true when URL contains one of the patterns",
"Moves our curr... |
public ProjectCalendar getEffectiveCalendar()
{
ProjectCalendar result = getCalendar();
if (result == null)
{
result = getParentFile().getDefaultCalendar();
}
return result;
} | [
"Retrieve the effective calendar for this task. If the task does not have\na specific calendar associated with it, fall back to using the default calendar\nfor the project.\n\n@return ProjectCalendar instance"
] | [
"In common shader cases, NaN makes little sense. Correspondingly, GVRF is\ngoing to use Float.NaN as illegal flag in many cases. Therefore, we need\na function to check if there is any setX that is using NaN as input.\n\n@param parameterName\nThe name of the user-supplied parameter that we are validating\nso that t... |
protected static Map<String, List<Statement>> removeStatements(Set<String> statementIds, Map<String, List<Statement>> claims) {
Map<String, List<Statement>> newClaims = new HashMap<>(claims.size());
for(Entry<String, List<Statement>> entry : claims.entrySet()) {
List<Statement> filteredStatements = new ArrayList... | [
"Removes statement ids from a collection of statement groups.\n@param statementIds\n@param claims\n@return"
] | [
"Compress a directory into a zip file\n\n@param dir Directory\n@param zipFile ZIP file to create\n@throws IOException I/O Error",
"Returns the value of the identified field as a Float.\n@param fieldName the name of the field\n@return the value of the field as a Float\n@throws FqlException if the field cannot be e... |
public float get(Layout.Axis axis) {
switch (axis) {
case X:
return x;
case Y:
return y;
case Z:
return z;
default:
throw new RuntimeAssertion("Bad axis specified: %s", axis);
}
} | [
"Gets axis dimension\n@param axis Axis. It might be either {@link Layout.Axis#X X} or\n{@link Layout.Axis#Y Y} or {@link Layout.Axis#Z Z}\n@return axis dimension"
] | [
"Processes the template for all column definitions of the current table.\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\"",
"Checks the available space and sets max-hei... |
static byte[] hmacSha1(StringBuilder message, String key) {
try {
Mac mac = Mac.getInstance("HmacSHA1");
mac.init(new SecretKeySpec(key.getBytes(), "HmacSHA1"));
return mac.doFinal(message.toString().getBytes());
} catch (Exception e) {
throw new RuntimeException(e);
}
} | [
"Encrypt a string with HMAC-SHA1 using the specified key.\n\n@param message Input string.\n@param key Encryption key.\n@return Encrypted output."
] | [
"Factory for 'and' and 'or' predicates.",
"Creates a random matrix where all elements are zero but diagonal elements. Diagonal elements\nrandomly drawn from a uniform distribution from min to max, inclusive.\n\n@param numRows Number of rows in the returned matrix..\n@param numCols Number of columns in the return... |
protected void parseSequencesWithColons(TokenList tokens , Sequence sequence ) {
TokenList.Token t = tokens.getFirst();
if( t == null )
return;
int state = 0;
TokenList.Token start = null;
TokenList.Token middle = null;
TokenList.Token prev = t;
bo... | [
"Searches for descriptions of integer sequences and array ranges that have a colon character in them\n\nExamples of integer sequences:\n1:6\n2:4:20\n:\n\nExamples of array range\n2:\n2:4:"
] | [
"replaces the old with the new item. The new item will not be added when the old one is not\nfound.\n\n@param oldObject will be removed\n@param newObject is added only when hte old item is removed",
"Parses the given XML doc to extract the properties and return them into a java.util.Properties.\n@param doc to par... |
public static Dimension getDimension(File videoFile) throws IOException {
try (FileInputStream fis = new FileInputStream(videoFile)) {
return getDimension(fis, new AtomicReference<ByteBuffer>());
}
} | [
"Returns the dimensions for the video\n@param videoFile Video file\n@return the dimensions\n@throws IOException"
] | [
"Writes task predecessor links to a PM XML file.\n\n@param task MPXJ Task instance",
"Load the available layers.\n\n@param image the installed image\n@param productConfig the product config to establish the identity\n@param moduleRoots the module roots\n@param bundleRoots the bundle ro... |
private void processWorkWeeks(byte[] data, int offset, ProjectCalendar cal)
{
// System.out.println("Calendar=" + cal.getName());
// System.out.println("Work week block start offset=" + offset);
// System.out.println(ByteArrayHelper.hexdump(data, true, 16, ""));
// skip 4 byte... | [
"Read the work weeks.\n\n@param data calendar data\n@param offset current offset into data\n@param cal parent calendar"
] | [
"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",
"This method retrieves the UID for a calendar associated with a task.\n\n@param mpx MPX Task instance\n@return calendar UID",
"Return... |
public ItemRequest<Tag> createInWorkspace(String workspace) {
String path = String.format("/workspaces/%s/tags", workspace);
return new ItemRequest<Tag>(this, Tag.class, path, "POST");
} | [
"Creates a new tag in a workspace or organization.\n\nEvery tag is required to be created in a specific workspace or\norganization, and this cannot be changed once set. Note that you can use\nthe `workspace` parameter regardless of whether or not it is an\norganization.\n\nReturns the full record of the newly creat... | [
"Stores template parameters for OpenShiftAssistantTemplate.\n\n@param name template parameter name\n@param value template parameter value",
"Method called when the renderer is going to be created. This method has the responsibility of\ninflate the xml layout using the layoutInflater and the parent ViewGroup, set... |
private <T> void requestAsync(ClientRequest<T> delegate,
NonblockingStoreCallback callback,
long timeoutMs,
String operationName) {
pool.submitAsync(this.destination, delegate, callback, timeoutMs, operationNam... | [
"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 not block for a\nresponse from the server.\n\n@param <T> Return type\n\n@param clientRequest ClientRequest impleme... | [
"Copy a single named file to the output directory.\n@param outputDirectory The destination directory for the copied resource.\n@param sourceFile The path of the file to copy.\n@param targetFileName The name of the file created in {@literal outputDirectory}.\n@throws IOException If the file cannot be copied.",
"Us... |
public static final Integer getInteger(Locale locale, String key)
{
ResourceBundle bundle = ResourceBundle.getBundle(LocaleData.class.getName(), locale);
return ((Integer) bundle.getObject(key));
} | [
"Convenience method for retrieving an Integer resource.\n\n@param locale locale identifier\n@param key resource key\n@return resource value"
] | [
"Get the directory where the compiled jasper reports should be put.\n\n@param configuration the configuration for the current app.",
"Send a sync command to all registered listeners.\n\n@param command the byte which identifies the type of sync command we received",
"Updates the properties of a tag. Only the fie... |
public static void shutdownDomain(final ModelControllerClient client, final int timeout) throws IOException, OperationExecutionException {
// Note the following two operations used to shutdown a domain don't seem to work well in a composite operation.
// The operation occasionally sees a java.util.concu... | [
"Shuts down a managed domain container. The servers are first stopped, then the host controller is shutdown.\n\n@param client the client used to communicate with the server\n@param timeout the graceful shutdown timeout, a value of {@code -1} will wait indefinitely and a value of\n{@code 0} will not attempt a grace... | [
"Initialization method.\n\n@param t1\n@param t2",
"Removes trailing and leading whitespace, and also reduces each\nsequence of internal whitespace to a single space.",
"Add query part for the facet, without filters.\n@param query The query part that is extended for the facet",
"Process UDFs for a specific obj... |
private boolean isOrdered(FieldDescriptor[] flds, String[] pkFieldNames)
{
if((flds.length > 1 && pkFieldNames == null) || flds.length != pkFieldNames.length)
{
throw new PersistenceBrokerException("pkFieldName length does not match number of defined PK fields." +
... | [
"Checks length and compare order of field names with declared PK fields in metadata."
] | [
"Updates this BoxJSONObject using the information in a JSON object.\n@param jsonObject the JSON object containing updated information.",
"Use this API to update gslbservice.",
"Creates the request.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception",
"r... |
public void setBaseCalendar(String val)
{
set(ResourceField.BASE_CALENDAR, val == null || val.length() == 0 ? "Standard" : val);
} | [
"Sets the Base Calendar field indicates which calendar is the base calendar\nfor a resource calendar. The list includes the three built-in calendars,\nas well as any new base calendars you have created in the Change Working\nTime dialog box.\n\n@param val calendar name"
] | [
"Use this API to fetch aaagroup_vpnsessionpolicy_binding resources of given name .",
"Add the set with given bundles to the \"Import-Package\" main attribute.\n\n@param importedPackages The set of all packages to add.",
"Creates a descriptor for the bundle in the same folder where the bundle files are located.\... |
public static final void getByteArray(byte[] data, int offset, int size, byte[] buffer, int bufferOffset)
{
System.arraycopy(data, offset, buffer, bufferOffset, size);
} | [
"This method extracts a portion of a byte array and writes it into\nanother byte array.\n\n@param data Source data\n@param offset Offset into source data\n@param size Required size to be extracted from the source data\n@param buffer Destination buffer\n@param bufferOffset Offset into destination buffer"
] | [
"Wrapped version of standard jdbc executeUpdate Pays attention to DB\nlocked exception and waits up to 1s\n\n@param query SQL query to execute\n@throws Exception - will throw an exception if we can never get a lock",
"Get the vector of regression coefficients.\n\n@param value The random variable to regress.\n@ret... |
public void removePropertyChangeListener (String propertyName, java.beans.PropertyChangeListener listener)
{
this.propertyChangeDelegate.removePropertyChangeListener(propertyName, listener);
} | [
"Remove a PropertyChangeListener for a specific property from this node.\nThis functionality has. Please note that the listener this does not remove\na listener that has been added without specifying the property it is\ninterested in."
] | [
"Applies the > operator to each element in A. Results are stored in a boolean matrix.\n\n@param A Input matrx\n@param value value each element is compared against\n@param output (Optional) Storage for results. Can be null. Is reshaped.\n@return Boolean matrix with results",
"Convert JsonString to Object of C... |
void countNonZeroInR( int[] parent ) {
TriangularSolver_DSCC.postorder(parent,n,post,gwork);
columnCounts.process(A,parent,post,countsR);
nz_in_R = 0;
for (int k = 0; k < n; k++) {
nz_in_R += countsR[k];
}
if( nz_in_R < 0)
throw new RuntimeExceptio... | [
"Count the number of non-zero elements in R"
] | [
"Converts an Accumulo Range to a Fluo Span\n\n@param range Range\n@return Span",
"Generates a module regarding the parameters.\n\n@param name String\n@param version String\n@return Module",
"Use this API to fetch filtered set of dospolicy resources.\nset the filter parameter values in filtervalue object.",
"S... |
public static final boolean valueIsNotDefault(FieldType type, Object value)
{
boolean result = true;
if (value == null)
{
result = false;
}
else
{
DataType dataType = type.getDataType();
switch (dataType)
{
case BOOLEAN:
... | [
"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"
] | [
"Adds this handler to the widget.\n\n@param <H> the type of handler to add\n@param type the event type\n@param handler the handler\n@return {@link HandlerRegistration} used to remove the handler",
"Returns the dimension of the type of the current member.\n\n@return The member dimension\n@exce... |
@Override
public void onClick(View v) {
String tag = (String) v.getTag();
mContentTextView.setText(String.format("%s clicked.", tag));
mMenuDrawer.setActiveView(v);
} | [
"Click handler for bottom drawer items."
] | [
"Iterates over all tokens in current member tag with the name tagName and evaluates the body for every token.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\n@doc.tag type... |
public Headers getAllHeaders() {
Headers requestHeaders = getHeaders();
requestHeaders = hasPayload() ? requestHeaders.withContentType(getPayload().get().getMimeType()) : requestHeaders;
//We don't want to add headers more than once.
return requestHeaders;
} | [
"Returns all headers with the headers from the Payload\n\n@return All the headers"
] | [
"Write an error response.\n\n@param channel the channel\n@param header the request\n@param error the error\n@throws IOException",
"Checks to see if all the diagonal elements in the matrix are positive.\n\n@param a A matrix. Not modified.\n@return true if all the diagonal elements are positive, false otherwise.",... |
private void writeResources()
{
Resources resources = m_factory.createResources();
m_plannerProject.setResources(resources);
List<net.sf.mpxj.planner.schema.Resource> resourceList = resources.getResource();
for (Resource mpxjResource : m_projectFile.getResources())
{
net.sf.mpx... | [
"This method writes resource data to a Planner file."
] | [
"All the sub-level attributes.\n\n@param name the attribute name.\n@param attribute the attribute.",
"compare between two points.",
"Collect environment variables and system properties under with filter constrains",
"Returns a representation of the date from the value attributes as ISO\n8601 encoding.\n\n@par... |
public static byte[] storeContentAndTransformOperation(OperationContext context, ModelNode operation, ContentRepository contentRepository) throws IOException, OperationFailedException {
if (!operation.hasDefined(CONTENT)) {
throw createFailureException(DomainControllerLogger.ROOT_LOGGER.invalidConte... | [
"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... | [
"Get the max extent as a envelop object.",
"Use this API to sync gslbconfig.",
"Informs this sequence model that the value of the whole sequence is initialized to sequence",
"Prints some basic documentation about this program.",
"Calculate the duration percent complete.\n\n@param row task data\n@return perc... |
public void addWatcher(final MongoNamespace namespace,
final Callback<ChangeEvent<BsonDocument>, Object> watcher) {
instanceChangeStreamListener.addWatcher(namespace, watcher);
} | [
"Queues up a callback to be removed and invoked on the next change event."
] | [
"Use this API to fetch a dnsglobal_binding resource .",
"Use this API to fetch auditsyslogpolicy_systemglobal_binding resources of given name .",
"Recursively searches for formatting annotations.\n\n@param visitedTypes used to prevent an endless loop\n@param parameterName",
"Checks if the provided license is ... |
public static Class<?> determineCommonAncestor(Class<?> clazz1, Class<?> clazz2) {
if (clazz1 == null) {
return clazz2;
}
if (clazz2 == null) {
return clazz1;
}
if (clazz1.isAssignableFrom(clazz2)) {
return clazz1;
}
if (clazz2.isAssignableFrom(clazz1)) {
return clazz2;
}
Class<?> ancestor... | [
"Determine the common ancestor of the given classes, if any.\n@param clazz1 the class to introspect\n@param clazz2 the other class to introspect\n@return the common ancestor (i.e. common superclass, one interface\nextending the other), or {@code null} if none found. If any of the\ngiven classes is {@code null}, the... | [
"Parse a macro defintion.\n\n\"macro NAME( var0 , var1 ) = 5+var0+var1'",
"Adds an additional description to the constructed document.\n\n@param text\nthe text of the description\n@param languageCode\nthe language code of the description\n@return builder object to continue construction",
"scans right to left un... |
public static int validateGeohashMaxLevels(Integer userMaxLevels, int defaultMaxLevels) {
int maxLevels = userMaxLevels == null ? defaultMaxLevels : userMaxLevels;
if (maxLevels < 1 || maxLevels > GeohashPrefixTree.getMaxLevelsPossible()) {
throw new IndexException("max_levels must be in ran... | [
"Checks if the specified max levels is correct.\n\n@param userMaxLevels the maximum number of levels in the tree\n@param defaultMaxLevels the default max number of levels\n@return the validated max levels"
] | [
"Get a subset of the attributes of the provided class. An attribute is each public field in the class\nor super class.\n\n@param classToInspect the class to inspect\n@param filter a predicate that returns true when a attribute should be kept in resulting\ncollection.",
"This method uses the configured git creden... |
public static void writeProcessorOutputToValues(
final Object output,
final Processor<?, ?> processor,
final Values values) {
Map<String, String> mapper = processor.getOutputMapperBiMap();
if (mapper == null) {
mapper = Collections.emptyMap();
}
... | [
"Read the values from the output object and write them to the values object.\n\n@param output the output object from a processor\n@param processor the processor the output if from\n@param values the object for sharing values between processors"
] | [
"Set the default styles. the case of the keys are not important. The retrieval will be case\ninsensitive.\n\n@param defaultStyle the mapping from geometry type name (point, polygon, etc...) to the style\nto use for that type.",
"Add an URL to the given classloader\n\n@param loader ClassLoader\n@param url URL to... |
public void updateBuildpackInstallations(String appName, List<String> buildpacks) {
connection.execute(new BuildpackInstallationUpdate(appName, buildpacks), apiKey);
} | [
"Update the list of buildpacks installed on an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param buildpacks the new list of buildpack names or URLs."
] | [
"Use this API to fetch statistics of nspbr6_stats resource of given name .",
"Creates a unique name, suitable for use with Resque.\n\n@return a unique name for this worker",
"Parses all child Shapes recursively and adds them to the correct JSON\nObject\n\n@param childShapes\n@throws org.json.JSONException",
"... |
public Client setFriendlyName(int profileId, String clientUUID, String friendlyName) throws Exception {
// first see if this friendlyName is already in use
Client client = this.findClientFromFriendlyName(profileId, friendlyName);
if (client != null && !client.getUUID().equals(clientUUID)) {
... | [
"Set a friendly name for a client\n\n@param profileId profileId of the client\n@param clientUUID UUID of the client\n@param friendlyName friendly name of the client\n@return return Client object or null\n@throws Exception exception"
] | [
"Returns the next index of the argument by decrementing 1 from the possibly parsed number\n\n@param description this String will be searched from the start for a number\n@param defaultIndex this will be returned if the match does not succeed\n@return the parsed index or the defaultIndex",
"set custom response or ... |
public static void Backward(double[] data) {
double[] result = new double[data.length];
double sum;
double scale = Math.sqrt(2.0 / data.length);
for (int t = 0; t < data.length; t++) {
sum = 0;
for (int j = 0; j < data.length; j++) {
double cos = ... | [
"1-D Backward Discrete Cosine Transform.\n\n@param data Data."
] | [
"Can be overridden if you want to replace or supplement the debug handling for responses.\n\n@param responseCode\n@param inputStream",
"Creates a new RDF serializer based on the current configuration of this\nobject.\n\n@return the newly created RDF serializer\n@throws IOException\nif there were problems opening ... |
public void setBundleActivator(String bundleActivator) {
String old = mainAttributes.get(BUNDLE_ACTIVATOR);
if (!bundleActivator.equals(old)) {
this.mainAttributes.put(BUNDLE_ACTIVATOR, bundleActivator);
this.modified = true;
this.bundleActivator = bundleActivator;
}
} | [
"Set the main attribute \"Bundle-Activator\" to the given value.\n\n@param bundleActivator The new value"
] | [
"Gets the end.\n\n@return the end",
"Bessel function of the first kind, of order 0.\n\n@param x Value.\n@return I0 value.",
"Add a misc file.\n\n@param name the file name\n@param path the relative path\n@param newHash the new hash of the added content\n@param isDirectory whether the file is a directory or not\n... |
public PreparedStatement getInsertStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException
{
try
{
return cds.getStatementsForClass(m_conMan).getInsertStmt(m_conMan.getConnection());
}
catch (SQLException e)
{
... | [
"return a prepared Insert Statement fitting for the given ClassDescriptor"
] | [
"Get the diff between any two valid revisions.\n\n@param from revision from\n@param to revision to\n@param pathPattern target path pattern\n@return the map of changes mapped by path\n@throws StorageException if {@code from} or {@code to} does not exist.",
"Add a newline to this sequence according to the configure... |
public static base_response export(nitro_service client, application resource) throws Exception {
application exportresource = new application();
exportresource.appname = resource.appname;
exportresource.apptemplatefilename = resource.apptemplatefilename;
exportresource.deploymentfilename = resource.deploymentf... | [
"Use this API to export application."
] | [
"Filter for public tweets on these languages.\n\n@param languages\nValid BCP 47 (http://tools.ietf.org/html/bcp47) language identifiers,\nand may represent any of the languages listed on Twitter's advanced search page\n(https://twitter.com/search-advanced), or \"und\" if no language could be detected.\nThese string... |
public Task<Void> updateSyncFrequency(@NonNull final SyncFrequency syncFrequency) {
return this.dispatcher.dispatchTask(new Callable<Void>() {
@Override
public Void call() throws Exception {
SyncImpl.this.proxy.updateSyncFrequency(syncFrequency);
return null;
}
});
} | [
"Sets the SyncFrequency on this collection.\n\n@param syncFrequency the SyncFrequency that contains all the desired options\n\n@return A Task that completes when the SyncFrequency has been updated"
] | [
"Check invariant.\n\n@param browser The browser.\n@return Whether the condition is satisfied or <code>false</code> when it it isn't or a\n{@link CrawljaxException} occurs.",
"Appends the GROUP BY clause for the Query\n@param groupByFields\n@param buf",
"Indicates if a bean's scope type is passivating\n\n@param ... |
@Override
protected void onDataChanged() {
super.onDataChanged();
int currentAngle = 0;
int index = 0;
int size = mPieData.size();
for (PieModel model : mPieData) {
int endAngle = (int) (currentAngle + model.getValue() * 360.f / mTotalValue);
if(inde... | [
"Should be called after new data is inserted. Will be automatically called, when the view dimensions\nhas changed.\n\nCalculates the start- and end-angles for every PieSlice."
] | [
"Propagates node table of given DAG to all of it ancestors.",
"Send JSON representation of given data object to all connections tagged with\ngiven label\n@param data the data object\n@param label the tag label",
"Builds the radio input to set the export and secure property.\n\n@param propName the name of the pr... |
public List<GVRAtlasInformation> getAtlasInformation()
{
if ((mImage != null) && (mImage instanceof GVRImageAtlas))
{
return ((GVRImageAtlas) mImage).getAtlasInformation();
}
return null;
} | [
"Returns the list of atlas information necessary to map\nthe texture atlas to each scene object.\n\n@return List of atlas information."
] | [
"Creates a PathAddress from the given ModelNode address. The given node is expected to be an address node.\n\n@param node the node (cannot be {@code null})\n\n@return the update identifier",
"Adds descriptions to the item.\n\n@param descriptions\nthe descriptions to add",
"Set the directory and test that the di... |
public static base_response export(nitro_service client, appfwlearningdata resource) throws Exception {
appfwlearningdata exportresource = new appfwlearningdata();
exportresource.profilename = resource.profilename;
exportresource.securitycheck = resource.securitycheck;
exportresource.target = resource.target;
... | [
"Use this API to export appfwlearningdata."
] | [
"add a new producer, either synchronous or asynchronous, connecting\nto the specified broker\n\n@param broker broker to producer",
"Use this API to disable nsacl6.",
"Writes data to delegate stream if it has been set.\n\n@param data the data to write",
"Appends the GROUP BY clause for the Query\n@param groupB... |
private GraphicsDocument createFeatureDocument(StringWriter writer) throws RenderException {
if (TileMetadata.PARAM_SVG_RENDERER.equalsIgnoreCase(renderer)) {
DefaultSvgDocument document = new DefaultSvgDocument(writer, false);
document.setMaximumFractionDigits(MAXIMUM_FRACTION_DIGITS);
document.registerWrit... | [
"Create a document that parses the tile's featureFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@return document\n@throws RenderException\noops"
] | [
"Creates a quad consisting of two triangles, with the specified width and\nheight.\n\n@param gvrContext current {@link GVRContext}\n\n@param width\nthe quad's width\n@param height\nthe quad's height\n@return A 2D, rectangular mesh with four vertices and two triangles",
"Given a storedefinition, constructs the xml... |
private static Set<String> excludedMethods(String... methodNames)
{
Set<String> set = new HashSet<String>(MpxjTreeNode.DEFAULT_EXCLUDED_METHODS);
set.addAll(Arrays.asList(methodNames));
return set;
} | [
"Generates a set of excluded method names.\n\n@param methodNames method names\n@return set of method names"
] | [
"Old SOAP client uses new SOAP service with the\nredirection to the new endpoint and transformation\non the server side",
"Log a fatal message.",
"Make a list value containing the specified values.",
"Finds the parent group of the given one and returns it\n\n@param group Group for which the parent is needed\n... |
public byte[] serialize() throws PersistenceBrokerException
{
// Identity is serialized and written to an ObjectOutputStream
// This ObjectOutputstream is compressed by a GZIPOutputStream
// and finally written to a ByteArrayOutputStream.
// the resulting byte[] is returned
... | [
"Return the serialized form of this Identity.\n\n@return The serialized representation\n@see #fromByteArray\n@deprecated"
] | [
"Process StepStartedEvent. New step will be created and added to\nstepStorage.\n\n@param event to process",
"Do post exam of child inside the layout after it has been positioned in parent\n@param dataIndex data index",
"First close the connection. Then reply.\n\n@param response\nthe response\n@param error\nthe ... |
public static String format(Flags flags) {
StringBuilder buf = new StringBuilder();
buf.append('(');
if (flags.contains(Flags.Flag.ANSWERED)) {
buf.append("\\Answered ");
}
if (flags.contains(Flags.Flag.DELETED)) {
buf.append("\\Deleted ");
... | [
"Returns IMAP formatted String of MessageFlags for named user"
] | [
"Set the named arguments.\n\n@param vars\nthe new named arguments",
"Detects if the current browser is a BlackBerry Touch\ndevice, such as the Storm, Torch, and Bold Touch. Excludes the Playbook.\n@return detection of a Blackberry touchscreen device",
"Ensure that the given connection is established.\n\n@param ... |
private void loadResourceFile(URL configurationResourceUrl, Properties hotRodConfiguration) {
if ( configurationResourceUrl != null ) {
try ( InputStream openStream = configurationResourceUrl.openStream() ) {
hotRodConfiguration.load( openStream );
}
catch (IOException e) {
throw log.failedLoadingHot... | [
"Load the properties from the resource file if one is specified"
] | [
"Get an extent aware Iterator based on the Query\n\n@param query\n@param cld the ClassDescriptor\n@return OJBIterator",
"Counts each property for which there is a statement in the given item\ndocument, ignoring the property thisPropertyIdValue to avoid properties\ncounting themselves.\n\n@param statementDocument\... |
public static base_responses add(nitro_service client, nsacl6 resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
nsacl6 addresources[] = new nsacl6[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new nsacl6();
addre... | [
"Use this API to add nsacl6 resources."
] | [
"Print the class's attributes fd",
"Draws the specified image with the first rectangle's bounds, clipping with the second one.\n\n@param img image\n@param rect rectangle\n@param clipRect clipping bounds\n@param opacity opacity of the image (1 = opaque, 0= transparent)",
"This method is called to format a relati... |
public Object convertStringToJavaField(String value, int columnPos) throws SQLException {
if (value == null) {
return null;
} else {
return fieldConverter.resultStringToJava(this, value, columnPos);
}
} | [
"Convert a string value into the appropriate Java field value."
] | [
"Use this API to fetch responderhtmlpage resource of given name .",
"Constructs a relative path between this path and a given path.\n\n<p> Relativization is the inverse of {@link #getAbsolutePath(Path) resolution}.\nThis method attempts to construct a {@link #isAbsolute relative} path\nthat when {@link #getAbsolu... |
private void addExceptionRange(ProjectCalendarException exception, Date start, Date finish)
{
if (start != null && finish != null)
{
exception.addRange(new DateRange(start, finish));
}
} | [
"Add a range to an exception, ensure that we don't try to add null ranges.\n\n@param exception target exception\n@param start exception start\n@param finish exception finish"
] | [
"Logs the current user out.\n\n@throws IOException",
"If any of the given list of properties are not found, returns the\nname of that property. Otherwise, returns null.",
"Very basic implementation of an inner join between two result sets.\n\n@param leftRows left result set\n@param leftColumn left foreign key ... |
public void parseAndAddDictionaries(CmsObject cms) throws CmsRoleViolationException {
OpenCms.getRoleManager().checkRole(cms, CmsRole.ROOT_ADMIN);
CmsSpellcheckDictionaryIndexer.parseAndAddZippedDictionaries(m_solrClient, cms);
CmsSpellcheckDictionaryIndexer.parseAndAddDictionaries(m_solrClient... | [
"Parses and adds dictionaries to the Solr index.\n\n@param cms the OpenCms object.\n\n@throws CmsRoleViolationException in case the user does not have the required role ROOT_ADMIN"
] | [
"Removes all candidates from this collection which are not\nassociated with an initialising method.\n\n@return a {@code Collection} containing the removed\nunassociated candidates. This list is empty if none\nwere removed, i. e. the result is never {@code null}.",
"sets the class object described by this descript... |
private void readProject(Project project)
{
Task mpxjTask = m_projectFile.addTask();
//project.getAuthor()
mpxjTask.setBaselineCost(project.getBaselineCost());
mpxjTask.setBaselineFinish(project.getBaselineFinishDate());
mpxjTask.setBaselineStart(project.getBaselineStartDate());
/... | [
"Read a project from a ConceptDraw PROJECT file.\n\n@param project ConceptDraw PROJECT project"
] | [
"Takes an HTML file, looks for the first instance of the specified insertion point, and\ninserts the diagram image reference and a client side map in that point.",
"Create the patching task based on the definition.\n\n@param definition the task description\n@param provider the content provider\n@param context ... |
public void disconnect() {
if (sendThread != null) {
sendThread.interrupt();
try {
sendThread.join();
} catch (InterruptedException e) {
}
sendThread = null;
}
if (receiveThread != null) {
receiveThread.interrupt();
try {
receiveThread.join();
} catch (InterruptedException e) {
... | [
"Disconnects from the serial interface and stops\nsend and receive threads."
] | [
"Encodes the given URI port with the given encoding.\n@param port the port to be encoded\n@param encoding the character encoding to encode to\n@return the encoded port\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"GetJob helper - String predicates are all created the ... |
private String computeMorse(BytesRef term) {
StringBuilder stringBuilder = new StringBuilder();
int i = term.offset + prefixOffset;
for (; i < term.length; i++) {
if (ALPHABET_MORSE.containsKey(term.bytes[i])) {
stringBuilder.append(ALPHABET_MORSE.get(term.bytes[i]) + " ");
} else if(ter... | [
"Compute morse.\n\n@param term the term\n@return the string"
] | [
"Use this API to renumber nspbr6 resources.",
"Returns the sentence as a string with a space between words.\nDesigned to work robustly, even if the elements stored in the\n'Sentence' are not of type Label.\n\nThis one uses the default separators for any word type that uses\nseparators, such as TaggedWord.\n\n@par... |
public static Expression type(String lhs, Type rhs) {
return new Expression(lhs, "$type", rhs.toString());
} | [
"Check the document field's type\nand object\n@param lhs The field to check\n@param rhs The type\n@return Expression: lhs $type rhs"
] | [
"Create a Build retention object out of the build\n\n@param build The build to create the build retention out of\n@param discardOldArtifacts Flag whether to discard artifacts of those builds that are to be discarded.\n@return a new Build retention",
"Merge all reports in reportOverall.\n@param repor... |
public void addBeanToBeanMapping(BeanToBeanMapping beanToBeanMapping) {
beanToBeanMappings.put(ClassPair.get(beanToBeanMapping
.getSourceClass(), beanToBeanMapping.getDestinationClass()),
beanToBeanMapping);
} | [
"Add a mapping of properties between two beans\n\n@param beanToBeanMapping"
] | [
"Specify the class represented by this `ClassNode` implements\nan interface specified by the given name\n\n@param name the name of the interface class\n@return this `ClassNode` instance",
"Get the spin scripting environment\n\n@param language the language name\n@return the environment script as string or null if ... |
protected X509Certificate wireUpSslWithCyberVilliansCAOdo(String host, SslListener listener) {
host = requestOriginalHostName.get();
// Add cybervillians CA(from browsermob)
try {
// see https://github.com/webmetrics/browsermob-proxy/issues/105
String escapedHost = host.... | [
"This function wires up a SSL Listener with the cyber villians root CA and cert with the correct CNAME for the request\n\n@param host\n@param listener"
] | [
"Static method to convert a binary operator into a string.\n\n@param oper is the binary comparison operator to be converted",
"Returns the maximum magnitude of the complex numbers\n@param u Array of complex numbers\n@param startU first index to consider in u\n@param length Number of complex numebrs to consider\n@... |
private void writeClassData() {
try (PrintStream out = new PrintStream(openResultFileOuputStream(
resultDirectory, "classes.json"))) {
out.println("{");
// Add direct subclass information:
for (Entry<Integer, ClassRecord> classEntry : this.classRecords
.entrySet()) {
if (classEntry.getValue().s... | [
"Writes all data that was collected about classes to a json file."
] | [
"Gets the first value for the key.\n\n@param key the key to check for the value\n\n@return the value or {@code null} if the key is not found or the value was {@code null}",
"Add a path to a profile, returns the id\n\n@param id ID of profile\n@param pathname name of path\n@param actualPath value of path\n@return I... |
public void createAssignmentFieldMap(Props props)
{
//System.out.println("ASSIGN");
byte[] fieldMapData = null;
for (Integer key : ASSIGNMENT_KEYS)
{
fieldMapData = props.getByteArray(key);
if (fieldMapData != null)
{
break;
}
}
if ... | [
"Creates a field map for assignments.\n\n@param props props data"
] | [
"Wait for exclusive permit during a timeout in milliseconds.\n\n@return number of acquired permits if > 0",
"Determine the length of a nul terminated UTF16LE string in bytes.\n\n@param data string data\n@param offset offset into string data\n@return length in bytes",
"Notifies all interested subscribers of the ... |
public static STSClient createSTSX509Client(Bus bus, Map<String, String> stsProps) {
final STSClient stsClient = createClient(bus, stsProps);
stsClient.setWsdlLocation(stsProps.get(STS_X509_WSDL_LOCATION));
stsClient.setEndpointQName(new QName(stsProps.get(STS_NAMESPACE), stsProps.get(STS_X... | [
"for bpm connector"
] | [
"Sets the current collection definition derived from the current member, and optionally some attributes.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\n@doc.tag type=\"block\"\n@doc.param ... |
private void cascadeMarkedForDeletion()
{
List alreadyPrepared = new ArrayList();
for(int i = 0; i < markedForDeletionList.size(); i++)
{
ObjectEnvelope mod = (ObjectEnvelope) markedForDeletionList.get(i);
// if the object wasn't associated with another object, ... | [
"Starts recursive delete on all delete objects object graph"
] | [
"Look up record by identity.",
"Returns the JSON String representation of the payload\naccording to Apple APNS specification\n\n@return the String representation as expected by Apple",
"Initializes the components.\n\n@param components the components",
"Saves a matrix to disk using Java binary serialization.\... |
public static final BigDecimal printDurationInDecimalThousandthsOfMinutes(Duration duration)
{
BigDecimal result = null;
if (duration != null && duration.getDuration() != 0)
{
result = BigDecimal.valueOf(printDurationFractionsOfMinutes(duration, 1000));
}
return result;
} | [
"Print duration in thousandths of minutes.\n\n@param duration Duration instance\n@return duration in thousandths of minutes"
] | [
"Writes all auxiliary triples that have been buffered recently. This\nincludes OWL property restrictions but it also includes any auxiliary\ntriples required by complex values that were used in snaks.\n\n@throws RDFHandlerException\nif there was a problem writing the RDF triples",
"appends a HAVING-clause to the ... |
private License getLicense(final String licenseId) {
License result = null;
final Set<DbLicense> matchingLicenses = licenseMatcher.getMatchingLicenses(licenseId);
if (matchingLicenses.isEmpty()) {
result = DataModelFactory.createLicense("#" + licenseId + "# (to be identified)", NOT_... | [
"Returns a licenses regarding its Id and a fake on if no license exist with such an Id\n\n@param licenseId String\n@return License"
] | [
"Register the given mbean with the platform mbean server\n\n@param mbean The mbean to register\n@param name The name to register under",
"generate a message for loglevel ERROR\n\n@param pObject the message Object",
"Builds the task hierarchy.\n\nNote that there are two distinct levels of organisation going on h... |
public ModelNode toModelNode() {
final ModelNode node = new ModelNode().setEmptyList();
for (PathElement element : pathAddressList) {
final String value;
if (element.isMultiTarget() && !element.isWildcard()) {
value = '[' + element.getValue() + ']';
} ... | [
"Convert this path address to its model node representation.\n\n@return the model node list of properties"
] | [
"Casts a ray into the scene graph, and returns the objects it intersects.\n\nThe ray is defined by its origin {@code [ox, oy, oz]} and its direction\n{@code [dx, dy, dz]}.\n\n<p>\nThe ray origin may be [0, 0, 0] and the direction components should be\nnormalized from -1 to 1: Note that the y direction runs from -1 ... |
@SuppressWarnings("unchecked")
public <T extends StatementDocument> T nullEdit(T currentDocument)
throws IOException, MediaWikiApiErrorException {
StatementUpdate statementUpdate = new StatementUpdate(currentDocument,
Collections.<Statement>emptyList(), Collections.<Statement>emptyList());
statementUpdate.s... | [
"Performs a null edit on an entity. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in the UI.\n\n@param currentDocument\nthe document to perform a null edit on\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are any IO errors, su... | [
"Get the max extent as a envelop object.",
"Set a Background Drawable using the appropriate Android version api call\n\n@param view\n@param drawable",
"Use this API to fetch all the systementitydata resources that are configured on netscaler.\nThis uses systementitydata_args which is a way to provide additional... |
public static byte[] getBytes(String string, String encoding) {
try {
return string.getBytes(encoding);
} catch(UnsupportedEncodingException e) {
throw new IllegalArgumentException(encoding + " is not a known encoding name.", e);
}
} | [
"Translate the string to bytes using the given encoding\n\n@param string The string to translate\n@param encoding The encoding to use\n@return The bytes that make up the string"
] | [
"Print a percent complete value.\n\n@param value Double instance\n@return percent complete value",
"Execute the physical query and initialize the various entities and collections\n\n@param session the session\n@param qp the query parameters\n@param ogmLoadingContext the loading context\n@param returnProxies when ... |
@Inject
public void setQueue(EventQueue queue) {
if (epi == null) {
MessageToEventMapper mapper = new MessageToEventMapper();
mapper.setMaxContentLength(maxContentLength);
epi = new EventProducerInterceptor(mapper, queue);
}
} | [
"Sets the queue.\n\n@param queue the new queue"
] | [
"Return any feedback messages and errors that were generated - but\nsuppressed - during the interpolation process. Since unresolvable\nexpressions will be left in the source string as-is, this feedback is\noptional, and will only be useful for debugging interpolation problems.\n\n@return a {@link List} that may be ... |
private Map<String, String> parseAttributes(I_CmsXmlContentLocation formatterLoc) {
Map<String, String> result = new LinkedHashMap<>();
for (I_CmsXmlContentValueLocation mappingLoc : formatterLoc.getSubValues(N_ATTRIBUTE)) {
String key = CmsConfigurationReader.getString(m_cms, mappingLoc.ge... | [
"Parses formatter attributes.\n\n@param formatterLoc the node location\n@return the map of formatter attributes (unmodifiable)"
] | [
"I promise that this is always a collection of HazeltaskTasks",
"Use this API to delete locationfile.",
"Use this API to fetch sslvserver_sslciphersuite_binding resources of given name .",
"Prints out the interceptor chain in a format that is easy to read. It\nalso filters out instances of the DemoInterceptor... |
public static long directorySize(File self) throws IOException, IllegalArgumentException
{
final long[] size = {0L};
eachFileRecurse(self, FileType.FILES, new Closure<Void>(null) {
public void doCall(Object[] args) {
size[0] += ((File) args[0]).length();
}
... | [
"Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory"
] | [
"Get all views from the list content\n@return list of views currently visible",
"Merges the two classes into a single class. The smaller class is\nremoved, while the largest class is kept.",
"Send a sync command to all registered listeners.\n\n@param command the byte which identifies the type of sync command we... |
public void addPartialFieldAssignment(
SourceBuilder code, Excerpt finalField, String builder) {
addFinalFieldAssignment(code, finalField, builder);
} | [
"Add the final assignment of the property to the partial value object's source code."
] | [
"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 that can be used as the callback key.",
"Calculate a shift value that can be used to create a power-of-two value between\nthe specified maximum and minimum value... |
public static List<KoreanPhraseExtractor.KoreanPhrase> extractPhrases(Seq<KoreanToken> tokens, boolean filterSpam, boolean includeHashtags) {
return JavaConversions.seqAsJavaList(
TwitterKoreanProcessor.extractPhrases(tokens, filterSpam, includeHashtags)
);
} | [
"Extract phrases from Korean input text\n\n@param tokens Korean tokens (output of tokenize(CharSequence text)).\n@return List of phrase CharSequences."
] | [
"Checks that native primarykey fields have readonly access, and warns if not.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)",
"Performs the BFS and gives the results to a distributor to distribute\n\n@param distributor the distr... |
public CoordinatorConfig setBootstrapURLs(List<String> bootstrapUrls) {
this.bootstrapURLs = Utils.notNull(bootstrapUrls);
if(this.bootstrapURLs.size() <= 0)
throw new IllegalArgumentException("Must provide at least one bootstrap URL.");
return this;
} | [
"Sets the bootstrap URLs used by the different Fat clients inside the\nCoordinator\n\n@param bootstrapUrls list of bootstrap URLs defining which cluster to\nconnect to\n@return modified CoordinatorConfig"
] | [
"Processes the template for all indices of the current table.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\n@doc.tag type=\"block\"\n@doc.param name=\"unique\" optional=\"tr... |
public static dnstxtrec[] get(nitro_service service, dnstxtrec_args args) throws Exception{
dnstxtrec obj = new dnstxtrec();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
dnstxtrec[] response = (dnstxtrec[])obj.get_resources(service, option);
return response... | [
"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."
] | [
"This method allows a subsection of a byte array to be copied.\n\n@param data source data\n@param offset offset into the source data\n@param size length of the source data to copy\n@return new byte array containing copied data",
"Use this API to unset the properties of nsip6 resource.\nProperties that need to be ... |
public PartialCollection<BoxItem.Info> searchRange(long offset, long limit, final BoxSearchParameters bsp) {
QueryStringBuilder builder = bsp.getQueryParameters()
.appendParam("limit", limit)
.appendParam("offset", offset);
URL url = SEARCH_URL_TEMPLATE.buildWithQuery(thi... | [
"Searches all descendant folders using a given query and query parameters.\n@param offset is the starting position.\n@param limit the maximum number of items to return. The default is 30 and the maximum is 200.\n@param bsp containing query and advanced search capabilities.\n@return a PartialCollection containing... | [
"Update the server group's name\n\n@param serverGroupId ID of server group\n@param name new name of server group\n@return updated ServerGroup",
"Resolves the path relative to the parent and normalizes it.\n\n@param parent the parent path\n@param path the path\n\n@return the normalized path",
"Obtain the name ... |
public static Configuration getDefaultFreemarkerConfiguration()
{
freemarker.template.Configuration configuration = new freemarker.template.Configuration(Configuration.VERSION_2_3_26);
DefaultObjectWrapperBuilder objectWrapperBuilder = new DefaultObjectWrapperBuilder(Configuration.VERSION_2_3_26);
... | [
"Gets the default configuration for Freemarker within Windup."
] | [
"Position the child inside the layout based on the offset and axis-s factors\n@param dataIndex data index",
"Send a device update to all registered update listeners.\n\n@param update the device update that has just arrived",
"Cancel all currently active operations.\n\n@return a list of cancelled operations",
... |
private String getParentWBS(String wbs)
{
String result;
int index = wbs.lastIndexOf('.');
if (index == -1)
{
result = null;
}
else
{
result = wbs.substring(0, index);
}
return result;
} | [
"Extract the parent WBS from a WBS.\n\n@param wbs current WBS\n@return parent WBS"
] | [
"Add an element assigned with its score\n@param member the member to add\n@param score the score to assign\n@return <code>true</code> if the set has been changed",
"Sets the parent node.\n\n@param parentNode The parent of this node. May be null, if this is a root node.",
"Reads outline code custom field values ... |
public static long getMaxIdForClass(
PersistenceBroker brokerForClass, ClassDescriptor cldForOriginalOrExtent, FieldDescriptor original)
throws PersistenceBrokerException
{
FieldDescriptor field = null;
if (!original.getClassDescriptor().equals(cldForOriginalOrExtent))
... | [
"lookup current maximum value for a single field in\ntable the given class descriptor was associated."
] | [
"Orders first by word, then by tag.\n\n@param wordTag object to compare to\n@return result (positive if <code>this</code> is greater than\n<code>obj</code>, 0 if equal, negative otherwise)",
"Find the earliest start time of the specified methods.\n@param methods A list of test methods.\n@return The earliest start... |
public PreparedStatement getPreparedStatement(ClassDescriptor cds, String sql,
boolean scrollable, int explicitFetchSizeHint, boolean callableStmt)
throws PersistenceBrokerException
{
try
{
return cds.getStatementsForCla... | [
"return a generic Statement for the given ClassDescriptor"
] | [
"Reads the integer representation of calendar hours for a given\nday and populates the calendar.\n\n@param calendar parent calendar\n@param day target day\n@param hours working hours",
"Extract a Class from the given Type.",
"Adds all edges for a given object envelope vertex. All edges are\nadded to the edgeLis... |
private int findAvailablePortNumber( Integer portNumberStartingPoint, List<Integer> reservedPorts )
{
assert portNumberStartingPoint != null;
int candidate = portNumberStartingPoint;
while ( reservedPorts.contains( candidate ) )
{
candidate++;
}
return can... | [
"Returns the first number available, starting at portNumberStartingPoint that's not already in the reservedPorts\nlist.\n\n@param portNumberStartingPoint first port number to start from.\n@param reservedPorts the ports already reserved.\n@return first number available not in the given list, starting at the given pa... | [
"Changes the given filenames suffix from the current suffix to the provided suffix.\n\n<b>Directly exposed for JSP EL</b>, not through {@link org.opencms.jsp.util.CmsJspElFunctions}.<p>\n\n@param filename the filename to be changed\n@param suffix the new suffix of the file\n\n@return the filename with the replaced ... |
public static void openFavoriteDialog(CmsFileExplorer explorer) {
try {
CmsExplorerFavoriteContext context = new CmsExplorerFavoriteContext(A_CmsUI.getCmsObject(), explorer);
CmsFavoriteDialog dialog = new CmsFavoriteDialog(context, new CmsFavoriteDAO(A_CmsUI.getCmsObject()));
... | [
"Opens the favorite dialog.\n\n@param explorer the explorer instance (null if not currently in explorer)"
] | [
"Sets the name of the designated bone.\n\n@param boneindex zero based index of bone to rotate.\n@param bonename string with name of bone.\n. * @see #getBoneName",
"Reads and sets the next feed in the stream.",
"create logs with given partition number\n\n@param topic the topic name\n@param partitions... |
public double[] getRegressionCoefficients(RandomVariable value) {
if(basisFunctions.length == 0) {
return new double[] { };
}
else if(basisFunctions.length == 1) {
/*
* Regression with one basis function is just a projection on that vector. <b,x>/<b,b>
*/
return new double[] { value.mult(basisFun... | [
"Get the vector of regression coefficients.\n\n@param value The random variable to regress.\n@return The vector of regression coefficients."
] | [
"returns true if there are still more rows in the underlying ResultSet.\nReturns false if ResultSet is exhausted.",
"Read resource data.",
"Calculate start dates for a monthly relative recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Lift a Java Fun... |
public Jar setJarPrefix(Path file) {
verifyNotSealed();
if (jos != null)
throw new IllegalStateException("Really executable cannot be set after entries are added.");
if (file != null && jarPrefixStr != null)
throw new IllegalStateException("A prefix has already been set (... | [
"Sets a file whose contents will be prepended to the JAR file's data.\n\n@param file the prefix file, or {@code null} for none.\n@return {@code this}"
] | [
"Fall-back for types that are not handled by a subclasse's dispatch method.",
"Gets an array of of all registered ConstantMetaClassListener instances.",
"Return the next word of the string, in other words it stops when a space is encountered.",
"Returns the default privacy level preference for the user.\n\n@s... |
public void performActions() {
if (this.clientConfiguration.getActions().isEmpty()) {
this.clientConfiguration.printHelp();
return;
}
this.dumpProcessingController.setOfflineMode(this.clientConfiguration
.getOfflineMode());
if (this.clientConfiguration.getDumpDirectoryLocation() != null) {
try {
... | [
"Performs all actions that have been configured."
] | [
"Get a collection of methods declared on this object by method name and parameter count.\n\n@param name the name of the method\n@param paramCount the number of parameters\n@return the (possibly empty) collection of methods with the given name and parameter count",
"Resolve the boot updates and register at t... |
@Override
public JulianDate date(int prolepticYear, int month, int dayOfMonth) {
return JulianDate.of(prolepticYear, month, dayOfMonth);
} | [
"Obtains a local date in Julian 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 Julian local date, not null\n@throws DateTimeException if unable to create t... | [
"package for testing purpose",
"Flat the map of list of string to map of strings, with theoriginal values, seperated by comma",
"Method to get the file writer required for the .story files\n\n@param scenarioName\n@param aux_package_path\n@param dest_dir\n@return The file writer that generates the .story files f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.