query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
public static final Bytes of(String s) {
Objects.requireNonNull(s);
if (s.isEmpty()) {
return EMPTY;
}
byte[] data = s.getBytes(StandardCharsets.UTF_8);
return new Bytes(data, s);
} | [
"Creates a Bytes object by copying the value of the given String"
] | [
"Adds a new metadata value of array type.\n@param path the path to the field.\n@param values the collection of values.\n@return the metadata object for chaining.",
"map a property id. Property id can only be an Integer or String",
"Count the number of non-zero elements in R",
"Read resource assignment baselin... |
protected HttpUriRequest createHttpRequest(HttpMethod httpMethod, URI uri) {
switch (httpMethod) {
case GET:
return new HttpGet(uri);
case DELETE:
return new HttpDelete(uri);
case HEAD:
return new HttpHead(uri);
case OPTIONS:
return new HttpOptions(uri);
case POST:
return new HttpPo... | [
"Create a HttpComponents HttpUriRequest object for the given HTTP method and URI specification.\n\n@param httpMethod the HTTP method\n@param uri the URI\n@return the HttpComponents HttpUriRequest object"
] | [
"Returns screen height and width\n\n@param context\nAny non-null Android Context\n@param p\nOptional Point to reuse. If null, a new Point will be created.\n@return .x is screen width; .y is screen height.",
"Is the transport secured by a policy",
"Retrieves the configured message by property key\n@param key The... |
@Override
public void process() {
if (client.isDone() || executorService.isTerminated()) {
throw new IllegalStateException("Client is already stopped");
}
Runnable runner = new Runnable() {
@Override
public void run() {
try {
while (!client.isDone()) {
Strin... | [
"Forks off a runnable with the executor provided. Multiple calls are allowed, but the listeners must be\nthreadsafe."
] | [
"Returns the path to java executable.",
"Returns the names of the bundles configured as workplace bundles in any module configuration.\n@return the names of the bundles configured as workplace bundles in any module configuration.",
"Flush output streams.",
"a simple contains helper method, checks if array con... |
private static String wordShapeDan1(String s) {
boolean digit = true;
boolean upper = true;
boolean lower = true;
boolean mixed = true;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (!Character.isDigit(c)) {
digit = false;
}
if (!Character.... | [
"A fairly basic 5-way classifier, that notes digits, and upper\nand lower case, mixed, and non-alphanumeric.\n\n@param s String to find word shape of\n@return Its word shape: a 5 way classification"
] | [
"Use this API to fetch sslvserver_sslciphersuite_binding resources of given name .",
"Wraps a StatisticsMatrix around 'm'. Does NOT create a copy of 'm' but saves a reference\nto it.",
"Tells you if the expression is true, which can be true or Boolean.TRUE.\n@param expression\nexpression\n@return\nas described... |
private boolean isSingleMultiDay() {
long duration = getEnd().getTime() - getStart().getTime();
if (duration > I_CmsSerialDateValue.DAY_IN_MILLIS) {
return true;
}
if (isWholeDay() && (duration <= I_CmsSerialDateValue.DAY_IN_MILLIS)) {
return false;
}
... | [
"Returns a flag, indicating if the current event is a multi-day event.\nThe method is only called if the single event has an explicitely set end date\nor an explicitely changed whole day option.\n\n@return a flag, indicating if the current event takes lasts over more than one day."
] | [
"Creates an instance of a NewEnterpriseBean from an annotated class\n\n@param clazz The annotated class\n@param beanManager The Bean manager\n@return a new NewEnterpriseBean instance",
"Checks if there's exactly one option that exists among all opts.\n\n@param options OptionSet to checked\n@param opts List ... |
public void set(String name, Object value) {
hashAttributes.put(name, value);
if (plugin != null) {
plugin.invalidate();
}
} | [
"Set an attribute.\n\n@param name attribute name.\n@param value attribute value."
] | [
"Creates a region from a name and a label.\n\n@param name the uniquely identifiable name of the region\n@param label the label of the region\n@return the newly created region",
"Get a property as an long or throw an exception.\n\n@param key the property name",
"Initializes OJB for the purposes of this task.\n\n... |
public String getPrototypeName() {
String name = getClass().getName();
if (name.startsWith(ORG_GEOMAJAS)) {
name = name.substring(ORG_GEOMAJAS.length());
}
name = name.replace(".dto.", ".impl.");
return name.substring(0, name.length() - 4) + "Impl";
} | [
"Get prototype name.\n\n@return prototype name"
] | [
"Use this API to fetch all the appfwlearningsettings resources that are configured on netscaler.",
"Use this API to fetch a vpnglobal_auditnslogpolicy_binding resources.",
"Feeds input stream to data consumer using metadata from tar entry.\n@param consumer the consumer\n@param inputStream the stream to feed\n@p... |
public BoxFileUploadSession.Info createUploadSession(long fileSize) {
URL url = UPLOAD_SESSION_URL_TEMPLATE.build(this.getAPI().getBaseUploadURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "POST");
request.addHeader("Content-Type", "application/json");
... | [
"Creates an upload session to create a new version of a file in chunks.\nThis will first verify that the version can be created and then open a session for uploading pieces of the file.\n@param fileSize the size of the file that will be uploaded.\n@return the created upload session instance."
] | [
"Use this API to fetch the statistics of all systemmemory_stats resources that are configured on netscaler.",
"Checks if the given group of statements contains the given value as the\nvalue of a main snak of some statement.\n\n@param statementGroup\nthe statement group to scan\n@param value\nthe value to scan for... |
public ValueContainer[] getKeyValues(ClassDescriptor cld, Object objectOrProxy) throws PersistenceBrokerException
{
return getKeyValues(cld, objectOrProxy, true);
} | [
"returns an Array with an Objects PK VALUES, with any java-to-sql\nFieldConversion applied. If the Object is a Proxy or a VirtualProxy NO\nconversion is necessary.\n\n@param objectOrProxy\n@return Object[]\n@throws PersistenceBrokerException"
] | [
"Checks to see if every value in the matrix is the specified value.\n\n@param mat The matrix being tested. Not modified.\n@param val Checks to see if every element in the matrix has this value.\n@param tol True if all the elements are within this tolerance.\n@return true if the test passes.",
"Get the multicast ... |
public <T> T convert(ConversionContext context, Object source,
TypeReference<T> destinationType) throws ConverterException {
try {
return (T) multiConverter.convert(context, source, destinationType);
} catch (ConverterException e) {
throw e;
} catch (Exception e) {
// There is a problem with on... | [
"Convert an object to another object given a parameterized type signature\n\n@param context\n@param destinationType\nthe destination type\n@param source\nthe source object\n\n@return the converted object\n@throws ConverterException\nif conversion failed"
] | [
"Scroll to the specific position\n@param position\n@return the new current item after the scrolling processed.",
"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",
"Read a field ... |
public SwaptionDataLattice append(SwaptionDataLattice other, AnalyticModel model) {
SwaptionDataLattice combined = new SwaptionDataLattice(referenceDate, quotingConvention, displacement,
forwardCurveName, discountCurveName, floatMetaSchedule, fixMetaSchedule);
combined.entryMap.putAll(entryMap);
if(qu... | [
"Append the data of another lattice to this lattice. If the other lattice follows a different quoting convention, it is automatically converted.\nHowever, this method does not check, whether the two lattices are aligned in terms of reference date, curve names and meta schedules.\nIf the two lattices have shared dat... | [
"Sets the options contained in the DJCrosstab to the JRDesignCrosstab.\nAlso fits the correct width",
"Make a sort order for use in a query.",
"This method maps the task unique identifiers to their index number\nwithin the FixedData block.\n\n@param fieldMap field map\n@param taskFixedMeta Fixed meta data for t... |
public void setDividerPadding(float padding, final Axis axis) {
if (axis == getOrientationAxis()) {
super.setDividerPadding(padding, axis);
} else {
Log.w(TAG, "Cannot apply divider padding for wrong axis [%s], orientation = %s",
axis, getOrientation());
... | [
"Sets divider padding for axis. If axis does not match the orientation, it has no effect.\n@param padding\n@param axis {@link Axis}"
] | [
"Get the authentication method to use.\n\n@return authentication method",
"If this node represents a bean property this method returns all annotations of its getter.\n\n@return A set of annotations of this nodes property getter or an empty set.",
"Singleton of MetaClassRegistry.\n\n@param includeExtension\n@ret... |
public boolean projectExists(String name) throws IllegalArgumentException {
if (name == null || name.isEmpty()) {
throw new IllegalArgumentException("Project name cannot be empty");
}
return listProjects().stream()
.map(p -> p.getMetadata().getName())
.anyMatc... | [
"Checks if the given project exists or not.\n\n@param name project name\n@return true/false\n@throws IllegalArgumentException"
] | [
"Reads a nested table. Uses the supplied reader class instance.\n\n@param readerClass reader class instance\n@return table rows",
"Helper method to copy the contents of a stream to a file.\n@param outputDirectory The directory in which the new file is created.\n@param stream The stream to copy.\n@param targetFile... |
public static Type boxedType(Type type) {
if (type instanceof Class<?>) {
return boxedClass((Class<?>) type);
} else {
return type;
}
} | [
"Gets the boxed type of a class\n\n@param type The type\n@return The boxed type"
] | [
"This method is very similar to addMainHandler, except ShellFactory\nwill pass all handlers registered with this method to all this shell's subshells.\n\n@see org.gearvrf.debug.cli.Shell#addMainHandler(java.lang.Object, java.lang.String)\n\n@param handler Object which should be registered as handler.\n@param prefix... |
public Eval<UploadResult> putAsync(String key, Object value) {
return Eval.later(() -> put(key, value))
.map(t -> t.orElse(null))
.map(FluentFunctions.ofChecked(up -> up.waitForUploadResult()));
} | [
"Non-blocking call that will throw any Exceptions in the traditional\nmanner on access\n\n@param key\n@param value\n@return"
] | [
"get the type signature corresponding to given class\n\n@param clazz\n@return",
"If the given result is not cudnnStatus.CUDNN_STATUS_SUCCESS\nand exceptions have been enabled, this method will throw a\nCudaException with an error message that corresponds to the\ngiven result code. Otherwise, the given result is s... |
public static String getPrettyMapOfContiguousPartitionRunLengths(final Cluster cluster,
int zoneId) {
Map<Integer, Integer> runLengthToCount = getMapOfContiguousPartitionRunLengths(cluster,
... | [
"Pretty prints the output of getMapOfContiguousPartitionRunLengths\n\n@param cluster\n@param zoneId\n@return pretty string of contiguous run lengths"
] | [
"Provides the results of a QR decomposition. These will be modified by adding or removing\nrows from the original 'A' matrix.\n\n@param Q The Q matrix which is to be modified. Is modified later and reference saved.\n@param R The R matrix which is to be modified. Is modified later and reference saved.",
"Remove... |
private void processFile(InputStream is) throws MPXJException
{
try
{
InputStreamReader reader = new InputStreamReader(is, CharsetHelper.UTF8);
Tokenizer tk = new ReaderTokenizer(reader)
{
@Override protected boolean startQuotedIsValid(StringBuilder buffer)
... | [
"Tokenizes the input file and extracts the required data.\n\n@param is input stream\n@throws MPXJException"
] | [
"Replace bad xml charactes in given array by space\n\n@param cbuf buffer to replace in\n@param off Offset from which to start reading characters\n@param len Number of characters to be replaced",
"Constraint that ensures that the field has a column property. If none is specified, then\nthe name of the field is u... |
public static <T> DecoratorImpl<T> of(BeanAttributes<T> attributes, EnhancedAnnotatedType<T> clazz, BeanManagerImpl beanManager) {
return new DecoratorImpl<T>(attributes, clazz, beanManager);
} | [
"Creates a decorator bean\n\n@param <T> The type\n@param clazz The class\n@param beanManager the current manager\n@return a Bean"
] | [
"Sets the right padding for all cells in the row.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining",
"Places a disabled marker file in the directory of the specified version.\n\n@param version to disable\n@throws PersistenceFailureException if the marker file could not b... |
public static synchronized FormInputValueHelper getInstance(
InputSpecification inputSpecification, FormFillMode formFillMode) {
if (instance == null)
instance = new FormInputValueHelper(inputSpecification,
formFillMode);
return instance;
} | [
"Creates or returns the instance of the helper class.\n\n@param inputSpecification the input specification.\n@param formFillMode if random data should be used on the input fields.\n@return The singleton instance."
] | [
"Creates the container for a bundle with descriptor.\n@return the container for a bundle with descriptor.\n@throws IOException thrown if reading the bundle fails.\n@throws CmsException thrown if reading the bundle fails.",
"Adds OPT_X | OPT_HEX option to OptionParser, with multiple arguments.\n\n@param parser Opt... |
public ParallelTaskBuilder prepareUdp(String command) {
reinitIfClosed();
ParallelTaskBuilder cb = new ParallelTaskBuilder();
cb.setProtocol(RequestProtocol.UDP);
cb.getUdpMeta().setCommand(command);
return cb;
} | [
"Prepare a parallel UDP Task.\n\n@param command\nthe command\n@return the parallel task builder"
] | [
"Generate and return the list of statements to create a database table and any associated features.",
"Rethrows platform specific OperationCanceledExceptions and unwraps OperationCanceledErrors. Does nothing for any other type of Throwable.",
"Aliases variables with an unknown type.\n@param variable The variabl... |
private ProjectFile handleDatabaseInDirectory(File directory) throws Exception
{
byte[] buffer = new byte[BUFFER_SIZE];
File[] files = directory.listFiles();
if (files != null)
{
for (File file : files)
{
if (file.isDirectory())
{
conti... | [
"Given a directory, determine if it contains a multi-file database whose format\nwe can process.\n\n@param directory directory to process\n@return ProjectFile instance if we can process anything, or null"
] | [
"An extremely simple method for identifying multimedia. This\ncould be improved, but it's good enough for this example.\n\n@param file which could be an image or a video\n@return true if the file can be previewed, false otherwise",
"Use this API to fetch all the dnsnsecrec resources that are configured on netscal... |
public void createDB() throws PlatformException
{
if (_creationScript == null)
{
createCreationScript();
}
Project project = new Project();
TorqueDataModelTask modelTask = new TorqueDataModelTask();
File tmpDir ... | [
"Creates the database.\n\n@throws PlatformException If some error occurred"
] | [
"Add the set of partitions to the node provided\n\n@param node The node to which we'll add the partitions\n@param donatedPartitions The list of partitions to add\n@return The new node with the new partitions",
"Used to add working hours to the calendar. Note that the MPX file\ndefinition allows a maximum of 7 cal... |
public static DMatrixRMaj elements(DMatrixRMaj A , BMatrixRMaj marked , DMatrixRMaj output ) {
if( A.numRows != marked.numRows || A.numCols != marked.numCols )
throw new MatrixDimensionException("Input matrices must have the same shape");
if( output == null )
output = new DMatrix... | [
"Returns a row matrix which contains all the elements in A which are flagged as true in 'marked'\n\n@param A Input matrix\n@param marked Input matrix marking elements in A\n@param output Storage for output row vector. Can be null. Will be reshaped.\n@return Row vector with marked elements"
] | [
"Mapping originator.\n\n@param originator the originator\n@return the originator type",
"Creates a document for the resource without extracting the content. The aim is to get a content indexed,\neven if extraction runs into a timeout.\n\n@return the document for the resource generated if the content is discarded,... |
public boolean checkXpathStartsWithXpathEventableCondition(Document dom,
EventableCondition eventableCondition, String xpath) throws XPathExpressionException {
if (eventableCondition == null || Strings
.isNullOrEmpty(eventableCondition.getInXPath())) {
throw new CrawljaxException("Eventable has no XPath con... | [
"Checks whether an XPath expression starts with an XPath eventable condition.\n\n@param dom The DOM String.\n@param eventableCondition The eventable condition.\n@param xpath The XPath.\n@return boolean whether xpath starts with xpath location of eventable condition xpath\ncondition\n@thr... | [
"Updates the properties of a tag. Only the fields provided in the `data`\nblock will be updated; any unspecified fields will remain unchanged.\n\nWhen using this method, it is best to specify only those fields you wish\nto change, or else you may overwrite changes made by another user since\nyou last retrieved the ... |
public int nextToken() throws IOException
{
int c;
int nextc = -1;
boolean quoted = false;
int result = m_next;
if (m_next != 0)
{
m_next = 0;
}
m_buffer.setLength(0);
while (result == 0)
{
if (nextc != -1)
{
c = nex... | [
"This method retrieves the next token and returns a constant representing\nthe type of token found.\n\n@return token type value"
] | [
"Sets the columns width by reading some report options like the\nprintableArea and useFullPageWidth.\ncolumns with fixedWidth property set in TRUE will not be modified",
"Remove a license from an artifact\n\n@param gavc String The artifact GAVC\n@param licenseId String The license id to be removed.",
"Searches ... |
public ListActiveCoursesInAccountOptions searchTerm(String searchTerm) {
if(searchTerm == null || searchTerm.length() < 3) {
throw new IllegalArgumentException("Search term must be at least 3 characters");
}
addSingleItem("search_term", searchTerm);
return this;
} | [
"Filter on a search term. Can be course name, code or full ID. Must be at least 3 characters\n@param searchTerm Search term to filter by\n@return This object to allow adding more options"
] | [
"Determine how many forked JVMs to use.",
"Retrieve the parent task based on its WBS.\n\n@param wbs parent WBS\n@return parent task",
"If needed, destroy the remaining conversation contexts after an HTTP session was invalidated within the current request.\n\n@param request",
"Utility function that gives list ... |
@Override
public Optional<SoyMapData> toSoyMap(@Nullable final Object model) throws Exception {
if (model instanceof SoyMapData) {
return Optional.of((SoyMapData) model);
}
if (model instanceof Map) {
return Optional.of(new SoyMapData(model));
}
retur... | [
"Pass a model object and return a SoyMapData if a model object happens\nto be a SoyMapData.\n\nAn implementation will also check if a passed in object is a Map and return\na SoyMapData wrapping that map"
] | [
"Remove the given pair from a given map for obtaining a new map.\n\n<p>\nIf the given key is inside the map, but is not mapped to the given value, the\nmap will not be changed.\n</p>\n\n<p>\nThe replied map is a view on the given map. It means that any change\nin the original map is reflected to the result of this ... |
private synchronized void initializeFatClient(String storeName, Properties storeClientProps) {
// updates the coordinator metadata with recent stores and cluster xml
updateCoordinatorMetadataWithLatestState();
logger.info("Creating a Fat client for store: " + storeName);
SocketStoreClie... | [
"Initialize the fat client for the given store.\n\n1. Updates the coordinatorMetadata 2.Gets the new store configs from the\nconfig file 3.Creates a new @SocketStoreClientFactory 4. Subsequently\ncaches the @StoreClient obtained from the factory.\n\n\nThis is synchronized because if Coordinator Admin is already doi... | [
"Returns the AirMapView implementation as requested by the mapType argument. Use this method if\nyou need to request a specific AirMapView implementation that is not necessarily the preferred\ntype. For example, you can use it to explicit request a web-based map implementation.\n\n@param mapType Map type for the re... |
public static dnsview[] get(nitro_service service) throws Exception{
dnsview obj = new dnsview();
dnsview[] response = (dnsview[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the dnsview resources that are configured on netscaler."
] | [
"Use this API to fetch cacheselector resources of given names .",
"Sets top and bottom padding for all cells in the row.\n@param padding new padding for top and bottom, ignored if smaller than 0\n@return this to allow chaining",
"Sets number of pages. If the index of currently selected page is bigger than the t... |
ModelNode toModelNode() {
ModelNode result = null;
if (map != null) {
result = new ModelNode();
for (Map.Entry<PathAddress, ResourceData> entry : map.entrySet()) {
ModelNode item = new ModelNode();
PathAddress pa = entry.getKey();
i... | [
"Report on the filtered data in DMR ."
] | [
"Creates a new instance of this class.\n\n@param variableName\nname of the instance variable to search aliases for. Must\nneither be {@code null} nor empty.\n@param controlFlowBlockToExamine\na {@link ControlFlowBlock} which possibly contains the setup\nof an alias for a lazy variable. This method thereby examines\... |
private List<AssignmentField> getAllAssignmentExtendedAttributes()
{
ArrayList<AssignmentField> result = new ArrayList<AssignmentField>();
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_COST));
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_DATE));
result.addAll(Arrays.asLis... | [
"Retrieve list of assignment extended attributes.\n\n@return list of extended attributes"
] | [
"Inserts the specified objects at the specified index in the array.\n\n@param items The objects to insert into the array.\n@param index The index at which the object must be inserted.",
"private HttpServletResponse headers;",
"Write all state items to the log file.\n\n@param fileRollEvent the event to log",
... |
private static boolean validateEndRecord(File file, FileChannel channel, long startEndRecord, long endSig) throws IOException {
try {
channel.position(startEndRecord);
final ByteBuffer endDirHeader = getByteBuffer(ENDLEN);
read(endDirHeader, channel);
if (endDir... | [
"Validates that the data structure at position startEndRecord has a field in the expected position\nthat points to the start of the first central directory file, and, if so, that the file\nhas a complete end of central directory record comment at the end.\n\n@param file the file being checked\n@param chan... | [
"Do some magic to turn request parameters into a context object",
"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",
"Get all registration points associated with this registration.\n\n@return all registration points. Wi... |
@SuppressWarnings("SameParameterValue")
public static long bytesToNumberLittleEndian(byte[] buffer, int start, int length) {
long result = 0;
for (int index = start + length - 1; index >= start; index--) {
result = (result << 8) + unsign(buffer[index]);
}
return result;
... | [
"Reconstructs a number that is represented by more than one byte in a network packet in little-endian order, for\nthe very few protocol values that are sent in this quirky way.\n\n@param buffer the byte array containing the packet data\n@param start the index of the first byte containing a numeric value\n@param len... | [
"Removes the key and its associated value from this map.\n\n@param key the key to remove\n@return the value associated with that key, or null if\nthe key was not in the map",
"Adds the complex number with a scalar value.\n\n@param z1 Complex Number.\n@param scalar Scalar value.\n@return Returns new ComplexNu... |
protected void prepForWrite(SelectionKey selectionKey) {
if(logger.isTraceEnabled())
traceInputBufferState("About to clear read buffer");
if(requestHandlerFactory.shareReadWriteBuffer() == false) {
inputStream.clear();
}
if(logger.isTraceEnabled())
t... | [
"Flips the output buffer, and lets the Selector know we're ready to write.\n\n@param selectionKey"
] | [
"Request to join a group.\n\nNote: if a group has rules, the client must display the rules to the user and the user must accept them (which is indicated by passing a true value to\nacceptRules) prior to making the join request.\n\n@param groupId\n- groupId parameter\n@param message\n- (required) message to group ad... |
public static void validate(final Organization organization) {
if(organization.getName() == null ||
organization.getName().isEmpty()){
throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
.entity("Organization name cannot be null or empty... | [
"Checks if the provided organization is valid and could be stored into the database\n\n@param organization Organization\n@throws WebApplicationException if the data is corrupted"
] | [
"Pauses the playback of a sound.",
"Delete the proxy history for the active profile\n\n@throws Exception exception",
"Is portlet env supported.\n\n@return true if portlet env is supported, false otherwise",
"generate a prepared DELETE-Statement for the Class\ndescribed by cld.\n@param cld the ClassDescriptor"... |
@SuppressWarnings({"unused", "WeakerAccess"})
public synchronized void pushInstallReferrer(String source, String medium, String campaign) {
if (source == null && medium == null && campaign == null) return;
try {
// If already pushed, don't send it again
int status = StorageHe... | [
"This method is used to push install referrer via UTM source, medium & campaign parameters\n@param source The UTM source parameter\n@param medium The UTM medium parameter\n@param campaign The UTM campaign parameter"
] | [
"Mark unfinished test cases as interrupted for each unfinished test suite, then write\ntest suite result\n@see #createFakeTestcaseWithWarning(ru.yandex.qatools.allure.model.TestSuiteResult)\n@see #markTestcaseAsInterruptedIfNotFinishedYet(ru.yandex.qatools.allure.model.TestCaseResult)",
"radi otsu da dobije spoje... |
private Variable createVariableInferred(TokenList.Token t0, Variable variableRight) {
Variable result;
if( t0.getType() == Type.WORD ) {
switch( variableRight.getType()) {
case MATRIX:
alias(new DMatrixRMaj(1,1),t0.getWord());
break;
... | [
"Infer the type of and create a new output variable using the results from the right side of the equation.\nIf the type is already known just return that."
] | [
"create a broker with given broker info\n\n@param id broker id\n@param brokerInfoString broker info format: <b>creatorId:host:port:autocreated</b>\n@return broker instance with connection config\n@see #getZKString()",
"Check if the gravity and orientation are not in conflict one with other.\n@param ... |
@Override
public void close() {
// unregister MBeans
if(stats != null) {
try {
if(this.jmxEnabled)
JmxUtils.unregisterMbean(getAggregateMetricName());
} catch(Exception e) {}
stats.close();
}
factory.close();
... | [
"Permanently close the ClientRequestExecutor pool. Resources subsequently\nchecked in will be destroyed."
] | [
"Parses all child Shapes recursively and adds them to the correct JSON\nObject\n\n@param childShapes\n@throws org.json.JSONException",
"Returns the local collection representing the given namespace.\n\n@param namespace the namespace referring to the local collection.\n@param resultClass the {@link Class} that r... |
private void ensureReferencedPKs(ModelDef modelDef, CollectionDescriptorDef collDef) throws ConstraintException
{
String elementClassName = collDef.getProperty(PropertyHelper.OJB_PROPERTY_ELEMENT_CLASS_REF);
ClassDescriptorDef elementClassDef = modelDef.getClass(elementClassName)... | [
"Ensures that the primary keys required by the given collection with indirection table are present in\nthe element class.\n\n@param modelDef The model\n@param collDef The collection\n@throws ConstraintException If there is a problem with the fitting collection (if any) or the primary keys"
] | [
"Destroys an instance of the bean\n\n@param instance The instance",
"Converts a byte array to a hexadecimal string representation\n@param bb the byte array to convert\n@return string the string representation",
"Use this API to fetch filtered set of dbdbprofile resources.\nset the filter parameter values in fil... |
private StitchUserT doLogin(final StitchCredential credential, final boolean asLinkRequest) {
final Response response = doLoginRequest(credential, asLinkRequest);
final StitchUserT previousUser = activeUser;
final StitchUserT user = processLoginResponse(credential, response, asLinkRequest);
if (asLink... | [
"callers of doLogin should be serialized before calling in."
] | [
"Returns the right string representation of the effort level based on given number of points.",
"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.",
"This method writes assignment data to a JSON file.",
"Recor... |
public Object getBean(String name) {
Bean bean = beans.get(name);
if (null == bean) {
return null;
}
return bean.object;
} | [
"Get a bean value from the context.\n\n@param name bean name\n@return bean value or null"
] | [
"Use this API to fetch auditsyslogpolicy_systemglobal_binding resources of given name .",
"Add a dependency to this node.\n\n@param node the dependency to add.",
"Gets the positions.\n\n@return the positions",
"Given a storedefinition, constructs the xml string to be sent out in\nresponse to a \"schemata\" fe... |
public static base_responses delete(nitro_service client, route6 resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
route6 deleteresources[] = new route6[resources.length];
for (int i=0;i<resources.length;i++){
deleteresources[i] = new route6();
... | [
"Use this API to delete route6 resources."
] | [
"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 ... |
protected void onRemoveParentObject(GVRSceneObject parent) {
for (GVRComponent comp : mComponents.values()) {
comp.onRemoveOwnersParent(parent);
}
} | [
"Called when is removed the parent of the scene object.\n\n@param parent Old parent of this scene object."
] | [
"Converts this file into a resource name on the classpath by cutting of the file path\nto the classpath root.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param file The file.\n@return The resource name on the classpath.",
"Creates a new ServerD... |
public Response remove(String id, String rev) {
assertNotEmpty(id, "id");
assertNotEmpty(id, "rev");
return db.remove(ensureDesignPrefix(id), rev);
} | [
"Removes a design document using the id and rev from the database.\n\n@param id the document id (optionally prefixed with \"_design/\")\n@param rev the document revision\n@return {@link DesignDocument}"
] | [
"Provide Jersey client for the targeted Grapes server\n\n@return webResource",
"get all parts of module name apart from first",
"Send a track metadata update announcement to all registered listeners.",
"Generates a HashMap used to store expanded state for items in the list\non configuration change or whenever... |
private void updateDurationTimeUnit(FastTrackColumn column)
{
if (m_durationTimeUnit == null && isDurationColumn(column))
{
int value = ((DurationColumn) column).getTimeUnitValue();
if (value != 1)
{
m_durationTimeUnit = FastTrackUtility.getTimeUnit(value);
... | [
"Update the default time unit for durations based on data read from the file.\n\n@param column column data"
] | [
"Print work units.\n\n@param value TimeUnit instance\n@return work units value",
"Called just before the thread finishes, regardless of status, to take any necessary action on\nthe downloaded file with mDownloadedCacheSize file.\n\n@param forceClean - It will delete downloaded cache, Even streaming is enabled, I... |
public static <T> void addAll(Collection<T> collection, Iterable<? extends T> items) {
for (T item : items) {
collection.add(item);
}
} | [
"Add all the items from an iterable to a collection.\n\n@param <T>\nThe type of items in the iterable and the collection\n@param collection\nThe collection to which the items should be added.\n@param items\nThe items to add to the collection."
] | [
"Return all scripts of a given type\n\n@param type integer value of type\n@return Array of scripts of the given type",
"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.",
"Utili... |
public static ServerSetup[] verbose(ServerSetup[] serverSetups) {
ServerSetup[] copies = new ServerSetup[serverSetups.length];
for (int i = 0; i < serverSetups.length; i++) {
copies[i] = serverSetups[i].createCopy().setVerbose(true);
}
return copies;
} | [
"Creates a copy with verbose mode enabled.\n\n@param serverSetups the server setups.\n@return copies of server setups with verbose mode enabled."
] | [
"Returns an interval representing the addition of the\ngiven interval with this one.\n@param other interval to add to this one\n@return interval sum",
"Returns all methods for a specific group\n\n@param groupId group ID to remove methods from\n@param filters array of method types to filter by, null means no filte... |
public int getMinutesPerWeek()
{
return m_minutesPerWeek == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerWeek()) : m_minutesPerWeek.intValue();
} | [
"Retrieve the number of minutes per week for this calendar.\n\n@return minutes per week"
] | [
"Attachments are only structurally different if one step has an inline attachment\nand the other step either has no inline attachment or the inline attachment is\ndifferent.",
"Returns the naming context.",
"Use this API to fetch all the route6 resources that are configured on netscaler.\nThis uses route6_args ... |
public static List<CompiledAutomaton> createAutomata(String prefix,
String regexp, Map<String, Automaton> automatonMap) throws IOException {
List<CompiledAutomaton> list = new ArrayList<>();
Automaton automatonRegexp = null;
if (regexp != null) {
RegExp re = new RegExp(prefix + MtasToken.DELIMIT... | [
"Creates the automata.\n\n@param prefix the prefix\n@param regexp the regexp\n@param automatonMap the automaton map\n@return the list\n@throws IOException Signals that an I/O exception has occurred."
] | [
"Takes the file, reads it in, and prints out the likelihood of each possible\nlabel at each point.\n\n@param filename\nThe path to the specified file",
"Use this API to clear nsconfig.",
"Returns a Pair constructed from X and Y. Convenience method; the\ncompiler will disambiguate the classes used for you so th... |
public static Integer distance(String h1, String h2) {
HammingDistance distance = new HammingDistance();
return distance.apply(h1, h2);
} | [
"Calculate the Hamming distance between two hashes\n\n@param h1\n@param h2\n@return"
] | [
"Retrieve the index of the table entry valid for the supplied date.\n\n@param date required date\n@return cost rate table entry index",
"Build the Criteria using multiple ORs\n@param ids collection of identities\n@param fields\n@return Criteria",
"Sets all padding to the same value.\n@param padding new padding ... |
public void wireSteps( CanWire canWire ) {
for( StageState steps : stages.values() ) {
canWire.wire( steps.instance );
}
} | [
"Used for DI frameworks to inject values into stages."
] | [
"Read a four byte integer.\n\n@param data byte array\n@param offset offset into array\n@return integer value",
"Use this API to unset the properties of nslimitselector resources.\nProperties that need to be unset are specified in args array.",
"Make sure we don't attempt to recover inline; if the parser\nsucces... |
public static Rectangle getSelectedBounds(BufferedImage p) {
int width = p.getWidth();
int height = p.getHeight();
int maxX = 0, maxY = 0, minX = width, minY = height;
boolean anySelected = false;
int y1;
int [] pixels = null;
for (y1 = height-1; y1 >= 0; y1--) {
pixels = getRGB( p, 0, y1, wid... | [
"Calculates the bounds of the non-transparent parts of the given image.\n@param p the image\n@return the bounds of the non-transparent area"
] | [
"Creates a ServiceCall from a paging operation that returns a header response.\n\n@param first the observable to the first page\n@param next the observable to poll subsequent pages\n@param callback the client-side callback\n@param <E> the element type\n@param <V> the header object type\n@return the future based Ser... |
public BoxFileUploadSession.Info getStatus() {
URL statusURL = this.sessionInfo.getSessionEndpoints().getStatusEndpoint();
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), statusURL, HttpMethod.GET);
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonOb... | [
"Get the status of the upload session. It contains the number of parts that are processed so far,\nthe total number of parts required for the commit and expiration date and time of the upload session.\n@return the status."
] | [
"Adds an additional label to the constructed document.\n\n@param text\nthe text of the label\n@param languageCode\nthe language code of the label\n@return builder object to continue construction",
"Creates a rectangular matrix which is zero except along the diagonals.\n\n@param numRows Number of rows in the matri... |
public Diff compare(String left, String right) {
return compare(getCtType(left), getCtType(right));
} | [
"compares two snippet"
] | [
"Static main.\n\n@param args\nProgram arguments.\n@throws IOException\nIf an IO error occurred.",
"Gets string content from InputStream\n\n@param is InputStream to read\n@return InputStream content",
"Exceptions specific to each operation is handled in the corresponding\nsubclass. At this point we don't know th... |
protected Violation createViolationForImport(SourceCode sourceCode, ImportNode importNode, String message) {
Map importInfo = ImportUtil.sourceLineAndNumberForImport(sourceCode, importNode);
Violation violation = new Violation();
violation.setRule(this);
violation.setSourceLine((String) ... | [
"Create and return a new Violation for this rule and the specified import\n@param sourceCode - the SourceCode\n@param importNode - the ImportNode for the import triggering the violation\n@return a new Violation object"
] | [
"Used to NOT the argument clause specified.",
"Sets the jdbc connection to use.\n\n@param jcd The connection to use\n@throws PlatformException If the target database cannot be handled with torque",
"Add tags to a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo... |
public static DMatrixRMaj extractColumn(DMatrixRMaj a , int column , DMatrixRMaj out ) {
if( out == null)
out = new DMatrixRMaj(a.numRows,1);
else if( !MatrixFeatures_DDRM.isVector(out) || out.getNumElements() != a.numRows )
throw new MatrixDimensionException("Output must be a ve... | [
"Extracts the column from a matrix.\n@param a Input matrix\n@param column Which column is to be extracted\n@param out output. Storage for the extracted column. If null then a new vector will be returned.\n@return The extracted column."
] | [
"Serialize an object with Json\n@param obj Object\n@return String\n@throws IOException",
"List the photos with the most views, comments or favorites.\n\n@param date\n(Optional) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomati... |
private void exportModules() {
// avoid to export modules if unnecessary
if (((null != m_copyAndUnzip) && !m_copyAndUnzip.booleanValue())
|| ((null == m_copyAndUnzip) && !m_currentConfiguration.getDefaultCopyAndUnzip())) {
m_logStream.println();
m_logStream.println("... | [
"Export the modules that should be checked in into git."
] | [
"Remove an read lock.",
"The normalized string returned by this method is consistent with java.net.Inet6address.\n\nIPs are not compressed nor mixed in this representation. If this has a prefix length, that will be included in the string.",
"Get content of a file as a Map<String, String>, using separator... |
protected void addConstructors(ClassFile proxyClassType, List<DeferredBytecode> initialValueBytecode) {
try {
if (getBeanType().isInterface()) {
ConstructorUtils.addDefaultConstructor(proxyClassType, initialValueBytecode, !useConstructedFlag());
} else {
b... | [
"Adds a constructor for the proxy for each constructor declared by the base\nbean type.\n\n@param proxyClassType the Javassist class for the proxy\n@param initialValueBytecode"
] | [
"Parse parameters from this request using HTTP.\n\n@param req The ServletRequest containing all request parameters.\n@param cms The OpenCms object.\n@return CmsSpellcheckingRequest object that contains parsed parameters.",
"This method will add a DemoInterceptor into every in and every out phase\nof the intercept... |
private void writeAssignmentTimephasedData(ResourceAssignment mpx, Project.Assignments.Assignment xml)
{
if (m_writeTimphasedData && mpx.getHasTimephasedData())
{
List<TimephasedDataType> list = xml.getTimephasedData();
ProjectCalendar calendar = mpx.getCalendar();
BigInteger a... | [
"Writes the timephased data for a resource assignment.\n\n@param mpx MPXJ assignment\n@param xml MSDPI assignment"
] | [
"Set RGB input range.\n\n@param inRGB Range.",
"refresh all deliveries dependencies for a particular product",
"gets the bytes, sharing the cached array and does not clone it",
"Set the name of the schema containing the schedule tables.\n\n@param schema schema name.",
"Helper for parsing properties\n@param ... |
public void cache(String key, Object obj) {
H.Session sess = session();
if (null != sess) {
sess.cache(key, obj);
} else {
app().cache().put(key, obj);
}
} | [
"Add an object into cache by key. The key will be used in conjunction with session id if\nthere is a session instance\n\n@param key\nthe key to index the object within the cache\n@param obj\nthe object to be cached"
] | [
"any possible bean invocations from other ADV observers",
"Creates a \"delta clone\" of this Map, where only the differences are\nrepresented.",
"trim \"act.\" from conf keys",
"Start the timer.",
"The main method. See the class documentation.",
"Checks the existence of the directory. If it does not exist... |
static void restoreFromHistory(final InstallationManager.MutablePatchingTarget target, final String rollbackPatchId,
final Patch.PatchType patchType, final PatchableTarget.TargetInfo history) throws PatchingException {
if (patchType == Patch.PatchType.CUMULATIVE) {
... | [
"Restore the recorded state from the rollback xml.\n\n@param target the patchable target\n@param rollbackPatchId the rollback patch id\n@param patchType the the current patch type\n@param history the recorded history\n@throws PatchingException"
] | [
"Method which performs strength checks on password. It returns outcome which can be used by CLI.\n\n@param isAdminitrative - administrative checks are less restrictive. This means that weak password or one which violates restrictions is not indicated as failure.\nAdministrative checks are usually performed by admin... |
public final void notifyFooterItemRangeRemoved(int positionStart, int itemCount) {
if (positionStart < 0 || itemCount < 0 || positionStart + itemCount > footerItemCount) {
throw new IndexOutOfBoundsException("The given range [" + positionStart + " - "
+ (positionStart + itemCount... | [
"Notifies that multiple footer items are removed.\n\n@param positionStart the position.\n@param itemCount the item count."
] | [
"Stops this progress bar.",
"Gets the actual type arguments of a Type\n\n@param type The type to examine\n@return The type arguments",
"Shifts are performed based upon singular values computed previously. If it does not converge\nusing one of those singular values it uses a Wilkinson shift instead.",
"Altern... |
public boolean isIdentical(T a, double tol) {
if( a.getType() != getType() )
return false;
return ops.isIdentical(mat,a.mat,tol);
} | [
"Checks to see if matrix 'a' is the same as this matrix within the specified\ntolerance.\n\n@param a The matrix it is being compared against.\n@param tol How similar they must be to be equals.\n@return If they are equal within tolerance of each other."
] | [
"Computes the p=2 norm. If A is a matrix then the induced norm is computed.\n\n@param A Matrix or vector.\n@return The norm.",
"Specify the method to instantiate objects\nrepresented by this descriptor.\n@see #setFactoryClass",
"scans right to left until max to maintain latest max values for the multi-value pr... |
static <K, V> ViewQueryParameters<K, V> forwardPaginationQueryParameters
(ViewQueryParameters<K, V> initialQueryParameters, K startkey, String startkey_docid) {
// Copy the initial query parameters
ViewQueryParameters<K, V> pageParameters = initialQueryParameters.copy();
// Now override wi... | [
"Generate query parameters for a forward page with the specified start key.\n\n@param initialQueryParameters page 1 query parameters\n@param startkey the startkey for the forward page\n@param startkey_docid the doc id for the startkey (in case of duplicate keys)\n@param <K> ... | [
"Extract a list of exception assignments.\n\n@param exceptionData string representation of exception assignments\n@return list of exception assignment rows",
"Retrieve a finish date.\n\n@param data byte array\n@param offset offset into byte array\n@return finish date",
"Use this API to fetch policydataset resou... |
private void populateConstraints(Row row, Task task)
{
Date endDateMax = row.getTimestamp("ZGIVENENDDATEMAX_");
Date endDateMin = row.getTimestamp("ZGIVENENDDATEMIN_");
Date startDateMax = row.getTimestamp("ZGIVENSTARTDATEMAX_");
Date startDateMin = row.getTimestamp("ZGIVENSTARTDATEMIN_");
... | [
"Populate the constraint type and constraint date.\nNote that Merlin allows both start and end constraints simultaneously.\nAs we can't have both, we'll prefer the start constraint.\n\n@param row task data from database\n@param task Task instance"
] | [
"Converts the passed list of inners to unmodifiable map of impls.\n@param innerList list of the inners.\n@return map of the impls",
"Generate a module graph regarding the filters\n\n@param moduleId String\n@return AbstractGraph",
"Build a request URL.\n\n@param host\nThe host\n@param port\nThe port\n@param path... |
public void identifyClasses(final String pluginDirectory) throws Exception {
methodInformation.clear();
jarInformation.clear();
try {
new FileTraversal() {
public void onDirectory(final File d) {
}
public void onFile(final File f) {
... | [
"This loads plugin file information into a hash for lazy loading later on\n\n@param pluginDirectory path of plugin\n@throws Exception exception"
] | [
"Returns an text table containing the matrix of Strings passed in.\nThe first dimension of the matrix should represent the rows, and the\nsecond dimension the columns.",
"Access all of the elements of the collection that evaluate to true for the\nprovided query predicate.\n@param\tpredicate\tAn OQL boolean query ... |
public static void writeCorrelationId(Message message, String correlationId) {
if (!(message instanceof SoapMessage)) {
return;
}
SoapMessage soapMessage = (SoapMessage) message;
Header hdCorrelationId = soapMessage.getHeader(CORRELATION_ID_QNAME);
if (hdCorrelationId... | [
"Write correlation id to message.\n\n@param message the message\n@param correlationId the correlation id"
] | [
"Returns a JRDesignExpression that points to the main report connection\n\n@return",
"Re-initializes the shader texture used to fill in\nthe Circle upon drawing.",
"Returns the most likely class for the word at the given position.",
"Gets an enhanced protection domain for a proxy based on the given protection... |
private ProjectFile handleXerFile(InputStream stream) throws Exception
{
PrimaveraXERFileReader reader = new PrimaveraXERFileReader();
reader.setCharset(m_charset);
List<ProjectFile> projects = reader.readAll(stream);
ProjectFile project = null;
for (ProjectFile file : projects)
{... | [
"XER files can contain multiple projects when there are cross-project dependencies.\nAs the UniversalProjectReader is designed just to read a single project, we need\nto select one project from those available in the XER file.\nThe original project selected for export by the user will have its \"export flag\"\nset ... | [
"Get container for principal.\n\n@param cms cmsobject\n@param list of principals\n@param captionID caption id\n@param descID description id\n@param iconID icon id\n@param ouID ou id\n@param icon icon\n@param iconList iconlist\n@return indexedcontainer",
"Add the declarationSRef to the DeclarationsManager.\nCalcul... |
protected Object getTypedValue(int type, byte[] value)
{
Object result;
switch (type)
{
case 4: // Date
{
result = MPPUtility.getTimestamp(value, 0);
break;
}
case 6: // Duration
{
TimeUnit units = MPPUtility.getDura... | [
"Convert raw value as read from the MPP file into a Java type.\n\n@param type MPP value type\n@param value raw value data\n@return Java object"
] | [
"Inserts a new instance but references via the outIdentifier, which is returned as part of the ExecutionResults\n\n@param object\n@param outIdentifier\n@return",
"Returns a reasonable timeout duration for a watch request.\n\n@param expectedTimeoutMillis timeout duration that a user wants to use, in milliseconds\n... |
void processBeat(Beat beat) {
if (isRunning() && beat.isTempoMaster()) {
setMasterTempo(beat.getEffectiveTempo());
deliverBeatAnnouncement(beat);
}
} | [
"Process a beat packet, potentially updating the master tempo and sending our listeners a master\nbeat notification. Does nothing if we are not active."
] | [
"Given a class configures the binding between a class and a Renderer class.\n\n@param clazz to bind.\n@param prototype used as Renderer.\n@return the current RendererBuilder instance.",
"Set the week day the events should occur.\n@param weekDay the week day to set.",
"Compare the controlDOM and testDOM and save... |
private float[] calculatePointerPosition(float angle) {
float x = (float) (mColorWheelRadius * Math.cos(angle));
float y = (float) (mColorWheelRadius * Math.sin(angle));
return new float[] { x, y };
} | [
"Calculate the pointer's coordinates on the color wheel using the supplied\nangle.\n\n@param angle The position of the pointer expressed as angle (in rad).\n\n@return The coordinates of the pointer's center in our internal\ncoordinate system."
] | [
"Specifies the base URI of this conversion server.\n\n@param baseUri The URI under which this remote conversion server is reachable.\n@return This builder instance.",
"Alternative entry point allowing an MPP file to be read from\na user-supplied POI file stream.\n\n@param fs POI file stream\n@return ProjectFile i... |
public Iterable<RowKey> getKeys() {
if ( currentState.isEmpty() ) {
if ( cleared ) {
// if the association has been cleared and the currentState is empty, we consider that there are no rows.
return Collections.emptyList();
}
else {
// otherwise, the snapshot rows are the current ones
return s... | [
"Returns all keys of all rows contained within this association.\n\n@return all keys of all rows contained within this association"
] | [
"Use this API to fetch cmppolicylabel_policybinding_binding resources of given name .",
"Computes the householder vector used in QR decomposition.\n\nu = x / max(x)\nu(0) = u(0) + |u|\nu = u / u(0)\n\n@param x Input vector. Unmodified.\n@return The found householder reflector vector",
"Counts each property for... |
public static tmglobal_tmsessionpolicy_binding[] get(nitro_service service) throws Exception{
tmglobal_tmsessionpolicy_binding obj = new tmglobal_tmsessionpolicy_binding();
tmglobal_tmsessionpolicy_binding response[] = (tmglobal_tmsessionpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"Use this API to fetch a tmglobal_tmsessionpolicy_binding resources."
] | [
"Sets the bottom padding for all cells in the table.\n@param paddingBottom new padding, ignored if smaller than 0\n@return this to allow chaining",
"Handles incoming Application Update Request.\n@param incomingMessage the request message to process.",
"Get transformer to use.\n\n@return transformation to apply"... |
private int deleteSegments(Log log, List<LogSegment> segments) {
int total = 0;
for (LogSegment segment : segments) {
boolean deleted = false;
try {
try {
segment.getMessageSet().close();
} catch (IOException e) {
... | [
"Attemps to delete all provided segments from a log and returns how many it was able to"
] | [
"Processes the template for all procedures of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\n@doc.tag type=\"block\"",
"Get all sub-lists of the given list of t... |
public static base_response add(nitro_service client, route6 resource) throws Exception {
route6 addresource = new route6();
addresource.network = resource.network;
addresource.gateway = resource.gateway;
addresource.vlan = resource.vlan;
addresource.weight = resource.weight;
addresource.distance = resource... | [
"Use this API to add route6."
] | [
"Organises the data from Asta into a hierarchy and converts this into tasks.\n\n@param bars bar data\n@param expandedTasks expanded task data\n@param tasks task data\n@param milestones milestone data",
"Get the server redirects belonging to a server group\n\n@param profileId ID of profile\n@param serverGroupId ID... |
public static void main(String[] args) {
try {
new StartMain(args).go();
} catch(Throwable t) {
WeldSELogger.LOG.error("Application exited with an exception", t);
System.exit(1);
}
} | [
"The main method called from the command line.\n\n@param args the command line arguments"
] | [
"Sets a new value for a given key. an older value is overwritten.\n@param key a non null key\n@param value the new value",
"Counts a single pair of coordinates in all datasets.\n\n@param xCoord\n@param yCoord\n@param itemDocument",
"This method is currently in use only by the SvnCoordinator",
"Creates a new T... |
public void loadModel(GVRAndroidResource avatarResource, String attachBone)
{
EnumSet<GVRImportSettings> settings = GVRImportSettings.getRecommendedSettingsWith(EnumSet.of(GVRImportSettings.OPTIMIZE_GRAPH, GVRImportSettings.NO_ANIMATION));
GVRContext ctx = mAvatarRoot.getGVRContext();
GVRRes... | [
"Load a model to attach to the avatar\n@param avatarResource resource with avatar model\n@param attachBone name of bone to attach model to"
] | [
"Creates the JSON serialized form of the accessory for use over the Homekit Accessory Protocol.\n\n@param instanceId the static id of the accessory.\n@return a future that will complete with the JSON builder for the object.",
"Reads a single schema file.\n\n@param reader The schema reader\n@param schemaFile T... |
@SuppressWarnings("WeakerAccess")
public Map<DeckReference, WaveformDetail> getLoadedDetails() {
ensureRunning();
if (!isFindingDetails()) {
throw new IllegalStateException("WaveformFinder is not configured to find waveform details.");
}
// Make a copy so callers get an i... | [
"Get the waveform details available for all tracks currently loaded in any player, either on the play deck, or\nin a hot cue.\n\n@return the details associated with all current players, including for any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the WaveformFinder is not running or re... | [
"Normalize the list of selected categories to fit for the ids of the tree items.",
"Sets the replace var map to single target from map.\n\n@param replacementVarMapNodeSpecific\nthe replacement var map node specific\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder",
"Populate... |
public Quaternionf ConvertDirectionalVectorToQuaternion(Vector3f d) {
d.negate();
Quaternionf q = new Quaternionf();
// check for exception condition
if ((d.x == 0) && (d.z == 0)) {
// exception condition if direction is (0,y,0):
// straight up, straight down or a... | [
"Converts a vector into a quaternion.\nUsed for the direction of spot and directional lights\nCalled upon initialization and updates to those vectors\n\n@param d"
] | [
"Get the server redirects for a given clientId from the database\n\n@param clientId client ID\n@return collection of ServerRedirects",
"Utility function to zip the content of an entire folder, but not the folder itself.\n@param folder\n@param fileName optional\n@return success or not",
"Helper function to retur... |
private static final String correctNumberFormat(String value)
{
String result;
int index = value.indexOf(',');
if (index == -1)
{
result = value;
}
else
{
char[] chars = value.toCharArray();
chars[index] = '.';
result = new String(chars);
... | [
"Detect numbers using comma as a decimal separator and replace with period.\n\n@param value original numeric value\n@return corrected numeric value"
] | [
"default visibility for unit test",
"Gets the estimated time remaining in milliseconds based upon the total number of work units, the start time, and how many units have been done\nso far.\n\nThis should not be called before any work units have been done.",
"Utility method to convert an array of bytes into a lo... |
public static List<String> getSelectOptionValues(CmsObject cms, String rootPath, boolean allRemoved) {
try {
cms = OpenCms.initCmsObject(cms);
cms.getRequestContext().setSiteRoot("");
CmsADEConfigData adeConfig = OpenCms.getADEManager().lookupConfiguration(cms, rootPath);
... | [
"Returns all values that can be selected in the widget.\n@param cms the current CMS object\n@param rootPath the root path to the currently edited xml file (sitemap config)\n@param allRemoved flag, indicating if all inheritedly available formatters should be disabled\n@return all values that can be selected in the w... | [
"Use this API to update systemcollectionparam.",
"Set the duration option.\n@param value the duration option to set ({@link EndType} as string).",
"Sets currency symbol.\n\n@param symbol currency symbol",
"Restore the recorded state from the rollback xml.\n\n@param target the patchable target\n@param... |
public void notifyEventListeners(ZWaveEvent event) {
logger.debug("Notifying event listeners");
for (ZWaveEventListener listener : this.zwaveEventListeners) {
logger.trace("Notifying {}", listener.toString());
listener.ZWaveIncomingEvent(event);
}
} | [
"Notify our own event listeners of a Z-Wave event.\n@param event the event to send."
] | [
"Set the value for a floating point 4x4 matrix.\n@param key name of uniform to set.\n@see #getFloatVec(String)",
"appends a WHERE-clause to the Statement\n@param where\n@param crit\n@param stmt",
"Puts value at given column\n\n@param value Will be encoded using UTF-8",
"Starts the transition",
"Get the colu... |
public void addCorporateGroupId(final String organizationId, final String corporateGroupId) {
final DbOrganization dbOrganization = getOrganization(organizationId);
if(!dbOrganization.getCorporateGroupIdPrefixes().contains(corporateGroupId)){
dbOrganization.getCorporateGroupIdPrefixes().add... | [
"Adds a corporate groupId to an organization\n\n@param organizationId String\n@param corporateGroupId String"
] | [
"Process field aliases.",
"Constructs a Google APIs HTTP client with the associated credentials.",
"Adds columns for the specified properties.\n@param _properties the array of <code>PropertyDescriptor</code>s to be added.\n@throws ColumnBuilderException if an error occurs.\n@throws ClassNotFoundException if an ... |
public final PrintJobResultExtImpl getResult(final URI reportURI) {
final CriteriaBuilder builder = getSession().getCriteriaBuilder();
final CriteriaQuery<PrintJobResultExtImpl> criteria =
builder.createQuery(PrintJobResultExtImpl.class);
final Root<PrintJobResultExtImpl> root = ... | [
"Get result report.\n\n@param reportURI the URI of the report\n@return the result report."
] | [
"Map the EventType.\n\n@param eventType the event type\n@return the event",
"Parses coordinates into a Spatial4j point shape.",
"Method to know if already exists one file with the same name in the same\nfolder\n\n@param scenario_name\n@param path\n@param dest_dir\n@return true when the file does not exist",
"... |
public static Optimizer<DifferentiableFunction> getRegularizedOptimizer(final Optimizer<DifferentiableFunction> opt,
final double l1Lambda, final double l2Lambda) {
if (l1Lambda == 0 && l2Lambda == 0) {
return opt;
}
return new Optimizer<DifferentiableFunction>() {
... | [
"Converts a standard optimizer to one which the given amount of l1 or l2 regularization."
] | [
"Adds the given some-value restriction to the list of restrictions that\nshould still be serialized. The given resource will be used as a subject.\n\n@param subject\n@param propertyUri\n@param rangeUri",
"Use this API to update aaaparameter.",
"Use this API to fetch linkset_interface_binding resources of given ... |
static String replaceCheckDigit(final String iban, final String checkDigit) {
return getCountryCode(iban) + checkDigit + getBban(iban);
} | [
"Returns an iban with replaced check digit.\n\n@param iban The iban\n@return The iban without the check digit"
] | [
"Reads an argument of type \"nstring\" from the request.",
"Finds out which dump files of the given type have been downloaded\nalready. The result is a list of objects that describe the available dump\nfiles, in descending order by their date. Not all of the dumps included\nmight be actually available.\n\n@param ... |
public static double elementMin( DMatrixSparseCSC A ) {
if( A.nz_length == 0)
return 0;
// if every element is assigned a value then the first element can be a minimum.
// Otherwise zero needs to be considered
double min = A.isFull() ? A.nz_values[0] : 0;
for(int i =... | [
"Returns the value of the element with the minimum value\n@param A (Input) Matrix. Not modified.\n@return scalar"
] | [
"Creates the default editor state for editing a bundle with descriptor.\n@return the default editor state for editing a bundle with descriptor.",
"This method is called to format a units value.\n\n@param value numeric value\n@return currency value",
"Seeks forward or backwards to a particular holiday based on t... |
public void explore() {
if (isLeaf) return;
if (isGeneric) return;
removeAllChildren();
try {
String addressPath = addressPath();
ModelNode resourceDesc = executor.doCommand(addressPath + ":read-resource-description");
resourceDesc = resourceDesc.get(... | [
"Refresh children using read-resource operation."
] | [
"We have received notification that a device is no longer on the network, so clear out its artwork.\n\n@param announcement the packet which reported the device’s disappearance",
"Use this API to add systemuser.",
"Constraint that ensures that the field has a length if the jdbc type requires it.\n\n@param fieldD... |
private static String qualifiedName(Options opt, String r) {
if (opt.hideGenerics)
r = removeTemplate(r);
// Fast path - nothing to do:
if (opt.showQualified && (opt.showQualifiedGenerics || r.indexOf('<') < 0))
return r;
StringBuilder buf = new StringBuilder(r.length());
qualifiedNameInner(opt, r, buf, ... | [
"Return the class's name, possibly by stripping the leading path"
] | [
"Converts this file into a resource name on the classpath by cutting of the file path\nto the classpath root.\n\n@param classPathRootOnDisk The location of the classpath root on disk, with a trailing slash.\n@param file The file.\n@return The resource name on the classpath.",
"Performs a put operat... |
private boolean isTileVisible(final ReferencedEnvelope tileBounds) {
if (FloatingPointUtil.equals(this.transformer.getRotation(), 0.0)) {
return true;
}
final GeometryFactory gfac = new GeometryFactory();
final Optional<Geometry> rotatedMapBounds = getRotatedMapBounds(gfac);... | [
"When using a map rotation, there might be tiles that are outside the rotated map area. To avoid to load\nthese tiles, this method checks if a tile is really required to draw the map."
] | [
"Returns the default conversion for the given java type.\n\n@param javaType The qualified java type\n@return The default conversion or <code>null</code> if there is no default conversion for the type",
"Logs an error message for unhandled exception thrown from the target method.\n\n@param joinPoint - the joint po... |
public static int countTrue(BMatrixRMaj A) {
int total = 0;
int N = A.getNumElements();
for (int i = 0; i < N; i++) {
if( A.data[i] )
total++;
}
return total;
} | [
"Counts the number of elements in A which are true\n@param A input matrix\n@return number of true elements"
] | [
"Utility method used to convert a Number into a BigInteger.\n\n@param value Number instance\n@return BigInteger instance",
"Create constant name.\n@param state STATE_UNCHANGED, STATE_CHANGED, STATE_NEW or STATE_DELETED.\n@return cconstanname as String",
"Returns the service id with the propertype.\n\n@param se... |
public GVRAnimator start(int animIndex)
{
if ((animIndex < 0) || (animIndex >= mAnimations.size()))
{
throw new IndexOutOfBoundsException("Animation index out of bounds");
}
GVRAnimator anim = mAnimations.get(animIndex);
start(anim);
return anim;
} | [
"Starts the animation with the given index.\n@param animIndex 0-based index of {@link GVRAnimator} to start;\n@see GVRAvatar#stop()\n@see #start(String)"
] | [
"Read the table from the file and populate the supplied Table instance.\n\n@param file database file\n@param table Table instance",
"Utility method to retrieve the next working date start time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of next work... |
private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
Main.getProperties().setProperty(Main.PROPERTY_MAINFRAME_HEIGHT, "" + this.getHeight());
Main.getProperties().setProperty(Main.PROPERTY_MAINFRAME_WIDTH, "" + this.getWidth());
Main.getProperties().setProperty(Ma... | [
"Exit the Application"
] | [
"Only match if the TypeReference is at the specified location within the file.",
"Use this API to fetch ipset_nsip6_binding resources of given name .",
"The mediator registration config. If it contains default config and definitions,\nthen the dynamic config will be initialized with those values.\n\n@see org.op... |
private void registerSynchronization(TransactionImpl odmgTrans, Transaction transaction)
{
// todo only need for development
if (odmgTrans == null || transaction == null)
{
log.error("One of the given parameters was null --> cannot do synchronization!" +
... | [
"Do synchronization of the given J2EE ODMG Transaction"
] | [
"Ask the specified player for an Artist menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packe... |
public static CmsResource getDescriptor(CmsObject cms, String basename) {
CmsSolrQuery query = new CmsSolrQuery();
query.setResourceTypes(CmsMessageBundleEditorTypes.BundleType.DESCRIPTOR.toString());
query.setFilterQueries("filename:\"" + basename + CmsMessageBundleEditorTypes.Descriptor.POSTF... | [
"Returns the bundle descriptor for the bundle with the provided base name.\n@param cms {@link CmsObject} used for searching.\n@param basename the bundle base name, for which the descriptor is searched.\n@return the bundle descriptor, or <code>null</code> if it does not exist or searching fails."
] | [
"Rename with retry.\n\n@param from\n@param to\n@return <tt>true</tt> if the file was successfully renamed.",
"Add a LIKE clause so the column must mach the value using '%' patterns.",
"Set HTTP client\n\n@param httpClient\nAn instance of OkHttpClient\n@return Api Client",
"Returns information about all client... |
protected ServiceRegistration registerProxy(Object objectProxy, Class clazz) {
Dictionary<String, Object> props = new Hashtable<String, Object>();
ServiceRegistration registration;
registration = context.registerService(clazz, objectProxy, props);
return registration;
} | [
"Utility method to register a proxy has a Service in OSGi."
] | [
"Add roles for given role parent item.\n\n@param ouItem group parent item",
"Returns true if we should skip this bar, i.e. the bar only has a single child task.\n\n@param row bar row to test\n@return true if this bar should be skipped",
"Parses the equation and compiles it into a sequence which can be executed ... |
public void lock(Object obj, int lockMode) throws LockNotGrantedException
{
if (log.isDebugEnabled()) log.debug("lock object was called on tx " + this + ", object is " + obj.toString());
checkOpen();
RuntimeObject rtObject = new RuntimeObject(obj, this);
lockAndRegister(rtObject... | [
"Upgrade the lock on the given object to the given lock mode. The call has\nno effect if the object's current lock is already at or above that level of\nlock mode.\n\n@param obj object to acquire a lock on.\n@param lockMode lock mode to acquire. The lock modes\nare <code>READ</code> , <code>UPGRADE</code> ... | [
"Returns s if it's at most maxWidth chars, otherwise chops right side to fit.",
"Stop Redwood, closing all tracks and prohibiting future log messages.",
"Create parameter converters from methods annotated with @AsParameterConverter\n@see {@link AbstractStepsFactory}",
"Converts a row major block matrix into a... |
static void backupDirectory(final File source, final File target) throws IOException {
if (!target.exists()) {
if (!target.mkdirs()) {
throw PatchLogger.ROOT_LOGGER.cannotCreateDirectory(target.getAbsolutePath());
}
}
final File[] files = source.listFiles(... | [
"Backup all xml files in a given directory.\n\n@param source the source directory\n@param target the target directory\n@throws IOException for any error"
] | [
"Returns the full record for a single attachment.\n\n@param attachment Globally unique identifier for the attachment.\n@return Request object",
"Use this API to delete application.",
"Registers annotations which will be considered as bean defining annotations.\n\nNOTE - If used along with {@code <trim/>} bean ... |
private double getConstraint(double x1, double x2)
{
double c1,c2,h;
c1 = -x1*x1-x2*x2+1+0.1*Math.cos(16*Math.atan(x1/x2));
c2 = (x1-0.5)*(x1-0.5)+(x2-0.5)*(x2-0.5)-0.5;
if(c1>c2)
h = (c1>0)?c1:0;
else
h = (c2>0)?c2:0;
return h;
} | [
"use the design parameters to compute the constraint equation to get the value"
] | [
"Prints a suggestion to stderr for the argument based on the levenshtein distance metric\n\n@param arg the argument which could not be assigned to a flag\n@param co the {@link ConfigOption} List where every flag is stored",
"Returns a name for the principal based upon one of the attributes\nof the main CommonProf... |
public List<WbSearchEntitiesResult> wbSearchEntities(String search, String language,
Boolean strictLanguage, String type, Long limit, Long offset)
throws MediaWikiApiErrorException {
Map<String, String> parameters = new HashMap<String, String... | [
"Executes the API action \"wbsearchentity\" for the given parameters.\nSearches for entities using labels and aliases. Returns a label and\ndescription for the entity in the user language if possible. Returns\ndetails of the matched term. The matched term text is also present in the\naliases key if different from t... | [
"Calculates Tangent value of the complex number.\n\n@param z1 A ComplexNumber instance.\n@return Returns new ComplexNumber instance containing the Tangent value of the specified complex number.",
"Reads a nested table. Uses the supplied reader class instance.\n\n@param readerClass reader class instance\n@return t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.