query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
public static void detectAndApply(Widget widget) {
if (!widget.isAttached()) {
widget.addAttachHandler(event -> {
if (event.isAttached()) {
detectAndApply();
}
});
} else {
detectAndApply();
}
} | [
"Detect and apply waves, now or when the widget is attached.\n\n@param widget target widget to ensure is attached first"
] | [
"Creates a sort configuration iff at least one of the parameters is not null and the options list is not empty.\n@param sortParam The request parameter used to send the currently chosen search option.\n@param options The available sort options.\n@param defaultOption The default sort option.\n@return the sort config... |
public void afterDeploymentValidation(@Observes @Priority(1) AfterDeploymentValidation event, BeanManager beanManager) {
BeanManagerImpl manager = BeanManagerProxy.unwrap(beanManager);
probe.init(manager);
if (isJMXSupportEnabled(manager)) {
try {
MBeanServer mbs = Ma... | [
"any possible bean invocations from other ADV observers"
] | [
"performs a DELETE operation against RDBMS.\n@param cld ClassDescriptor providing mapping information.\n@param obj The object to be deleted.",
"Wait and retry.",
"Creates the actual path to the xml file of the module.",
"This method is used to automatically generate a value\nfor the Outline Number field of th... |
public void seek(final int position) throws IOException {
if (position < 0) {
throw new IllegalArgumentException("position < 0: " + position);
}
if (position > size) {
throw new EOFException();
}
this.pointer = position;
} | [
"Sets the file-pointer offset, measured from the beginning of this file,\nat which the next read or write occurs."
] | [
"Generates the body of a toString method that uses a StringBuilder.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\noptional, we have no choice but to track the separators at runtime, but if any of them will\nalways be present, we can actually do the hard work at compil... |
public void setLabel(String label) {
int ix = lstSizes.indexOf(label);
if (ix != -1) {
setLabel(ix);
}
} | [
"Set the String-representation of size.\n\nLike: Square, Thumbnail, Small, Medium, Large, Original.\n\n@param label"
] | [
"Cancel a particular download in progress. Returns 1 if the download Id is found else returns 0.\n\n@param downloadId\n@return int",
"Reduce the given value to the nearest smaller 1 significant digit number starting with 1, 2 or 5.\n\n@param value the value to find a nice number for.\n@param scaleUnit the unit of... |
public static String replaceAnyOf(String value, String chars,
char replacement) {
char[] tmp = new char[value.length()];
int pos = 0;
for (int ix = 0; ix < tmp.length; ix++) {
char ch = value.charAt(ix);
if (chars.indexOf(ch) != -1)
tmp[pos++] = replac... | [
"Replaces all characters in the second parameter found in the first\nparameter with the final character.\n@param value the string to replace characters in\n@param chars the characters to replace\n@param replacement the character to insert as replacement"
] | [
"Get a property as a float or Default value.\n\n@param key the property name\n@param defaultValue default value",
"Check if the gravity and orientation are not in conflict one with other.\n@param gravity\n@param orientation\n@return true if orientation and gravity can be applied together, false - otherwise",
"C... |
public static String format(final String code, final Properties options, final LineEnding lineEnding) {
Check.notEmpty(code, "code");
Check.notEmpty(options, "options");
Check.notNull(lineEnding, "lineEnding");
final CodeFormatter formatter = ToolFactory.createCodeFormatter(options);
final String lineSeparat... | [
"Pretty prints the given source code.\n\n@param code\nsource code to format\n@param options\nformatter options\n@param lineEnding\ndesired line ending\n@return formatted source code"
] | [
"Returns all the version directories present in the root directory\nspecified\n\n@param rootDir The parent directory\n@param maxId The\n@return An array of version directories",
"Return a copy of the zoom level scale denominators. Scales are sorted greatest to least.",
"Writes a list of timephased data to the M... |
private boolean parseRemoteDomainControllerAttributes_1_5(final XMLExtendedStreamReader reader, final ModelNode address,
final List<ModelNode> list, boolean allowDiscoveryOptions) throws XMLStreamException {
final ModelNode update = new ModelNode();... | [
"The only difference between version 1.5 and 1.6 of the schema were to make is possible to define discovery options, this\nresulted in the host and port attributes becoming optional -this method also indicates if discovery options are required\nwhere the host and port were not supplied.\n\n@param allowDiscoveryOpti... | [
"Configure the access permissions required to access this print job.\n\n@param template the containing print template which should have sufficient information to\nconfigure the access.\n@param context the application context",
"Allows direct access to the Undertow.Builder for custom configuration\n\n@param server... |
public static TestSpecification generateSpecification(@Nonnull final TestDefinition testDefinition) {
final TestSpecification testSpecification = new TestSpecification();
// Sort buckets by value ascending
final Map<String,Integer> buckets = Maps.newLinkedHashMap();
final List<TestBucket... | [
"Generates a usable test specification for a given test definition\nUses the first bucket as the fallback value\n\n@param testDefinition a {@link TestDefinition}\n@return a {@link TestSpecification} which corresponding to given test definition."
] | [
"Return the filesystem path needed to mount the NFS filesystem associated with a particular media slot.\n\n@param slot the slot whose filesystem is desired\n\n@return the path to use in the NFS mount request to access the files mounted in that slot\n\n@throws IllegalArgumentException if it is a slot that we don't k... |
boolean lock(final Integer permit, final long timeout, final TimeUnit unit) {
boolean result = false;
try {
result = lockInterruptibly(permit, timeout, unit);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
return result;
} | [
"Attempts exclusive acquisition with a max wait time.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@param timeout - the time value to wait for acquiring the lock\n@param unit - See {@code TimeUnit} for valid values\n@return {@code boolean} true on success."
] | [
"Enables or disables auto closing when selecting a date.",
"Gets fully-qualified name of a table or sequence.\n\n@param localName local table name.\n@param params params.\n@return fully-qualified table name.",
"Creates a new empty HTML document tree.\n@throws ParserConfigurationException",
"Use this API to... |
public void setEmptyDefault(String iso) {
if (iso == null || iso.isEmpty()) {
iso = DEFAULT_COUNTRY;
}
int defaultIdx = mCountries.indexOfIso(iso);
mSelectedCountry = mCountries.get(defaultIdx);
mCountrySpinner.setSelection(defaultIdx);
} | [
"Set default value with\n\n@param iso ISO2 of country"
] | [
"Get a View that displays the data at the specified\nposition in the data set.\n\n@param position Position of the item whose data we want\n@param convertView View to recycle, if not null\n@param parent ViewGroup containing the returned View",
"Convert an array of bytes into an array of ints. 4 bytes from... |
public void selectByName(String childName)
{
int i = 0;
GVRSceneObject owner = getOwnerObject();
if (owner == null)
{
return;
}
for (GVRSceneObject child : owner.children())
{
if (child.getName().equals(childName))
{
... | [
"Sets the current switch index based on object name.\nThis function finds the child of the scene object\nthis component is attached to and sets the switch\nindex to reference it so this is the object that\nwill be displayed.\n\nIf it is out of range, none of the children will be shown.\n@param childName name of chi... | [
"Delivers the correct JSON Object for the stencilId\n\n@param stencilId\n@throws org.json.JSONException",
"Reads the configuration of a range facet.\n@param pathPrefix The XML Path that leads to the range facet configuration, or <code>null</code> if the XML was not correctly structured.\n@return The read configur... |
public static base_responses flush(nitro_service client, cacheobject resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
cacheobject flushresources[] = new cacheobject[resources.length];
for (int i=0;i<resources.length;i++){
flushresources[i] = ne... | [
"Use this API to flush cacheobject resources."
] | [
"Retrieves the timephased breakdown of the planned overtime work for this\nresource assignment.\n\n@return timephased planned work",
"Returns the optional query modifier.\n@return the optional query modifier.",
"Calls the specified Stitch function.\n\n@param name the name of the Stitch function to call.\n@param... |
public static void openLogFile(String logPath) {
if (logPath == null) {
printStream = System.out;
} else {
try {
printStream = new PrintStream(new File(logPath));
} catch (FileNotFoundException e) {
throw new IllegalArgumentException("Log file " + logPath + " was not found", e);
}
}
} | [
"Reopen the associated static logging stream. Set to null to redirect to System.out."
] | [
"Set the start time.\n@param date the start time to set.",
"Get an array of property ids.\n\nNot all property ids need be returned. Those properties\nwhose ids are not returned are considered non-enumerable.\n\n@return an array of Objects. Each entry in the array is either\na java.lang.String or a java.lang.Numbe... |
public static PackageNameMappingWithPackagePattern fromPackage(String packagePattern)
{
PackageNameMapping packageNameMapping = new PackageNameMapping();
packageNameMapping.setPackagePattern(packagePattern);
return packageNameMapping;
} | [
"Sets the package pattern to match against."
] | [
"prefix the this class fk columns with the indirection table",
"Gets a list of split keys given a desired number of splits.\n\n<p>This list will contain multiple split keys for each split. Only a single split key\nwill be chosen as the split point, however providing multiple keys allows for more uniform\nsharding... |
@RequestMapping(value = "/api/profile", method = RequestMethod.GET)
public
@ResponseBody
HashMap<String, Object> getList(Model model) throws Exception {
logger.info("Using a GET request to list profiles");
return Utils.getJQGridJSON(profileService.findAllProfiles(), "profiles");
} | [
"Obtain collection of profiles\n\n@param model\n@return\n@throws Exception"
] | [
"Create a local target.\n\n@param jbossHome the jboss home\n@param moduleRoots the module roots\n@param bundlesRoots the bundle roots\n@return the local target\n@throws IOException",
"Creates a ProjectCalendar instance from the Asta data.\n\n@param calendarRow basic calendar data\n@param workPatte... |
public static final CurrencySymbolPosition parseCurrencySymbolPosition(String value)
{
CurrencySymbolPosition result = CurrencySymbolPosition.BEFORE;
switch (NumberHelper.getInt(value))
{
case 0:
{
result = CurrencySymbolPosition.BEFORE;
break;
}
... | [
"Parse a currency symbol position value.\n\n@param value currency symbol position\n@return CurrencySymbolPosition instance"
] | [
"This filter uses a 9-patch to overlay the image.\n\n@param imageUrl Watermark image URL. It is very important to understand that the same image\nloader that Thumbor uses will be used here.",
"Sends the collected dependencies over to the master and record them.",
"Explicitly set the end time of the event.\n\nIf... |
public base_response enable_features(String[] features) throws Exception
{
base_response result = null;
nsfeature resource = new nsfeature();
resource.set_feature(features);
options option = new options();
option.set_action("enable");
result = resource.perform_operation(this, option);
return result;
} | [
"Use this API to enable the feature on Netscaler.\n@param feature feature to be enabled.\n@return status of the operation performed.\n@throws Exception Nitro exception."
] | [
"Convert a Java String instance into the equivalent array of single or\ndouble bytes.\n\n@param value Java String instance representing text\n@param unicode true if double byte characters are required\n@return byte array representing the supplied text",
"Read multiple columns from a block.\n\n@param startIndex st... |
public static aaauser_aaagroup_binding[] get(nitro_service service, String username) throws Exception{
aaauser_aaagroup_binding obj = new aaauser_aaagroup_binding();
obj.set_username(username);
aaauser_aaagroup_binding response[] = (aaauser_aaagroup_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch aaauser_aaagroup_binding resources of given name ."
] | [
"Use this API to fetch filtered set of dbdbprofile resources.\nset the filter parameter values in filtervalue object.",
"ten less than Cube Q",
"To be used with AutoText class constants ALIGMENT_LEFT, ALIGMENT_CENTER and ALIGMENT_RIGHT\n@param aligment\n@return",
"Split string of comma-delimited ints into an ... |
public static base_response delete(nitro_service client, nsip6 resource) throws Exception {
nsip6 deleteresource = new nsip6();
deleteresource.ipv6address = resource.ipv6address;
deleteresource.td = resource.td;
return deleteresource.delete_resource(client);
} | [
"Use this API to delete nsip6."
] | [
"Computes the p=2 norm. If A is a matrix then the induced norm is computed. This\nimplementation is faster, but more prone to buffer overflow or underflow problems.\n\n@param A Matrix or vector.\n@return The norm.",
"Visit an open package of the current module.\n\n@param packaze the qualified name of the opened ... |
public synchronized void start() {
if ((todoFlags & RECORD_CPUTIME) != 0) {
currentStartCpuTime = getThreadCpuTime(threadId);
} else {
currentStartCpuTime = -1;
}
if ((todoFlags & RECORD_WALLTIME) != 0) {
currentStartWallTime = System.nanoTime();
} else {
currentStartWallTime = -1;
}
isRunning... | [
"Start the timer."
] | [
"Calculates the beginLine of a violation report.\n\n@param pmdViolation The violation for which the beginLine should be calculated.\n@return The beginLine is assumed to be the line with the smallest number. However, if the smallest number is\nout-of-range (non-positive), it takes the other number.",
"Returns a li... |
protected void markStatementsForInsertion(
StatementDocument currentDocument, List<Statement> addStatements) {
for (Statement statement : addStatements) {
addStatement(statement, true);
}
for (StatementGroup sg : currentDocument.getStatementGroups()) {
if (this.toKeep.containsKey(sg.getProperty())) {
... | [
"Marks a given list of statements for insertion into the current document.\nInserted statements can have an id if they should update an existing\nstatement, or use an empty string as id if they should be added. The\nmethod removes duplicates and avoids unnecessary modifications by\nchecking the current content of t... | [
"With this impl, it only returns the same credentials once. Otherwise it's possible that a loop will occur.\nWhen server returns status code 401, the HTTP client provides the same credentials forever.\nSince we create a new HTTP client for every request, we can handle it this way.",
"Use this API to fetch vpath r... |
private void writeTaskBaselines(Project.Tasks.Task xmlTask, Task mpxjTask)
{
Project.Tasks.Task.Baseline baseline = m_factory.createProjectTasksTaskBaseline();
boolean populated = false;
Number cost = mpxjTask.getBaselineCost();
if (cost != null && cost.intValue() != 0)
{
popu... | [
"Writes task baseline data.\n\n@param xmlTask MSPDI task\n@param mpxjTask MPXJ task"
] | [
"Write the criteria elements, extracting the information of the sub-model.\n\n@param writer the xml stream writer\n@param subModel the interface model\n@param nested whether it the criteria elements are nested as part of <not /> or <any />\n@throws XMLStreamException",
"handle case where Instant is outside th... |
private ProjectFile readDatabaseFile(InputStream inputStream) throws MPXJException
{
ProjectReader reader = new AstaDatabaseFileReader();
addListeners(reader);
return reader.read(inputStream);
} | [
"Process a SQLite database PP file.\n\n@param inputStream file input stream\n@return ProjectFile instance"
] | [
"Set the mesh to be tested against.\n\n@param mesh\nThe {@link GVRMesh} that the picking ray will test against.",
"Sets the debug JPDA remote socket debugging argument.\n\n@param suspend {@code true} to suspend otherwise {@code false}\n@param port the port to listen on\n\n@return the builder",
"Get all field... |
void writeInterPropertyLinks(PropertyDocument document)
throws RDFHandlerException {
Resource subject = this.rdfWriter.getUri(document.getEntityId()
.getIri());
this.rdfWriter.writeTripleUriObject(subject, this.rdfWriter
.getUri(Vocabulary.WB_DIRECT_CLAIM_PROP), Vocabulary
.getPropertyUri(document.ge... | [
"Writes triples which conect properties with there corresponding rdf\nproperties for statements, simple statements, qualifiers, reference\nattributes and values.\n\n@param document\n@throws RDFHandlerException"
] | [
"The derivative of the objective function. You may override this method\nif you like to implement your own derivative.\n\n@param parameters Input value. The parameter vector.\n@param derivatives Output value, where derivatives[i][j] is d(value(j)) / d(parameters(i)\n@throws SolverException Thrown if the valuation f... |
public long queryForCountStar(DatabaseConnection databaseConnection) throws SQLException {
if (countStarQuery == null) {
StringBuilder sb = new StringBuilder(64);
sb.append("SELECT COUNT(*) FROM ");
databaseType.appendEscapedEntityName(sb, tableInfo.getTableName());
countStarQuery = sb.toString();
}
l... | [
"Return a long value which is the number of rows in the table."
] | [
"If an error is thrown while loading zone data, the exception is logged\nto system error and null is returned for this and all future requests.\n\n@param id the id to load\n@return the loaded zone",
"Use this API to fetch all the vpath resources that are configured on netscaler.",
"Probe the existing cluster t... |
public static base_response delete(nitro_service client, String network) throws Exception {
route6 deleteresource = new route6();
deleteresource.network = network;
return deleteresource.delete_resource(client);
} | [
"Use this API to delete route6 of given name."
] | [
"Repeat a CharSequence a certain number of times.\n\n@param self a CharSequence to be repeated\n@param factor the number of times the CharSequence should be repeated\n@return a String composed of a repetition\n@throws IllegalArgumentException if the number of repetitions is < 0\n@since 1.8.2",
"URL-encodes a... |
void execute(ExecutableBuilder builder,
int timeout,
TimeUnit unit) throws
CommandLineException,
InterruptedException, ExecutionException, TimeoutException {
Future<Void> task = executorService.submit(() -> {
builder.build().execute();
retu... | [
"The CommandContext can be retrieved thatnks to the ExecutableBuilder."
] | [
"Constructs the convex hull of a set of points whose coordinates are given\nby an array of doubles.\n\n@param coords\nx, y, and z coordinates of each input point. The length of\nthis array must be at least three times <code>nump</code>.\n@param nump\nnumber of input points\n@throws IllegalArgumentException\nthe num... |
public static base_response save(nitro_service client) throws Exception {
nsconfig saveresource = new nsconfig();
return saveresource.perform_operation(client,"save");
} | [
"Use this API to save nsconfig."
] | [
"Check that the range resulting from the mask is contiguous, otherwise we cannot represent it.\n\nFor instance, for the range 0 to 3 (bits are 00 to 11), if we mask all 4 numbers from 0 to 3 with 2 (ie bits are 10),\nthen we are left with 1 and 3. 2 is not included. So we cannot represent 1 and 3 as a contiguous ... |
public void setWorkingDay(Day day, DayType working)
{
DayType value;
if (working == null)
{
if (isDerived())
{
value = DayType.DEFAULT;
}
else
{
value = DayType.WORKING;
}
}
else
{
value = work... | [
"This is a convenience method provided to allow a day to be set\nas working or non-working, by using the day number to\nidentify the required day.\n\n@param day required day\n@param working flag indicating if the day is a working day"
] | [
"Use this API to reset appfwlearningdata.",
"Subtract two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the subtract of specified complex numbers.",
"Generates a change event for a local update of a document in the given namespace... |
public static long convertBytesToLong(byte[] bytes, int offset)
{
long value = 0;
for (int i = offset; i < offset + 8; i++)
{
byte b = bytes[i];
value <<= 8;
value |= b;
}
return value;
} | [
"Utility method to convert an array of bytes into a long. Byte ordered is\nassumed to be big-endian.\n@param bytes The data to read from.\n@param offset The position to start reading the 8-byte long from.\n@return The 64-bit integer represented by the eight bytes.\n@since 1.1"
] | [
"Handle value change event on the individual dates list.\n@param event the change event.",
"Use this API to fetch all the cacheselector resources that are configured on netscaler.",
"Creates a new undeploy description.\n\n@param deploymentDescription the deployment description to copy\n\n@return the description... |
private static Class getClassForClassNode(ClassNode type) {
// todo hamlet - move to a different "InferenceUtil" object
Class primitiveType = getPrimitiveType(type);
if (primitiveType != null) {
return primitiveType;
} else if (classNodeImplementsType(type, String.class)... | [
"This is private. It is a helper function for the utils."
] | [
"Return the List of Arguments for the specified MethodCallExpression or a ConstructorCallExpression.\nThe returned List contains either ConstantExpression or MapEntryExpression objects.\n@param methodCall - the AST MethodCallExpression or ConstructorCalLExpression\n@return the List of argument objects",
"Iterate ... |
public static PacketType validateHeader(DatagramPacket packet, int port) {
byte[] data = packet.getData();
if (data.length < PACKET_TYPE_OFFSET) {
logger.warn("Packet is too short to be a Pro DJ Link packet; must be at least " + PACKET_TYPE_OFFSET +
" bytes long, was onl... | [
"Check to see whether a packet starts with the standard header bytes, followed by a known byte identifying it.\nIf so, return the kind of packet that has been recognized.\n\n@param packet a packet that has just been received\n@param port the port on which the packet has been received\n\n@return the type of packet t... | [
"Reads all text of the XML tag and returns it as a String.\nAssumes that a '<' character has already been read.\n\n@param r The reader to read from\n@return The String representing the tag, or null if one couldn't be read\n(i.e., EOF). The returned item is a complete tag including angle\nbrackets, such as <code>&l... |
public void resume() {
this.paused = false;
ServerActivityCallback listener = listenerUpdater.get(this);
if (listener != null) {
listenerUpdater.compareAndSet(this, listener, null);
}
} | [
"Cancel the pause operation"
] | [
"Retrieve a Double from an input stream.\n\n@param is input stream\n@return Double instance",
"Get the TagsInterface for working with Flickr Tags.\n\n@return The TagsInterface",
"Add precedence -10 because we need that ContainerRegistry is available in the Arquillian scope.",
"Use this API to update systemuse... |
public void setDefaults(Annotation[] defaultAnnotations) {
if (defaultAnnotations == null) {
return;
}
for (Annotation each : defaultAnnotations) {
Class<? extends Annotation> key = each.annotationType();
if (Title.class.equals(key) || Description.class.equals... | [
"Set default values for annotations.\nInitial annotation take precedence over the default annotation when both annotation types are present\n\n@param defaultAnnotations default value for annotations"
] | [
"Calculate the name of the output value.\n\n@param outputPrefix a nullable prefix to prepend to the name if non-null and non-empty\n@param outputMapper the name mapper\n@param field the field containing the value",
"Method used to write the name of the scenarios methods\n\n@param word\n@return the same word start... |
protected void processStart(Endpoint endpoint, EventTypeEnum eventType) {
if (!sendLifecycleEvent) {
return;
}
Event event = createEvent(endpoint, eventType);
queue.add(event);
} | [
"Process start.\n\n@param endpoint the endpoint\n@param eventType the event type"
] | [
"Parses a String email address to an IMAP address string.",
"Create a WebDriver backed EmbeddedBrowser.\n\n@param driver The WebDriver to use.\n@param filterAttributes the attributes to be filtered from DOM.\n@param crawlWaitReload the period to wait after a reload.\n@param crawlWaitEvent the period ... |
public static FullTypeSignature getTypeSignature(String typeSignatureString,
boolean useInternalFormFullyQualifiedName) {
String key;
if (!useInternalFormFullyQualifiedName) {
key = typeSignatureString.replace('.', '/')
.replace('$', '.');
} else {
key = typeSignatureString;
}
// we always use ... | [
"get TypeSignature given the signature\n\n@param typeSignature\n@param useInternalFormFullyQualifiedName\nif true, fqn in parameterizedTypeSignature must be in the form\n'java/lang/Thread'. If false fqn must be of the form\n'java.lang.Thread'\n@return"
] | [
"Do synchronization of the given J2EE ODMG Transaction",
"Carry out any post-processing required to tidy up\nthe data read from the database.",
"Gets the site label for the entry.\n\n@param cms the current CMS context\n@param entry the entry\n@return the site label for the entry",
"Remove duplicate Strings fr... |
public static <E extends Enum<E>> EnumStringConverter<E> create(Class<E> enumType) {
return new EnumStringConverter<E>(enumType);
} | [
"Factory method to create EnumStringConverter\n\n@param <E>\nenum type inferred from enumType parameter\n@param enumType\nparticular enum class\n@return instance of EnumConverter"
] | [
"Return the knot at a given position.\n@param x the position\n@return the knot number, or 1 if no knot found",
"Specify the artifact configuration to be searched for\n@param artifact configured artifact object\n@return",
"Calculate the adjusted forward swaprate corresponding to a change of payoff unit from the ... |
public static Artifact getIdlArtifact(Artifact artifact, ArtifactFactory artifactFactory,
ArtifactResolver artifactResolver,
ArtifactRepository localRepository,
List<ArtifactRepository> remoteRepos,
... | [
"Resolves an idl jar for the artifact.\n@return Returns idl artifact\n@throws MojoExecutionException is idl jar is not present for the artifact."
] | [
"Convenience method to allow a cause. Grrrr.",
"Add the final assignment of the property to the partial value object's source code.",
"creates a bounds object with both point parsed from the json and set it\nto the current shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Accesses a p... |
public static String getDefaultJdbcTypeFor(String javaType)
{
return _jdbcMappings.containsKey(javaType) ? (String)_jdbcMappings.get(javaType) : JDBC_DEFAULT_TYPE;
} | [
"Returns the default jdbc type for the given java type.\n\n@param javaType The qualified java type\n@return The default jdbc type"
] | [
"Add a column to be set to a value for UPDATE statements. This will generate something like 'columnName =\nexpression' where the expression is built by the caller.\n\n<p>\nThe expression should have any strings escaped using the {@link #escapeValue(String)} or\n{@link #escapeValue(StringBuilder, String)} methods an... |
private void writeProjectProperties(ProjectProperties record) throws IOException
{
// the ProjectProperties class from MPXJ has the details of how many days per week etc....
// so I've assigned these variables in here, but actually use them in other methods
// see the write task method, that's wher... | [
"Write project properties.\n\n@param record project properties\n@throws IOException"
] | [
"The indices space is ignored for reduce ops other than min or max.",
"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 ManagementResourceRegistrati... |
protected String parseOptionalStringValue(final String path) {
final I_CmsXmlContentValue value = m_xml.getValue(path, m_locale);
if (value == null) {
return null;
} else {
return value.getStringValue(null);
}
} | [
"Helper to read an optional String value.\n@param path The XML path of the element to read.\n@return The String value stored in the XML, or <code>null</code> if the value could not be read."
] | [
"Sets the quaternion of the keyframe.",
"URL-encodes a given string using ISO-8859-1, which may work better with web pages and umlauts compared to UTF-8.\nNo UnsupportedEncodingException to handle as it is dealt with in this method.",
"generate a prepared DELETE-Statement according to query\n@param query the Qu... |
public void setEnterpriseCost(int index, Number value)
{
set(selectField(AssignmentFieldLists.ENTERPRISE_COST, index), value);
} | [
"Set an enterprise cost value.\n\n@param index cost index (1-30)\n@param value cost value"
] | [
"Unmarshal the XML content with auto-correction.\n@param file the file that contains the XML\n@return the XML read from the file\n@throws CmsXmlException thrown if the XML can't be read.",
"Get string value of flow context for current instance\n@return string value of flow context",
"Computes A-B\n\n@param list... |
public ServerSetup createCopy(String bindAddress) {
ServerSetup setup = new ServerSetup(getPort(), bindAddress, getProtocol());
setup.setServerStartupTimeout(getServerStartupTimeout());
setup.setConnectionTimeout(getConnectionTimeout());
setup.setReadTimeout(getReadTimeout());
... | [
"Create a deep copy.\n\n@param bindAddress overwrites bind address when creating deep copy.\n@return a copy of the server setup configuration."
] | [
"return the workspace size needed for ctc",
"Connect sync.\n\n@param configuration the protocol configuration\n@return the connection\n@throws IOException",
"Reads Phoenix resource assignments.\n\n@param mpxjResource MPXJ resource\n@param res Phoenix resource",
"Use this API to fetch all the cmpparameter reso... |
public static String getSerializedVectorClocks(List<VectorClock> vectorClocks) {
List<VectorClockWrapper> vectorClockWrappers = new ArrayList<VectorClockWrapper>();
for(VectorClock vc: vectorClocks) {
vectorClockWrappers.add(new VectorClockWrapper(vc));
}
String serializedVC ... | [
"Function to serialize the given list of Vector clocks into a string. If\nsomething goes wrong, it returns an empty string.\n\n@param vectorClocks The Vector clock list to serialize\n@return The string (JSON) version of the specified Vector clock"
] | [
"Gets the Topsoe divergence.\n\n@param p P vector.\n@param q Q vector.\n@return The Topsoe divergence between p and q.",
"Finish service initialization.\n\n@throws GeomajasException oops",
"Randomly generates matrix with the specified number of matrix elements filled with values from min to max.\n\n@param numRo... |
public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException {
List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>();
while (true) {
DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader);
if (config == null) {
... | [
"Load in a number of database configuration entries from a buffered reader."
] | [
"Syncronously creates a Renderscript context if none exists.\nCreating a Renderscript context takes about 20 ms in Nexus 5\n\n@return",
"Returns the compact records for all attachments on the task.\n\n@param task Globally unique identifier for the task.\n@return Request object",
"checks if there is a writelock... |
public static NamingConvention determineNamingConvention(
TypeElement type,
Iterable<ExecutableElement> methods,
Messager messager,
Types types) {
ExecutableElement beanMethod = null;
ExecutableElement prefixlessMethod = null;
for (ExecutableElement method : methods) {
switch (... | [
"Determine whether the user has followed bean-like naming convention or not."
] | [
"Return input mapper from processor.",
"Set the main attribute \"Bundle-RequiredExecutionEnvironment\" to the given\nvalue.\n\n@param bree The new value",
"Determines total number of partition-stores moved across zones.\n\n@return number of cross zone partition-store moves",
"Return a long value from a prepar... |
public void errorFuture(UUID taskId, Exception e) {
DistributedFuture<GROUP, Serializable> future = remove(taskId);
if(future != null) {
future.setException(e);
}
} | [
"handles when a member leaves and hazelcast partition data is lost. We want\nto find the Futures that are waiting on lost data and error them"
] | [
"Creates a new capsule\n\n@param mode the capsule mode, or {@code null} for the default mode\n@param wrappedJar a path to a capsule JAR that will be launched (wrapped) by the empty capsule in {@code jarFile}\nor {@code null} if no wrapped capsule is wanted\n@return the capsule.",
"Refresh children using rea... |
private ArrayList handleDependentReferences(Identity oid, Object userObject,
Object[] origFields, Object[] newFields, Object[] newRefs)
throws LockingException
{
ClassDescriptor mif = _pb.getClassDescriptor(userObject.getClass());
FieldDescriptor[] fieldDescs = mif.getFi... | [
"Mark for creation all newly introduced dependent references.\nMark for deletion all nullified dependent references.\n@return the list of created objects"
] | [
"Creates an element that represents a single positioned box with no content.\n@return the resulting DOM element",
"Get a timer of the given string name for the given thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\n... |
public void render(OutputStream outputStream, Format format, int dpi) throws PrintingException {
try {
if (baos == null) {
prepare();
}
writeDocument(outputStream, format, dpi);
} catch (Exception e) { // NOSONAR
throw new PrintingException(e, PrintingException.DOCUMENT_RENDER_PROBLEM);
}
} | [
"Renders the document to the specified output stream."
] | [
"Return the available format ids.",
"Downloads this version of the file to a given OutputStream while reporting the progress to a ProgressListener.\n@param output the stream to where the file will be written.\n@param listener a listener for monitoring the download's progress.",
"Adds an audio source to the au... |
private void setResponeHeaders(HttpServletResponse response) {
response.setHeader("Cache-Control", "no-store, no-cache");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", System.currentTimeMillis());
response.setContentType("text/plain; charset=utf-8");
... | [
"Sets the appropriate headers to response of this request.\n\n@param response The HttpServletResponse response object."
] | [
"Process StepFinishedEvent. Change last added to stepStorage step\nand add it as child of previous step.\n\n@param event to process",
"Find the earliest task start date. We treat this as the\nstart date for the project.\n\n@return start date",
"Use this API to fetch filtered set of lbvserver resources.\nset the... |
public FailureDetectorConfig setCluster(Cluster cluster) {
Utils.notNull(cluster);
this.cluster = cluster;
/*
* FIXME: this is the hacky way to refresh the admin connection
* verifier, but it'll just work. The clean way to do so is to have a
* centralized metadata mana... | [
"Look at the comments on cluster variable to see why this is problematic"
] | [
"Initial random seed used for shuffling test suites and other sources\nof pseudo-randomness. If not set, any random value is set.\n\n<p>The seed's format is compatible with {@link RandomizedRunner} so that\nseed can be fixed for suites and methods alike.",
"Remove a DropPasteWorker from the helper.\n@param worker... |
public static Transformers.ResourceIgnoredTransformationRegistry createServerIgnoredRegistry(final RequiredConfigurationHolder rc, final Transformers.ResourceIgnoredTransformationRegistry delegate) {
return new Transformers.ResourceIgnoredTransformationRegistry() {
@Override
public boole... | [
"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 transformation registry for manually ignored resources\n@return"
] | [
"Helper method to abstract out the common logic from the various users methods.\n\n@param api the API connection to be used when retrieving the users.\n@param filterTerm The filter term to lookup users by (login for external, login or name for managed)\n@param userType The type of user... |
public ArrayList<Double> segmentCost(ProjectCalendar projectCalendar, List<TimephasedCost> cost, TimescaleUnits rangeUnits, ArrayList<DateRange> dateList)
{
ArrayList<Double> result = new ArrayList<Double>(dateList.size());
int lastStartIndex = 0;
//
// Iterate through the list of dates rang... | [
"This is the main entry point used to convert the internal representation\nof timephased cost into an external form which can\nbe displayed to the user.\n\n@param projectCalendar calendar used by the resource assignment\n@param cost timephased resource assignment data\n@param rangeUnits timescale units\n@param date... | [
"Returns the value of the specified matrix element. Performs a bounds check to make sure\nthe requested element is part of the matrix.\n\n@param row The row of the element.\n@param col The column of the element.\n@return The value of the element.",
"Gets the index to use in the search.\n\n@return the index to u... |
public static base_response update(nitro_service client, snmpmanager resource) throws Exception {
snmpmanager updateresource = new snmpmanager();
updateresource.ipaddress = resource.ipaddress;
updateresource.netmask = resource.netmask;
updateresource.domainresolveretry = resource.domainresolveretry;
return up... | [
"Use this API to update snmpmanager."
] | [
"Creates multiple aliases at once.",
"Use this API to update cachecontentgroup.",
"Register a new TypeConverter for parsing and serialization.\n\n@param cls The class for which the TypeConverter should be used.\n@param converter The TypeConverter",
"Reads data from the SP file.\n\n@return Project File instanc... |
public Iterator<BoxItem.Info> iterator() {
URL url = GET_ITEMS_URL.build(this.api.getBaseURL());
return new BoxItemIterator(this.api, url);
} | [
"Returns an iterator over the items in the trash.\n@return an iterator over the items in the trash."
] | [
"Get the column name from the indirection table.\n@param mnAlias\n@param path",
"Add new control at the end of control bar with specified touch listener and resource.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param ... |
public static double Sinc(double x) {
return Math.sin(Math.PI * x) / (Math.PI * x);
} | [
"Sinc function.\n\n@param x Value.\n@return Sinc of the value."
] | [
"Make sure the result index points to the next available key in the scan result, if exists.",
"Use this API to add dnspolicylabel.",
"Does the server support log downloads?\n\n@param cliGuiCtx The context.\n@return <code>true</code> if the server supports log downloads,\n<code>false</code> otherwise.",
"Disab... |
public void setDialect(String dialect) {
String[] scripts = createScripts.get(dialect);
createSql = scripts[0];
createSqlInd = scripts[1];
} | [
"Sets the database dialect.\n\n@param dialect\nthe database dialect"
] | [
"Close the store.",
"Visits a parameter of this method.\n\n@param name\nparameter name or null if none is provided.\n@param access\nthe parameter's access flags, only <tt>ACC_FINAL</tt>,\n<tt>ACC_SYNTHETIC</tt> or/and <tt>ACC_MANDATED</tt> are\nallowed (see {@link Opcodes}).",
"Open the connection to the server... |
@SuppressWarnings("unchecked")
public static <T> AttachmentKey<T> create(final Class<? super T> valueClass) {
return new SimpleAttachmentKey(valueClass);
} | [
"Construct a new simple attachment key.\n\n@param valueClass the value class\n@param <T> the attachment type\n@return the new instance"
] | [
"Sorts the entries into the order we want to present them in, which is by position, with hot cues coming after\nordinary memory points if both exist at the same position, which often happens.\n\n@param loadedEntries the unsorted entries we have loaded from a dbserver message, metadata cache, or rekordbox\ndatabase ... |
public static final void decodeBuffer(byte[] data, byte encryptionCode)
{
for (int i = 0; i < data.length; i++)
{
data[i] = (byte) (data[i] ^ encryptionCode);
}
} | [
"This method decodes a byte array with the given encryption code\nusing XOR encryption.\n\n@param data Source data\n@param encryptionCode Encryption code"
] | [
"Updates the indices in the index buffer from a Java int array.\nAll of the entries of the input int array are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throw... |
public CustomHeadersInterceptor addHeaderMap(Map<String, String> headers) {
for (Map.Entry<String, String> header : headers.entrySet()) {
this.headers.put(header.getKey(), Collections.singletonList(header.getValue()));
}
return this;
} | [
"Add all headers in a header map.\n\n@param headers a map of headers.\n@return the interceptor instance itself."
] | [
"Get the group URL for the specified group ID\n\n@param groupId\nThe group ID\n@return The group URL\n@throws FlickrException",
"Checks the initialization-method of given class descriptor.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in stri... |
public static base_response Import(nitro_service client, responderhtmlpage resource) throws Exception {
responderhtmlpage Importresource = new responderhtmlpage();
Importresource.src = resource.src;
Importresource.name = resource.name;
Importresource.comment = resource.comment;
Importresource.overwrite = reso... | [
"Use this API to Import responderhtmlpage."
] | [
"Sets the server groups for the deployment.\n\n@param serverGroups the server groups to set\n\n@return this deployment",
"Set the featureModel.\n\n@param featureModel\nfeature model\n@throws LayerException\nproblem setting the feature model\n@since 1.8.0",
"Uses the iterator to run through the dao and retain on... |
public void delete(Vertex vtx1, Vertex vtx2) {
if (vtx1.prev == null) {
head = vtx2.next;
} else {
vtx1.prev.next = vtx2.next;
}
if (vtx2.next == null) {
tail = vtx1.prev;
} else {
vtx2.next.prev = vtx1.prev;
}
} | [
"Deletes a chain of vertices from this list."
] | [
"Establish connection to the ChromeCast device",
"Sets the set of property filters based on the given string.\n\n@param filters\ncomma-separates list of property ids, or \"-\" to filter all\nstatements",
"Returns the ARGB components for all pixels in this image\n\n@return an array containing an array for each A... |
public static int scale(Double factor, int pixel) {
return rgb(
(int) Math.round(factor * red(pixel)),
(int) Math.round(factor * green(pixel)),
(int) Math.round(factor * blue(pixel))
);
} | [
"Scales the brightness of a pixel."
] | [
"Converts a duration to duration time units.\n\n@param value duration value\n@return duration time units",
"Serialize this `AppDescriptor` and output byte array\n\n@return\nserialize this `AppDescriptor` into byte array",
"Overridden 'consume' method. Corresponding parent method will be called necessary number ... |
public Triple<Double, Integer, Integer> getAccuracyInfo()
{
int totalCorrect = tokensCorrect;
int totalWrong = tokensCount - tokensCorrect;
return new Triple<Double, Integer, Integer>((((double) totalCorrect) / tokensCount),
totalCorrect, totalWrong);
} | [
"Return overall per token accuracy"
] | [
"Read custom property definitions for tasks.\n\n@param gpTasks GanttProject tasks",
"Sets the locale for which the property should be read.\n\n@param locale the locale for which the property should be read.",
"Returns the index of the eigenvalue which has the smallest magnitude.\n\n@return index of the smallest... |
public int getIndexMax() {
int indexMax = 0;
double max = getEigenvalue(0).getMagnitude2();
final int N = getNumberOfEigenvalues();
for( int i = 1; i < N; i++ ) {
double m = getEigenvalue(i).getMagnitude2();
if( m > max ) {
max = m;
... | [
"Returns the index of the eigenvalue which has the largest magnitude.\n\n@return index of the largest magnitude eigen value."
] | [
"Makes it possible to uniquify a collection of objects which are normally\nnon-hashable. Alternatively, it lets you define an alternate hash function\nfor them for limited-use hashing.",
"Returns true if the information in this link should take\nprecedence over the information in the other link.",
"Return the s... |
public static base_response flush(nitro_service client, cachecontentgroup resource) throws Exception {
cachecontentgroup flushresource = new cachecontentgroup();
flushresource.name = resource.name;
flushresource.query = resource.query;
flushresource.host = resource.host;
flushresource.selectorvalue = resource... | [
"Use this API to flush cachecontentgroup."
] | [
"Use this API to delete ntpserver.",
"Make sure that we have some reasonable defaults available. These would typically be provided by the rulesets\nin the real world.",
"Gets the groupby for ReportQueries of all Criteria and Sub Criteria\nthe elements are of class FieldHelper\n@return List of FieldHelper",
"A... |
public static int lookupShaper(String name) {
if (name == null) {
return NOWORDSHAPE;
} else if (name.equalsIgnoreCase("dan1")) {
return WORDSHAPEDAN1;
} else if (name.equalsIgnoreCase("chris1")) {
return WORDSHAPECHRIS1;
} else if (name.equalsIgnoreCase("dan2")) {
return... | [
"Look up a shaper by a short String name.\n\n@param name Shaper name. Known names have patterns along the lines of:\ndan[12](bio)?(UseLC)?, jenny1(useLC)?, chris[1234](useLC)?.\n@return An integer constant for the shaper"
] | [
"Looks up a variable given its name. If none is found then return null.",
"return either the first space or the first nbsp",
"Use this API to unset the properties of sslocspresponder resource.\nProperties that need to be unset are specified in args array.",
"Formats a date or a time range according to the lo... |
private void performTeardownExchange() throws IOException {
Message teardownRequest = new Message(0xfffffffeL, Message.KnownType.TEARDOWN_REQ);
sendMessage(teardownRequest);
// At this point, the server closes the connection from its end, so we can’t read any more.
} | [
"Exchanges the final messages which politely report our intention to disconnect from the dbserver."
] | [
"Prepare a parallel PING Task.\n\n@return the parallel task builder",
"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 ... |
private List<UDFAssignmentType> writeUDFType(FieldTypeClass type, FieldContainer mpxj)
{
List<UDFAssignmentType> out = new ArrayList<UDFAssignmentType>();
for (CustomField cf : m_sortedCustomFieldsList)
{
FieldType fieldType = cf.getFieldType();
if (fieldType != null && type == fi... | [
"Writes a list of UDF types.\n\n@author lsong\n@param type parent entity type\n@param mpxj parent entity\n@return list of UDFAssignmentType instances"
] | [
"Make sure we don't attempt to recover inline; if the parser\nsuccessfully recovers, it won't throw an exception.",
"Perform a one-off scan during boot to establish deployment tasks to execute during boot",
"A factory method for users that need to report success without actually running any analysis. The return... |
public LogStreamResponse getLogs(Log.LogRequestBuilder logRequest) {
return connection.execute(new Log(logRequest), apiKey);
} | [
"Get logs for an app by specifying additional parameters.\n@param logRequest See {LogRequestBuilder}\n@return log stream response"
] | [
"Set the value for a custom request\n\n@param pathId ID of path\n@param customRequest value of custom request\n@param clientUUID UUID of client",
"MPP14 files seem to exhibit some occasional weirdness\nwith duplicate ID values which leads to the task structure\nbeing reported incorrectly. The following method att... |
public static boolean isClosureDeclaration(ASTNode expression) {
if (expression instanceof DeclarationExpression) {
if (((DeclarationExpression) expression).getRightExpression() instanceof ClosureExpression) {
return true;
}
}
if (expression instance... | [
"Returns true if the ASTNode is a declaration of a closure, either as a declaration\nor a field.\n@param expression\nthe target expression\n@return\nas described"
] | [
"This function is intended to detect the subset of IOException which are not\nconsidered recoverable, in which case we want to bubble up the exception, instead\nof retrying.\n\n@throws VoldemortException",
"set the insetsFrameLayout to display the content in fullscreen\nunder the statusBar and navigationBar\n\n@p... |
public String checkIn(byte[] data) {
String id = UUID.randomUUID().toString();
dataMap.put(id, data);
return id;
} | [
"Store the given data and return a uuid for later retrieval of the data\n\n@param data\n@return unique id for the stored data"
] | [
"Build a request URL.\n\n@param host\nThe host\n@param port\nThe port\n@param path\nThe path\n@param parameters\nThe parameters\n@return The URL\n@throws MalformedURLException\n@deprecated use {@link #buildSecureUrl(java.lang.String, int, java.lang.String, java.util.Map) }",
"Non-supported in JadeAgentIntrospecto... |
public boolean ignoreOperation(final Resource domainResource, final Collection<ServerConfigInfo> serverConfigs, final PathAddress pathAddress) {
if (pathAddress.size() == 0) {
return false;
}
boolean ignore = ignoreResourceInternal(domainResource, serverConfigs, pathAddress);
... | [
"For the DC to check whether an operation should be ignored on the slave, if the slave is set up to ignore config not relevant to it\n\n@param domainResource the domain root resource\n@param serverConfigs the server configs the slave is known to have\n@param pathAddress the address of the operation to check if shou... | [
"Returns the specified range of elements in the sorted set.\nThe elements are considered to be ordered from the highest to the lowest score.\nDescending lexicographical order is used for elements with equal score.\nBoth start and stop are zero-based inclusive indexes. They can also be negative numbers indicating of... |
public static long count(nitro_service service, String ciphergroupname) throws Exception{
sslcipher_individualcipher_binding obj = new sslcipher_individualcipher_binding();
obj.set_ciphergroupname(ciphergroupname);
options option = new options();
option.set_count(true);
sslcipher_individualcipher_binding resp... | [
"Use this API to count sslcipher_individualcipher_binding resources configued on NetScaler."
] | [
"Use this API to fetch nstrafficdomain_bridgegroup_binding resources of given name .",
"Creates a producer field\n\n@param field The underlying method abstraction\n@param declaringBean The declaring bean abstraction\n@param beanManager the current manager\n@return A producer field",
"Use this API to f... |
public void inputValues(boolean... values) {
for (boolean value : values) {
InputValue inputValue = new InputValue();
inputValue.setChecked(value);
this.inputValues.add(inputValue);
}
} | [
"Sets the values of this input field. Only Applicable check-boxes and a radio buttons.\n\n@param values Values to set."
] | [
"Sorts the entries into the order we want to present them in, which is by position, with hot cues coming after\nordinary memory points if both exist at the same position, which often happens.\n\n@param loadedEntries the unsorted entries we have loaded from a dbserver message, metadata cache, or rekordbox\ndatabase ... |
public List<Object> getAll(int dataSet) throws SerializationException {
List<Object> result = new ArrayList<Object>();
for (Iterator<DataSet> i = dataSets.iterator(); i.hasNext();) {
DataSet ds = i.next();
DataSetInfo info = ds.getInfo();
if (info.getDataSetNumber() == dataSet) {
result.add(getDa... | [
"Gets all data set values.\n\n@param dataSet\nIIM record and dataset code (See constants in {@link IIM})\n@return data set value\n@throws SerializationException\nif value can't be deserialized from binary representation"
] | [
"Use this API to update gslbsite.",
"Sets the elements in this matrix to be equal to the elements in the passed in matrix.\nBoth matrix must have the same dimension.\n\n@param a The matrix whose value this matrix is being set to.",
"Reads an argument of type \"number\" from the request.",
"Creates the convers... |
public <T> T invokeWithClientSession(int targetPlayer, ClientTask<T> task, String description)
throws Exception {
if (!isRunning()) {
throw new IllegalStateException("ConnectionManager is not running, aborting " + description);
}
final Client client = allocateClient(targ... | [
"Obtain a dbserver client session that can be used to perform some task, call that task with the client,\nthen release the client.\n\n@param targetPlayer the player number whose dbserver we wish to communicate with\n@param task the activity that will be performed with exclusive access to a dbserver connection\n@par... | [
"Diagnostic method used to dump known field map data.\n\n@param props props block containing field map data",
"Returns an attribute's map value from this JAR's manifest's main section.\nThe attributes string value will be split on whitespace into map entries, and each entry will be split on '=' to get the key-val... |
protected static boolean isOperatorLR( Symbol s ) {
if( s == null )
return false;
switch( s ) {
case ELEMENT_DIVIDE:
case ELEMENT_TIMES:
case ELEMENT_POWER:
case RDIVIDE:
case LDIVIDE:
case TIMES:
case POWER... | [
"Operators which affect the variables to its left and right"
] | [
"Returns the Class object of the Event implementation.",
"Convert any number class to array of integer.\n\n@param <T> Type.\n@param array Array.\n@return Integer array.",
"Return whether or not the field value passed in is the default value for the type of the field. Null will return\ntrue.",
"Answer the re... |
public static int[] toInt(double[] array) {
int[] n = new int[array.length];
for (int i = 0; i < array.length; i++) {
n[i] = (int) array[i];
}
return n;
} | [
"1-D Double array to integer array.\n\n@param array Double array.\n@return Integer array."
] | [
"Use this API to fetch the statistics of all spilloverpolicy_stats resources that are configured on netscaler.",
"Process encoded payload.\n\n@throws IOException Signals that an I/O exception has occurred.",
"Find and validate manifest.json file in Artifactory for the current image.\nSince provided imageTag dif... |
public long[] keys() {
long[] values = new long[size];
int idx = 0;
for (Entry entry : table) {
while (entry != null) {
values[idx++] = entry.key;
entry = entry.next;
}
}
return values;
} | [
"Returns all keys in no particular order."
] | [
"Extract WOEID after XML loads",
"This method is used to calculate the duration of work between two fixed\ndates according to the work schedule defined in the named calendar. The\ncalendar used is the \"Standard\" calendar. If this calendar does not exist,\nand exception will be thrown.\n\n@param startDate start ... |
int cancel(int downloadId) {
synchronized (mCurrentRequests) {
for (DownloadRequest request : mCurrentRequests) {
if (request.getDownloadId() == downloadId) {
request.cancel();
return 1;
}
}
}
return 0;
} | [
"Cancel a particular download in progress. Returns 1 if the download Id is found else returns 0.\n\n@param downloadId\n@return int"
] | [
"Scans a single class for Swagger annotations - does not invoke ReaderListeners",
"Set default values for the TimeAndSizeRollingAppender appender\n\n@param appender",
"Returns the active logged in user.",
"Returns true if a List literal that contains only entries that are constants.\n@param expression - any e... |
private ClassNode getGenericsResolvedTypeOfFieldOrProperty(AnnotatedNode an, ClassNode type) {
if (!type.isUsingGenerics()) return type;
Map<String, GenericsType> connections = new HashMap();
//TODO: inner classes mean a different this-type. This is ignored here!
extractGenericsConnectio... | [
"resolves a Field or Property node generics by using the current class and\nthe declaring class to extract the right meaning of the generics symbols\n@param an a FieldNode or PropertyNode\n@param type the origin type\n@return the new ClassNode with corrected generics"
] | [
"Tells you if the date part of a datetime is in a certain time range.",
"Use this API to fetch all the sslservice resources that are configured on netscaler.",
"Translate the operation address.\n\n@param op the operation\n@return the new operation",
"Remove all of the audio sources from the audio manager.\nTh... |
private Map<StandardMethod, UnderrideLevel> findUnderriddenMethods(
Iterable<ExecutableElement> methods) {
Map<StandardMethod, ExecutableElement> standardMethods = new LinkedHashMap<>();
for (ExecutableElement method : methods) {
Optional<StandardMethod> standardMethod = maybeStandardMethod(method);... | [
"Find any standard methods the user has 'underridden' in their type."
] | [
"Login for a specific authentication, creating a new token.\n\n@param authentication authentication to assign to token\n@return token",
"Cleans up the subsystem children for the deployment and each sub-deployment resource.\n\n@param resource the subsystem resource to clean up",
"Update a note.\n\n@param note\nT... |
@Override
public boolean isCompleteRequest(final ByteBuffer buffer) throws VoldemortException {
DataInputStream inputStream = new DataInputStream(new ByteBufferBackedInputStream(buffer));
try {
byte opCode = inputStream.readByte();
// Store Name
inputStream.read... | [
"This is pretty ugly. We end up mimicking the request logic here, so this\nneeds to stay in sync with handleRequest."
] | [
"Enforces the correct srid on incoming features.\n\n@param feature\nobject to enforce srid on\n@throws LayerException\nproblem getting or setting srid",
"Create a discount curve from forwards given by a LIBORMonteCarloModel. If the model uses multiple curves, return its discount curve.\n\n@param forwardCurveName ... |
private void processResponse(Response<ByteArray, Object> response, Pipeline pipeline) {
if(response == null) {
logger.warn("RoutingTimedout on waiting for async ops; parallelResponseToWait: "
+ numNodesPendingResponse + "; preferred-1: " + (preferred - 1)
... | [
"Process the response by reporting proper log and feeding failure\ndetectors\n\n@param response\n@param pipeline"
] | [
"Converts a sequence of unicode code points to a sequence of Java characters.\n\n@return the number of chars written to the destination buffer",
"Builds a configuration object based on given properties.\n\n@param properties the properties.\n@return a configuration and never null.",
"Creates an SslHandler\n\n@pa... |
boolean callbackUnregistered(final TransactionalProtocolClient old, final boolean shuttingDown) {
// Disconnect the remote connection.
// WFCORE-196 Do this out of the sync block to avoid deadlocks where in-flight requests can't
// be informed that the channel has closed
protocolClient.d... | [
"Unregister the mgmt channel.\n\n@param old the proxy controller to unregister\n@param shuttingDown whether the server inventory is shutting down\n@return whether the registration can be removed from the domain-controller"
] | [
"Retrieves the path using the endpoint value\n\n@param pathValue - path (endpoint) value\n@param requestType - \"GET\", \"POST\", etc\n@return Path or null\n@throws Exception exception",
"Checks whether the given set of properties is available.\n\n@param keys the keys to check\n@return true if all properties are ... |
private static JSONArray parseOutgoings(ArrayList<Shape> outgoings) throws JSONException {
if (outgoings != null) {
JSONArray outgoingsArray = new JSONArray();
for (Shape outgoing : outgoings) {
JSONObject outgoingObject = new JSONObject();
outgoingObjec... | [
"Delivers the correct JSON Object for outgoings\n\n@param outgoings\n@throws org.json.JSONException"
] | [
"Read a nested table whose contents we don't understand.\n\n@param rowSize fixed row size\n@param rowMagicNumber row magic number\n@return table rows",
"Disables all the overrides for a specific profile\n\n@param model\n@param profileID\n@param clientUUID\n@return",
"Attempts to substitute all the found express... |
protected boolean hasTimeOutHeader() {
boolean result = false;
String timeoutValStr = this.request.getHeader(RestMessageHeaders.X_VOLD_REQUEST_TIMEOUT_MS);
if(timeoutValStr != null) {
try {
this.parsedTimeoutInMs = Long.parseLong(timeoutValStr);
if(th... | [
"Retrieve and validate the timeout value from the REST request.\n\"X_VOLD_REQUEST_TIMEOUT_MS\" is the timeout header.\n\n@return true if present, false if missing"
] | [
"Add a dependency to this node.\n\n@param node the dependency to add.",
"given is at the begining, of is at the end",
"Read ClassDescriptors from the given InputStream.\n@see #mergeDescriptorRepository",
"Launch Navigation Service residing in the navigation module",
"Use this API to fetch all the nsacl6 res... |
@Override
public String toNormalizedString() {
String result = normalizedString;
if(result == null) {
normalizedString = result = toNormalizedString(false);
}
return result;
} | [
"Provides a normalized string which is lowercase for host strings, and which is a normalized string for addresses.\n@return"
] | [
"Print the common class node's properties",
"Determine whether the given element matches this element.\nAn element matches this element when keys are equal, values are equal\nor this element value is a wildcard.\n@param pe the element to check\n@return {@code true} if the element matches",
"Stop finding beat gr... |
private static MonetaryFormatsSingletonSpi loadMonetaryFormatsSingletonSpi() {
try {
return Optional.ofNullable(Bootstrap.getService(MonetaryFormatsSingletonSpi.class))
.orElseGet(DefaultMonetaryFormatsSingletonSpi::new);
} catch (Exception e) {
Logger.getLogg... | [
"Loads the SPI backing bean.\n\n@return the instance of MonetaryFormatsSingletonSpi to be used by this singleton."
] | [
"Start listening for device announcements and keeping track of the DJ Link devices visible on the network.\nIf already listening, has no effect.\n\n@throws SocketException if the socket to listen on port 50000 cannot be created",
"helper to calculate the statusBar height\n\n@param context\n@param force pass tru... |
public static <ResultT> PollingState<ResultT> createFromJSONString(String serializedPollingState) {
ObjectMapper mapper = initMapper(new ObjectMapper());
PollingState<ResultT> pollingState;
try {
pollingState = mapper.readValue(serializedPollingState, PollingState.class);
} c... | [
"Creates PollingState from the json string.\n\n@param serializedPollingState polling state as json string\n@param <ResultT> the result that the poll operation produces\n@return the polling state"
] | [
"Before cluster management operations, i.e. remember and disable quota\nenforcement settings",
"Get a configured database connection via JNDI.",
"Called by subclasses that initialize collections\n\n@param session the session\n@param id the collection identifier\n@param type collection type\n@throws HibernateEx... |
public ProjectCalendar addDefaultBaseCalendar()
{
ProjectCalendar calendar = add();
calendar.setName(ProjectCalendar.DEFAULT_BASE_CALENDAR_NAME);
calendar.setWorkingDay(Day.SUNDAY, false);
calendar.setWorkingDay(Day.MONDAY, true);
calendar.setWorkingDay(Day.TUESDAY, true);
calen... | [
"This is a convenience method used to add a calendar called\n\"Standard\" to the project, and populate it with a default working week\nand default working hours.\n\n@return a new default calendar"
] | [
"Use this API to fetch sslcipher resources of given names .",
"Release the broker instance.",
"Returns angle in degrees between two points\n\n@param ax x of the point 1\n@param ay y of the point 1\n@param bx x of the point 2\n@param by y of the point 2\n@return angle in degrees between two points",
"Ask the s... |
private void deEndify(List<CoreLabel> tokens) {
if (flags.retainEntitySubclassification) {
return;
}
tokens = new PaddedList<CoreLabel>(tokens, new CoreLabel());
int k = tokens.size();
String[] newAnswers = new String[k];
for (int i = 0; i < k; i++) {
CoreLabel c = tokens.get... | [
"Return the coding scheme to IOB1 coding, regardless of what was used\ninternally. This is useful for scoring against CoNLL test output.\n\n@param tokens List of tokens in some NER encoding"
] | [
"Use this API to fetch nsacl6 resources of given names .",
"Constraint that ensures that the field has a length if the jdbc type requires it.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)",
"Returns the complete tag record for a s... |
private static void bodyWithBuilderAndSeparator(
SourceBuilder code,
Datatype datatype,
Map<Property, PropertyCodeGenerator> generatorsByProperty,
String typename) {
Variable result = new Variable("result");
Variable separator = new Variable("separator");
code.addLine(" %1$s %2$s =... | [
"Generates the body of a toString method that uses a StringBuilder and a separator variable.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\noptional, we have no choice but to track the separators at runtime, as apart from the first\none, all properties will need to hav... | [
"Build a stack trace for this path. This can be used in generating more meaningful exceptions\nwhile using Crawljax in conjunction with JUnit for example.\n\n@return a array of StackTraceElements denoting the steps taken by this path. The first\nelement [0] denotes the last {@link Eventable} on this path while the ... |
public static String generateQuery(final Map<String,Object> params){
final StringBuilder sb = new StringBuilder();
boolean newEntry = false;
sb.append("{");
for(final Entry<String,Object> param: params.entrySet()){
if(newEntry){
sb.append(", ");
}
sb.append(param.getKey());
sb.append(": ");
... | [
"Generate a Jongo query regarding a set of parameters.\n\n@param params Map<queryKey, queryValue> of query parameters\n@return String"
] | [
"Check if the object has a property with the key.\n\n@param key key to check for.",
"Converts an object to an instance of the target type.\n\n@param mapper the object mapper\n@param source the source to convert\n@param targetType the target class type\n@return target instance\n@see SquigglyUtils#objectify... |
public static base_responses change(nitro_service client, sslcertkey resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslcertkey updateresources[] = new sslcertkey[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = ne... | [
"Use this API to change sslcertkey resources."
] | [
"See if there is an auto-attach cache file that seems to match the media in the specified slot, and if so,\nattach it.\n\n@param slot the player slot that is under consideration for automatic cache attachment",
"Calculate the layout container size along the axis\n@param axis {@link Axis}\n@return size",
"Return... |
public static int[] Concatenate(int[] array, int[] array2) {
int[] all = new int[array.length + array2.length];
int idx = 0;
//First array
for (int i = 0; i < array.length; i++)
all[idx++] = array[i];
//Second array
for (int i = 0; i < array2.length; i++)
... | [
"Concatenate the arrays.\n\n@param array First array.\n@param array2 Second array.\n@return Concatenate between first and second array."
] | [
"If needed, destroy the remaining conversation contexts after an HTTP session was invalidated within the current request.\n\n@param request",
"Draw a rounded rectangular boundary.\n\n@param rect rectangle\n@param color colour\n@param linewidth line width\n@param r radius for rounded corners",
"Compares this val... |
public SslHandler create(ByteBufAllocator bufferAllocator) {
SSLEngine engine = sslContext.newEngine(bufferAllocator);
engine.setNeedClientAuth(needClientAuth);
engine.setUseClientMode(false);
return new SslHandler(engine);
} | [
"Creates an SslHandler\n\n@param bufferAllocator the buffer allocator\n@return instance of {@code SslHandler}"
] | [
"Send a kill signal to all running instances and return as soon as the signal is sent.",
"Record the resource request wait time in us\n\n@param dest Destination of the socket for which the resource was\nrequested. Will actually record if null. Otherwise will call this\non self and corresponding child with this pa... |
public String getUnicodeString(Integer id, Integer type)
{
return (getUnicodeString(m_meta.getOffset(id, type)));
} | [
"This method retrieves a String of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return string containing required data"
] | [
"Sums up the square of each element in the matrix. This is equivalent to the\nFrobenius norm squared.\n\n@param m Matrix.\n@return Sum of elements squared.",
"Get a discount curve from the model, if not existing create a discount curve.\n\n@param discountCurveName The name of the discount curve to create.\n@retu... |
private Set<Artifact> findThriftDependencies() throws IOException, MojoExecutionException {
Set<Artifact> thriftDependencies = new HashSet<Artifact>();
Set<Artifact> deps = new HashSet<Artifact>();
deps.addAll(project.getArtifacts());
deps.addAll(project.getDependencyArtifacts());
Map<String, Arti... | [
"Iterate through dependencies"
] | [
"Updates the polling state from a DELETE or POST operation.\n\n@param response the response from Retrofit REST call\n@throws IOException thrown by deserialization",
"Callback when each frame in the indicator animation should be drawn.",
"Searches the set of imports to find a matching import by type name.\n\n@pa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.