query stringlengths 74 6.1k | positive listlengths 1 1 | negative listlengths 9 9 |
|---|---|---|
@Override public void write(ProjectFile projectFile, OutputStream out) throws IOException
{
m_projectFile = projectFile;
m_eventManager = projectFile.getEventManager();
m_writer = new PrintStream(out); // the print stream class is the easiest way to create a text file
m_buffer = new StringBu... | [
"Write a project file in SDEF format to an output stream.\n\n@param projectFile ProjectFile instance\n@param out output stream"
] | [
"Get a value as a string.\n\n@param key the key for looking up the value.\n@param type the type of the object\n@param <V> the type",
"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 fr... |
@SuppressWarnings("unchecked")
public final FluentModelImplT withTag(String key, String value) {
if (this.inner().getTags() == null) {
this.inner().withTags(new HashMap<String, String>());
}
this.inner().getTags().put(key, value);
return (FluentModelImplT) this;
} | [
"Adds a tag to the resource.\n@param key the key for the tag\n@param value the value for the tag\n@return the next stage of the definition/update"
] | [
"Compute costs.",
"Utility function that copies a string array except for the first element\n\n@param arr Original array of strings\n@return Copied array of strings",
"Reads the cost rate tables from the file.\n\n@param resource parent resource\n@param rates XML cot rate tables",
"Transforms a length accordin... |
public static Dimension dimensionsToFit(Dimension target, Dimension source) {
// if target width/height is zero then we have no preference for that, so set it to the original value,
// since it cannot be any larger
int maxWidth;
if (target.getX() == 0) {
maxWidth = source.ge... | [
"Returns width and height that allow the given source width, height to fit inside the target width, height\nwithout losing aspect ratio"
] | [
"Initialize the key set for an xml bundle.",
"Sum of the elements.\n\n@param data Data.\n@return Sum(data).",
"Get a property as a int or null.\n\n@param key the property name",
"Retrieves the time at which work finishes on the given date, or returns\nnull if this is a non-working day.\n\n@param date Date ins... |
public List<CmsJspNavElement> getSubNavigation() {
if (m_subNavigation == null) {
if (m_resource.isFile()) {
m_subNavigation = Collections.emptyList();
} else if (m_navContext == null) {
try {
throw new Exception("Can not get subnaviga... | [
"Gets the sub-entries of the navigation entry.\n\n@return the sub-entries"
] | [
"This function interprets the arguments of the main function. By doing\nthis it will set flags for the dump generation. See in the help text for\nmore specific information about the options.\n\n@param args\narray of arguments from the main function.\n@return list of {@link DumpProcessingOutputAction}",
"Check tha... |
private long doMemoryManagementAndPerFrameCallbacks() {
long currentTime = GVRTime.getCurrentTime();
mFrameTime = (currentTime - mPreviousTimeNanos) / 1e9f;
mPreviousTimeNanos = currentTime;
/*
* Without the sensor data, can't draw a scene properly.
*/
if (!(mS... | [
"This is the code that needs to be executed before either eye is drawn.\n\n@return Current time, from {@link GVRTime#getCurrentTime()}"
] | [
"Methods returns InetAddress for localhost\n\n@return InetAddress of the localhost\n@throws UnknownHostException if localhost could not be resolved",
"Utility function that fetches user defined store definitions\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fet... |
private RelationType getRelationType(int type)
{
RelationType result;
if (type > 0 && type < RELATION_TYPES.length)
{
result = RELATION_TYPES[type];
}
else
{
result = RelationType.FINISH_START;
}
return result;
} | [
"Convert an integer to a RelationType instance.\n\n@param type integer value\n@return RelationType instance"
] | [
"Gets the health memory.\n\n@return the health memory",
"Not exposed directly - the Query object passed as parameter actually contains results...",
"set custom response or request for a profile's default client, ensures profile and path are enabled\n\n@param profileName profileName to modift, default client is ... |
public static String getEffortLevelDescription(Verbosity verbosity, int points)
{
EffortLevel level = EffortLevel.forPoints(points);
switch (verbosity)
{
case ID:
return level.name();
case VERBOSE:
return level.getVerboseDescription();
case SH... | [
"Returns the right string representation of the effort level based on given number of points."
] | [
"Write a size prefixed string where the size is stored as a 2 byte\nshort\n\n@param buffer The buffer to write to\n@param s The string to write",
"Gets the property and casts to the appropriate type\n\n@param <T>\n@param key The property name\n@param type The property type\n@return The value of the property"... |
public T removeFile(final String name, final List<String> path, final byte[] existingHash, final boolean isDirectory) {
return removeFile(name, path, existingHash, isDirectory, null);
} | [
"Remove a misc file.\n\n@param name the file name\n@param path the relative path\n@param existingHash the existing hash\n@param isDirectory whether the file is a directory or not\n@return the builder"
] | [
"Create the required services according to the server setup\n\n@param config Service configuration\n@return Services map",
"currently does not support paths with name constrains",
"Overloads the left shift operator to provide syntactic sugar for appending to a StringBuilder.\n\n@param self a StringBuilder\n@pa... |
public static Filter.Builder makeAndFilter(Iterable<Filter> subfilters) {
return Filter.newBuilder()
.setCompositeFilter(CompositeFilter.newBuilder()
.addAllFilters(subfilters)
.setOp(CompositeFilter.Operator.AND));
} | [
"Make a composite filter from the given sub-filters using AND to combine filters."
] | [
"Helper method to Close all open socket connections and checkin back to\nthe pool\n\n@param storeNamesToCleanUp List of stores to be cleanedup from the current\nstreaming session",
"Returns the perma link for the current page based on the URI and detail content id stored in the CmsObject passed as a parameter.<p<... |
public static <T> int indexOf(T[] array, T element) {
for ( int i = 0; i < array.length; i++ ) {
if ( array[i].equals( element ) ) {
return i;
}
}
return -1;
} | [
"Return the position of an element inside an array\n\n@param array the array where it looks for an element\n@param element the element to find in the array\n@param <T> the type of elements in the array\n@return the position of the element if it's found in the array, -1 otherwise"
] | [
"Collapse repeated records, using exact string match on the record.\nThis is generally useful for making very verbose logs more readable.\n@return this",
"Use this API to fetch all the nstimeout resources that are configured on netscaler.",
"Computes the rank of a matrix using the specified tolerance.\n\n@param... |
public <T extends Widget & Checkable> boolean check(int checkableIndex) {
List<T> children = getCheckableChildren();
T checkableWidget = children.get(checkableIndex);
return checkInternal(checkableWidget, true);
} | [
"Checks the widget by index\n@param checkableIndex The index is in the range from 0 to size -1, where size is the number of\nCheckable widgets in the group. It does not take into account any\nnon-Checkable widgets added to the group widget.\n@return {@code True} if {@code checkableWidget} is a child of this {@code ... | [
"Creates a cube with each face as a separate mesh using a different texture.\nThe meshes will share a common vertex array but will have separate index buffers.\n@param gvrContext context to use for creating cube\n@param facingOut true for outward normals, false for inward normals\n@param vertexDesc string... |
public void removeSource(GVRAudioSource audioSource)
{
synchronized (mAudioSources)
{
audioSource.setListener(null);
mAudioSources.remove(audioSource);
}
} | [
"Removes an audio source from the audio manager.\n@param audioSource audio source to remove"
] | [
"Return the list of module dependencies\n\n@param moduleName\n@param moduleVersion\n@param fullRecursive\n@param corporate\n@param thirdParty\n@return List<Dependency>\n@throws GrapesCommunicationException",
"Computes the blend weights for the given time and\nupdates them in the target.",
"The user can be refer... |
private void setCalendarToOrdinalRelativeDay(Calendar calendar, int dayNumber)
{
int currentDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
int requiredDayOfWeek = getDayOfWeek().getValue();
int dayOfWeekOffset = 0;
if (requiredDayOfWeek > currentDayOfWeek)
{
dayOfWeekOffset = ... | [
"Moves a calendar to the nth named day of the month.\n\n@param calendar current date\n@param dayNumber nth day"
] | [
"prefetch defined relationships requires JDBC level 2.0, does not work\nwith Arrays",
"This method writes data for an individual calendar to a PM XML file.\n\n@param mpxj ProjectCalander instance",
"Sets the target translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will... |
List<MwDumpFile> findDumpsOnline(DumpContentType dumpContentType) {
List<String> dumpFileDates = findDumpDatesOnline(dumpContentType);
List<MwDumpFile> result = new ArrayList<>();
for (String dateStamp : dumpFileDates) {
if (dumpContentType == DumpContentType.DAILY) {
result.add(new WmfOnlineDailyDumpFil... | [
"Finds out which dump files of the given type are available for download.\nThe result is a list of objects that describe the available dump files,\nin descending order by their date. Not all of the dumps included might be\nactually available.\n\n@return list of objects that provide information on available full dum... | [
"Use this API to add sslocspresponder.",
"Try to fire a given event on the Browser.\n\n@param eventable the eventable to fire\n@return true iff the event is fired",
"Processes one item document. This is often the main workhorse that\ngathers the data you are interested in. You can modify this code as you\nwish.... |
public static String getClassName(Class<?> c) {
String name = c.getName();
return name.substring(name.lastIndexOf('.') + 1, name.length());
} | [
"Get the class name without the package\n\n@param c The class name with package\n@return the class name without the package"
] | [
"create a HashMap form the json properties and add it to the shape\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Log a trace message.",
"Add an additional SSExtension\n@param ssExt the ssextension to set",
"Patch provided by Avril Kotzen (hi001@webmail.co.za)\nDB2 handles TINYINT (for m... |
public Step createRootStep() {
return new Step()
.withName("Root step")
.withTitle("Allure step processing error: if you see this step something went wrong.")
.withStart(System.currentTimeMillis())
.withStatus(Status.BROKEN);
} | [
"Construct new root step. Used for inspect problems with Allure lifecycle\n\n@return new root step marked as broken"
] | [
"Write resource assignment workgroup.\n\n@param record resource assignment workgroup instance\n@throws IOException",
"The % Work Complete field contains the current status of a task,\nexpressed as the percentage of the task's work that has been completed.\nYou can enter percent work complete, or you can have Micr... |
static String toFormattedString(final String iban) {
final StringBuilder ibanBuffer = new StringBuilder(iban);
final int length = ibanBuffer.length();
for (int i = 0; i < length / 4; i++) {
ibanBuffer.insert((i + 1) * 4 + i, ' ');
}
return ibanBuffer.toString().trim... | [
"Returns formatted version of Iban.\n\n@return A string representing formatted Iban for printing."
] | [
"Renames this folder.\n\n@param newName the new name of the folder.",
"Returns a list of files in given addon passing given filter.",
"Load a classifier from the specified InputStream. The classifier is\nreinitialized from the flags serialized in the classifier. This does not\nclose the InputStream.\n\n@param i... |
@ArgumentsChecked
@Throws(IllegalNullArgumentException.class)
public static float checkFloat(@Nonnull final Number number) {
Check.notNull(number, "number");
if (!isInFloatRange(number)) {
throw new IllegalNumberRangeException(number.toString(), FLOAT_MIN, FLOAT_MAX);
}
return number.floatValue();
} | [
"Checks if a given number is in the range of a float.\n\n@param number\na number which should be in the range of a float (positive or negative)\n\n@see java.lang.Float#MIN_VALUE\n@see java.lang.Float#MAX_VALUE\n\n@return number as a float"
] | [
"Returns the first product found in the vector of calibration products\nwhich matches the given symbol, where symbol is the String set in\nthe calibrationSpecs.\n\n@param symbol A given symbol string.\n@return The product associated with that symbol.",
"Produces or returns the existing proxy class. The operation ... |
private ColumnDefinition[] columnDefinitions(ColumnDefinition[] columns, String[] order)
{
Map<String, ColumnDefinition> map = makeColumnMap(columns);
ColumnDefinition[] result = new ColumnDefinition[order.length];
for (int index = 0; index < order.length; index++)
{
result[index] = ... | [
"Generate an ordered set of column definitions from an ordered set of column names.\n\n@param columns column definitions\n@param order column names\n@return ordered set of column definitions"
] | [
"Sets the final transform of the bone during animation.\n\n@param finalTransform The transform matrix representing\nthe bone's pose after computing the skeleton.",
"Retrieves a long value from the extended data.\n\n@param type Type identifier\n@return long value",
"Calculate a cache key.\n@param sql to use\n@pa... |
public HashMap<String, IndexInput> getIndexInputList() {
HashMap<String, IndexInput> clonedIndexInputList = new HashMap<String, IndexInput>();
for (Entry<String, IndexInput> entry : indexInputList.entrySet()) {
clonedIndexInputList.put(entry.getKey(), entry.getValue().clone());
}
return clonedInde... | [
"Gets the index input list.\n\n@return the index input list"
] | [
"Extracts the java class name from the schema info\n\n@param schemaInfo the schema info, a string like: java=java.lang.String\n@return the name of the class extracted from the schema info",
"Add server redirect to a profile, using current active ServerGroup\n\n@param region region\n@param srcUrl source URL\n@para... |
public void handleConnectOriginal(String pathInContext, String pathParams, HttpRequest request, HttpResponse response) throws HttpException, IOException {
URI uri = request.getURI();
try {
LOG.fine("CONNECT: " + uri);
InetAddrPort addrPort;
// When logging, we'll att... | [
"Copied from original SeleniumProxyHandler\nChanged SslRelay to SslListener and getSslRelayOrCreateNew to getSslRelayOrCreateNewOdo\nNo other changes to the function\n\n@param pathInContext\n@param pathParams\n@param request\n@param response\n@throws HttpException\n@throws IOException"
] | [
"Loads a CRF classifier from a filepath, and returns it.\n\n@param file\nFile to load classifier from\n@return The CRF classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundExcepti... |
public static AbstractReportGenerator generateHtml5Report() {
AbstractReportGenerator report;
try {
Class<?> aClass = new ReportGenerator().getClass().getClassLoader()
.loadClass( "com.tngtech.jgiven.report.html5.Html5ReportGenerator" );
report = (AbstractRepo... | [
"Searches the Html5ReportGenerator in Java path and instantiates the report"
] | [
"Initializes the fields on the changes file with the values of the specified\nbinary package control file.\n\n@param packageControlFile",
"Gets the specified SPI, using the current thread context classloader\n\n@param <T> type of spi class\n@param spiType spi class to retrieve\n@return object",
"You can r... |
private Object tryConvert(
final MfClientHttpRequestFactory clientHttpRequestFactory,
final Object rowValue) throws URISyntaxException, IOException {
if (this.converters.isEmpty()) {
return rowValue;
}
String value = String.valueOf(rowValue);
for (Tab... | [
"If converters are set on a table, this function tests if these can convert a cell value. The first\nconverter, which claims that it can convert, will be used to do the conversion."
] | [
"Extract resource group from a resource ID string.\n@param id the resource ID string\n@return the resource group name",
"Returns the list of people who have favorited a given photo.\n\nThis method does not require authentication.\n\n@param photoId\n@param perPage\n@param page\n@return List of {@link com.flickr4ja... |
private boolean skipBar(Row row)
{
List<Row> childRows = row.getChildRows();
return childRows.size() == 1 && childRows.get(0).getChildRows().isEmpty();
} | [
"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"
] | [
"Places a connection back in the originating partition.\n@param connectionHandle to place back\n@throws SQLException on error",
"Checks to see if all the provided matrices are the expected size for an SVD. If an error is encountered\nthen an exception is thrown. This automatically handles compact and non-compac... |
public static base_responses add(nitro_service client, systemuser resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
systemuser addresources[] = new systemuser[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new systemu... | [
"Use this API to add systemuser resources."
] | [
"Move the SQL value to the next one for version processing.",
"Creates a spin wrapper for a data input. The data format of the\ninput is assumed to be JSON.\n\n@param input the input to wrap\n@return the spin wrapper for the input\n\n@throws IllegalArgumentException in case an argument of illegal type is provided... |
public static String[] allUpperCase(String... strings){
String[] tmp = new String[strings.length];
for(int idx=0;idx<strings.length;idx++){
if(strings[idx] != null){
tmp[idx] = strings[idx].toUpperCase();
}
}
return tmp;
} | [
"Make all elements of a String array upper case.\n@param strings string array, may contain null item but can't be null\n@return array containing all provided elements upper case"
] | [
"Randomly generates matrix with the specified number of non-zero elements filled with values from min to max.\n\n@param numRows Number of rows\n@param numCols Number of columns\n@param nz_total Total number of non-zero elements in the matrix\n@param min Minimum element value, inclusive\n@param max Maximum element v... |
public static <E> Set<E> diff(Set<E> s1, Set<E> s2) {
Set<E> s = new HashSet<E>();
for (E o : s1) {
if (!s2.contains(o)) {
s.add(o);
}
}
return s;
} | [
"Returns the difference of sets s1 and s2."
] | [
"Used by the slave host when creating the host info dmr sent across to the DC during the registration process\n\n@param ignoreUnaffectedServerGroups whether the slave host is set up to ignore config for server groups it does not have servers for\n@param hostModel the resource containing the host model\n@param model... |
public static protocolip_stats get(nitro_service service) throws Exception{
protocolip_stats obj = new protocolip_stats();
protocolip_stats[] response = (protocolip_stats[])obj.stat_resources(service);
return response[0];
} | [
"Use this API to fetch the statistics of all protocolip_stats resources that are configured on netscaler."
] | [
"Operators which affect the variables to its left and right",
"Log a fatal message.",
"Set up the ThreadContext and delegate.",
"Compares this value with the specified object for order. Returns a negative\ninteger, zero, or a positive integer as this value is less than, equal to, or\ngreater than the specifie... |
private boolean isInInnerCircle(float x, float y) {
return GearWearableUtility.isInCircle(x, y, CENTER_X, CENTER_Y, INNER_RADIUS);
} | [
"Check if position is in inner circle\n\n@param x x position\n@param y y position\n@return true if in inner circle, false otherwise"
] | [
"Invoked by subclasses; performs actual file roll. Tests to see whether roll\nis necessary have already been performed, so just do it.",
"Use this API to delete nsacl6 of given name.",
"Create a hazard curve from given times and given discount factors using default interpolation and extrapolation methods.\n\n@p... |
public int getJdbcType(String ojbType) throws SQLException
{
int result;
if(ojbType == null) ojbType = "";
ojbType = ojbType.toLowerCase();
if (ojbType.equals("bit"))
result = Types.BIT;
else if (ojbType.equals("tinyint"))
result = Types.TINYINT;
... | [
"Determines the java.sql.Types constant value from an OJB\nFIELDDESCRIPTOR value.\n\n@param type The FIELDDESCRIPTOR which JDBC type is to be determined.\n\n@return int the int value representing the Type according to\n\n@throws SQLException if the type is not a valid jdbc type.\njava.sql.Types"
] | [
"Creates the full sentence.\n\n@return the mtas CQL parser sentence condition\n@throws ParseException the parse exception",
"Checks if the query should be executed using the debug mode where the security restrictions do not apply.\n@param cms the current context.\n@param query the query to execute.\n@return a fla... |
public static final String printDuration(Duration duration)
{
String result = null;
if (duration != null)
{
result = duration.getDuration() + " " + printTimeUnits(duration.getUnits());
}
return result;
} | [
"Retrieve a duration in the form required by Phoenix.\n\n@param duration Duration instance\n@return formatted duration"
] | [
"Use this API to fetch vrid_nsip6_binding resources of given name .",
"Clears the dest ColumnBuffer and inserts all entries in dest where the timestamp passes the\ntimestampTest.\n\n@param dest Destination ColumnBuffer\n@param timestampTest Test to determine which timestamps get added to dest",
"Checks the stat... |
public static <E> Set<E> intersection(Set<E> s1, Set<E> s2) {
Set<E> s = new HashSet<E>();
s.addAll(s1);
s.retainAll(s2);
return s;
} | [
"Returns the intersection of sets s1 and s2."
] | [
"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",
"Walk project references recursively, adding thrift files to the provided list.",
"Get the bean if it exists in the contexts.... |
protected ExpectState prepareClosure(int pairIndex, MatchResult result) {
/* TODO: potentially remove this?
{
System.out.println( "Begin: " + result.beginOffset(0) );
System.out.println( "Length: " + result.length() );
System.out.println( "Current: " + input.getCurren... | [
"Don't use input, it's match values might have been reset in the\nloop that looks for the first possible match.\n\n@param pairIndex TODO\n@param result TODO\n@return TODO"
] | [
"Creates a ProjectCalendar instance from the Asta data.\n\n@param calendarRow basic calendar data\n@param workPatternMap work pattern map\n@param workPatternAssignmentMap work pattern assignment map\n@param exceptionAssignmentMap exception assignment map\n@param timeEntryMap time entry map\n@param exceptionTypeMap ... |
public SparqlResult runQuery(String endpoint, String query) {
return SparqlClient.execute(endpoint, query, username, password);
} | [
"An extension point so we can control how the query gets executed.\nThis exists for testing purposes, not because we believe it will\nactually be used for real."
] | [
"Creates the tables according to the schema files.\n\n@throws PlatformException If some error occurred",
"Returns the string in the buffer minus an leading or trailing whitespace or quotes",
"Adds an access constraint to the set used with the attribute\n@param accessConstraint the constraint\n@return a builder ... |
public static float[] getBoundingSize(GVRMesh mesh) {
final float [] dim = new float[3];
final float [] vertices = mesh.getVertices();
final int vsize = vertices.length;
float minx = Integer.MAX_VALUE;
float miny = Integer.MAX_VALUE;
float minz = Integer.MAX_VALUE;
... | [
"Calcs the bonding size of given mesh.\n\n@param mesh Mesh to calc its bouding size.\n@return The bounding size for x, y and z axis."
] | [
"Create a buffered image with the correct image bands etc... for the tiles being loaded.\n\n@param imageWidth width of the image to create\n@param imageHeight height of the image to create.",
"Pretty-print the object.",
"Adds a node to this graph.\n\n@param node the node",
"Invoke an HTTP GET request on a rem... |
private boolean relevant(File currentLogFile, GregorianCalendar lastRelevantDate) {
String fileName=currentLogFile.getName();
Pattern p = Pattern.compile(APPENER_DATE_DEFAULT_PATTERN);
Matcher m = p.matcher(fileName);
if(m.find()){
int year=Integer.parseInt(m.group(1));
int month=Integer.parseInt(m.group(... | [
"Get a log file and last relevant date, and check if the log file is relevant\n@param currentLogFile The log file\n@param lastRelevantDate The last date which files should be keeping since\n@return false if the file should be deleted, true if it does not."
] | [
"Computes the WordNet 2.0 POS tag corresponding to the PTB POS tag s.\n\n@param s a Penn TreeBank POS tag.",
"Use this API to Reboot reboot.",
"Sets the search scope.\n\n@param cms The current CmsObject object.",
"Parses a record containing hours and add them to a container.\n\n@param ranges hours container\n... |
public static <T> OptionalValue<T> ofNullable(ResourceKey key, T value) {
return new GenericOptionalValue<T>(RUNTIME_SOURCE, key, value);
} | [
"Returns new instance of OptionalValue with given key and value\n@param key resource key of the created value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue with given key"
] | [
"Use this API to fetch cachepolicylabel_policybinding_binding resources of given name .",
"Perform all Cursor cleanup here.",
"Get random stub matching this user type\n@param userType User type\n@return Random stub",
"Use this API to update rsskeytype.",
"Sets the current class definition derived from the c... |
public static base_response add(nitro_service client, dnssuffix resource) throws Exception {
dnssuffix addresource = new dnssuffix();
addresource.Dnssuffix = resource.Dnssuffix;
return addresource.add_resource(client);
} | [
"Use this API to add dnssuffix."
] | [
"Pick arbitrary wrapping method. No generics should be set.\n@param builder",
"Create new logging action\nThis method check if there is an old instance for this thread-local\nIf not - Initialize new instance and set it as this thread-local's instance\n@param logger\n@param auditor\n@param instance\n@return whethe... |
private void handleSerialAPIGetCapabilitiesResponse(SerialMessage incomingMessage) {
logger.trace("Handle Message Serial API Get Capabilities");
this.serialAPIVersion = String.format("%d.%d", incomingMessage.getMessagePayloadByte(0), incomingMessage.getMessagePayloadByte(1));
this.manufactureId = ((incomingMessa... | [
"Handles the response of the SerialAPIGetCapabilities request.\n@param incomingMessage the response message to process."
] | [
"Return the list of module dependencies\n\n@param moduleName\n@param moduleVersion\n@param fullRecursive\n@param corporate\n@param thirdParty\n@return List<Dependency>\n@throws GrapesCommunicationException",
"Sets ID field value.\n\n@param val value",
"Set a knot blend type.\n@param n the knot index\n@param typ... |
public void process(SearchDistributor distributor) {
List<PossibleState> bootStrap;
try {
bootStrap = bfs(bootStrapMin);
} catch (ModelException e) {
bootStrap = new LinkedList<>();
}
List<Frontier> frontiers = new LinkedList<>();
for (Pos... | [
"Performs the BFS and gives the results to a distributor to distribute\n\n@param distributor the distributor"
] | [
"Handle bind service event.\n@param service Service instance\n@param props Service reference properties",
"Use this API to update gslbservice resources.",
"generate a message for loglevel FATAL\n\n@param pObject the message Object",
"Returns the project membership record.\n\n@param projectMembership Globally... |
public static PersistenceBroker createPersistenceBroker(String jcdAlias,
String user,
String password) throws PBFactoryException
{
return PersistenceBrokerFactoryFactory.instance().
... | [
"Creates a new broker instance.\n\n@param jcdAlias The jdbc connection descriptor name as defined in the repository\n@param user The user name to be used for connecting to the database\n@param password The password to be used for connecting to the database\n@return The persistence broker\n@see org.apache.ojb.br... | [
"Provides a reverse view on the given list which is especially useful to traverse a list backwards in a for-each\nloop. The list itself is not modified by calling this method.\n\n@param list\nthe list whose elements should be traversed in reverse. May not be <code>null</code>.\n@return a list with the same elements... |
private void findScrollView(ViewGroup viewGroup) {
scrollChild = viewGroup;
if (viewGroup.getChildCount() > 0) {
int count = viewGroup.getChildCount();
View child;
for (int i = 0; i < count; i++) {
child = viewGroup.getChildAt(i);
if (c... | [
"Find out the scrollable child view from a ViewGroup.\n\n@param viewGroup"
] | [
"The sniffing Loggers are some special Loggers, whose level will be set to TRACE forcedly.\n@param logger",
"A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain u... |
public void insertValue(int index, float[] newValue) {
if ( newValue.length == 2) {
try {
value.add( index, new SFVec2f(newValue[0], newValue[1]) );
}
catch (IndexOutOfBoundsException e) {
Log.e(TAG, "X3D MFVec2f get1Value(index) out of bounds.... | [
"Insert a new value prior to the index location in the existing value array,\nincreasing the field length accordingly.\n@param index - where the new values in an SFVec2f object will be placed in the array list\n@param newValue - the new x, y value for the array list"
] | [
"Use this API to update transformpolicy.",
"Creates a method signature.\n\n@param method Method instance\n@return method signature",
"Promotes this version of the file to be the latest version.",
"Calls a function script associated with this component.\nThe function is called even if the component\nis not ena... |
public boolean isDeleted(Identity id)
{
ObjectEnvelope envelope = buffer.getByIdentity(id);
return (envelope != null && envelope.needsDelete());
} | [
"Checks if the object with the given identity has been deleted\nwithin the transaction.\n@param id The identity\n@return true if the object has been deleted\n@throws PersistenceBrokerException"
] | [
"Adds a command class to the list of supported command classes by this\nendpoint. Does nothing if command class is already added.\n@param commandClass the command class instance to add.",
"Returns the rendered element content for all the given containers.\n\n@param element the element to render\n@param containers... |
public static int cudnnReduceTensor(
cudnnHandle handle,
cudnnReduceTensorDescriptor reduceTensorDesc,
Pointer indices,
long indicesSizeInBytes,
Pointer workspace,
long workspaceSizeInBytes,
Pointer alpha,
cudnnTensorDescriptor aDesc,
Point... | [
"The indices space is ignored for reduce ops other than min or max."
] | [
"Use this API to update nsacl6.",
"Read data for a single table and store it.\n\n@param is input stream\n@param table table header",
"Get photos from the user's contacts.\n\nThis method requires authentication with 'read' permission.\n\n@param count\nThe number of photos to return\n@param justFriends\nSet to tr... |
public int getRegisteredResourceRequestCount() {
int count = 0;
for(Entry<K, Queue<AsyncResourceRequest<V>>> entry: this.requestQueueMap.entrySet()) {
// FYI: .size() is not constant time in the next call. ;)
count += entry.getValue().size();
}
return count;
} | [
"Count the total number of queued resource requests for all queues. The\nresult is \"approximate\" in the face of concurrency since individual\nqueues can change size during the aggregate count.\n\n@return The (approximate) aggregate count of queued resource requests."
] | [
"Logic for timestamp\n@param time Epoch date of creation\n@return String timestamp",
"Removes all the given tags from the document.\n\n@param dom the document object.\n@param tagName the tag name, examples: script, style, meta\n@return the changed dom.",
"Retrieve the default number of minutes per year.\n\n... |
public void setLoop(boolean doLoop, GVRContext gvrContext) {
if (this.loop != doLoop ) {
// a change in the loop
for (GVRNodeAnimation gvrKeyFrameAnimation : gvrKeyFrameAnimations) {
if (doLoop) gvrKeyFrameAnimation.setRepeatMode(GVRRepeatMode.REPEATED);
e... | [
"SetLoop will either set the GVRNodeAnimation's Repeat Mode to REPEATED if loop is true.\nor it will set the GVRNodeAnimation's Repeat Mode to ONCE if loop is false\nif loop is set to TRUE, when it was previously FALSE, then start the Animation.\n@param doLoop\n@param gvrContext"
] | [
"Gets information about all of the group memberships for this user.\nDoes not support paging.\n\n<p>Note: This method is only available to enterprise admins.</p>\n\n@return a collection of information about the group memberships for this user.",
"adds a value to the list\n\n@param value the value",
"Notifies th... |
public ProjectCalendarHours getHours(Day day)
{
ProjectCalendarHours result = getCalendarHours(day);
if (result == null)
{
//
// If this is a base calendar and we have no hours, then we
// have a problem - so we add the default hours and try again
//
if ... | [
"This method retrieves the calendar hours for the specified day.\nNote that if this is a derived calendar, then this method\nwill refer to the base calendar where no hours are specified\nin the derived calendar.\n\n@param day Day instance\n@return calendar hours"
] | [
"The local event will decide the next state of the document in question.\n\n@param <T> the type of class represented by the document in the change event.\n@return the local full document which may be null.",
"Sends a request to the API with the given parameters and the given\nrequest method and returns the result... |
public static void printResults(Counter<String> entityTP, Counter<String> entityFP,
Counter<String> entityFN) {
Set<String> entities = new TreeSet<String>();
entities.addAll(entityTP.keySet());
entities.addAll(entityFP.keySet());
entities.addAll(entityFN.keySet());
b... | [
"Given counters of true positives, false positives, and false\nnegatives, prints out precision, recall, and f1 for each key."
] | [
"Create a field map for enterprise custom fields.\n\n@param props props data\n@param c target class",
"Creates a Bytes object by copying the value of the given String with a given charset",
"Does this procedure return any values to the 'caller'?\n\n@return <code>true</code> if the procedure returns at least 1\n... |
private String addPathProperty(final List<String> command, final String typeName, final String propertyName, final Map<String, String> properties, final DirectoryGrouping directoryGrouping,
final File typeDir, File serverDir) {
final String result;
final String value =... | [
"Adds the absolute path to command.\n\n@param command the command to add the arguments to.\n@param typeName the type of directory.\n@param propertyName the name of the property.\n@param properties the properties where the path may already be defined.\n@param directoryGrouping the dire... | [
"Maps a field index to a ResourceField instance.\n\n@param fields array of fields used as the basis for the mapping.\n@param index required field index\n@return ResourceField instance",
"Performs a null edit on a property. This has some effects on Wikibase,\nsuch as refreshing the labels of the referred items in ... |
@Override
public boolean isCompleteRequest(ByteBuffer buffer) {
DataInputStream inputStream = new DataInputStream(new ByteBufferBackedInputStream(buffer));
try {
int dataSize = inputStream.readInt();
if(logger.isTraceEnabled())
logger.trace("In isCompleteReq... | [
"This method is used by non-blocking code to determine if the give buffer\nrepresents a complete request. Because the non-blocking code can by\ndefinition not just block waiting for more data, it's possible to get\npartial reads, and this identifies that case.\n\n@param buffer Buffer to check; the buffer is reset t... | [
"Return the number of days between startDate and endDate given the\nspecific daycount convention.\n\n@param startDate The start date given as a {@link org.threeten.bp.LocalDate}.\n@param endDate The end date given as a {@link org.threeten.bp.LocalDate}.\n@param convention A convention string.\n@return The number of... |
public static base_responses disable(nitro_service client, String id[]) throws Exception {
base_responses result = null;
if (id != null && id.length > 0) {
Interface disableresources[] = new Interface[id.length];
for (int i=0;i<id.length;i++){
disableresources[i] = new Interface();
disableresources[i]... | [
"Use this API to disable Interface resources of given names."
] | [
"Wraps a StatisticsMatrix around 'm'. Does NOT create a copy of 'm' but saves a reference\nto it.",
"This method is called from Javascript, passing in the previously created\ncallback key. It uses that to find the correct handler and then passes on\nthe call. State events in the Google Maps API don't pass any pa... |
public static <T> List<T> copyOf(Collection<T> source) {
Preconditions.checkNotNull(source);
if (source instanceof ImmutableList<?>) {
return (ImmutableList<T>) source;
}
if (source.isEmpty()) {
return Collections.emptyList();
}
return ofInternal(s... | [
"Creates an immutable list that consists of the elements in the given collection. If the given collection is already an immutable list,\nit is returned directly.\n\n@param source the given collection\n@return an immutable list"
] | [
"Turn a resultset into EndpointOverride\n\n@param results results containing relevant information\n@return EndpointOverride\n@throws Exception exception",
"Creates the main component of the editor with all sub-components.\n@return the completely filled main component of the editor.\n@throws IOException thrown if ... |
private static CmsObject adjustSiteRootIfNecessary(final CmsObject cms, final CmsModule module)
throws CmsException {
CmsObject cmsClone;
if ((null == module.getSite()) || cms.getRequestContext().getSiteRoot().equals(module.getSite())) {
cmsClone = cms;
} else {
cmsC... | [
"Adjusts the site root and returns a cloned CmsObject, iff the module has set an import site that differs\nfrom the site root of the CmsObject provided as argument. Otherwise returns the provided CmsObject unchanged.\n@param cms The original CmsObject.\n@param module The module where the import site is read from.\n... | [
"Get all views from the list content\n@return list of views currently visible",
"Get a store definition from the given list of store definitions\n\n@param list A list of store definitions\n@param name The name of the store\n@return The store definition",
"Determines the number of elements that the query would r... |
private static long switchValue8(long currentHexValue, int digitCount) {
long result = 0x7 & currentHexValue;
int shift = 0;
while(--digitCount > 0) {
shift += 3;
currentHexValue >>>= 4;
result |= (0x7 & currentHexValue) << shift;
}
return result;
} | [
"The digits were stored as a hex value, thix switches them to an octal value.\n\n@param currentHexValue\n@param digitCount\n@return"
] | [
"Provides a consistent ordering over lists. First compares by the first\nelement. If that element is equal, the next element is considered, and so\non.",
"Return whether or not the field value passed in is the default value for the type of the field. Null will return\ntrue.",
"Generates a unique signature for a... |
@SuppressWarnings("unchecked")
private void setProxyRequestHeaders(HttpServletRequest httpServletRequest,
HttpMethod httpMethodProxyRequest) throws Exception {
RequestInformation requestInfo = requestInformation.get();
String hostName = HttpUtilities.getHostNa... | [
"Retrieves all of the headers from the servlet request and sets them on\nthe proxy request\n\n@param httpServletRequest The request object representing the client's request to the\nservlet engine\n@param httpMethodProxyRequest The request that we are about to send to the proxy host"
] | [
"Gets existing config files.\n\n@return the existing config files",
"Converts this object to JSON.\n\n@return the JSON representation\n\n@throws JSONException if JSON operations fail",
"Use this API to delete gslbsite resources of given names.",
"Gets an app client by its client app id if it has been initiali... |
public static int[][] toInt(double[][] array) {
int[][] n = new int[array.length][array[0].length];
for (int i = 0; i < array.length; i++) {
for (int j = 0; j < array[0].length; j++) {
n[i][j] = (int) array[i][j];
}
}
return n;
} | [
"2-D Double array to integer array.\n\n@param array Double array.\n@return Integer array."
] | [
"Clear any custom configurations to Redwood\n@return this",
"Send message to socket's output stream.\n\n@param messageToSend message to send.\n\n@return {@code true} if message was sent successfully, {@code false} otherwise.",
"This method allows nested tasks to be added, with the WBS being\ncompleted automatic... |
protected static File platformIndependentUriToFile(final URI fileURI) {
File file;
try {
file = new File(fileURI);
} catch (IllegalArgumentException e) {
if (fileURI.toString().startsWith("file://")) {
file = new File(fileURI.toString().substring("file://"... | [
"Convert a url to a file object. No checks are made to see if file exists but there are some hacks that\nare needed to convert uris to files across platforms.\n\n@param fileURI the uri to convert"
] | [
"Invalidating just the GVRView associated with the GVRViewSceneObject\nincorrectly set the clip rectangle to just that view. To fix this,\nwe have to create a full screen android View and invalidate this\nto restore the clip rectangle.\n@return full screen View object",
"Do some magic to turn request parameters i... |
public void addExportedPackages(Set<String> exportedPackages) {
addExportedPackages(exportedPackages.toArray(new String[exportedPackages.size()]));
} | [
"Add the set with given bundles to the \"Export-Package\" main attribute.\n\n@param exportedPackages The set of all packages to add."
] | [
"Read configuration from zookeeper",
"The ID field contains the identifier number that Microsoft Project\nautomatically assigns to each task as you add it to the project.\nThe ID indicates the position of a task with respect to the other tasks.\n\n@param val ID",
"Puts a message in the wake-up queue of this nod... |
private Cluster expandCluster(final Cluster cluster,
final Point2D point,
final List<Point2D> neighbors,
final KDTree<Point2D> points,
final Map<Point2D, PointStatus> visit... | [
"Expands the cluster to include density-reachable items.\n\n@param cluster Cluster to expand\n@param point Point to add to cluster\n@param neighbors List of neighbors\n@param points the data set\n@param visited the set of already visited points\n@return the expanded cluster"
] | [
"Use this API to unset the properties of nsrpcnode resources.\nProperties that need to be unset are specified in args array.",
"Converts an Accumulo Range to a Fluo Span\n\n@param range Range\n@return Span",
"Handle a value change.\n@param propertyId the column in which the value has changed.",
"Determines wh... |
public void processAnonymousReference(Properties attributes) throws XDocletException
{
ReferenceDescriptorDef refDef = _curClassDef.getReference("super");
String attrName;
if (refDef == null)
{
refDef = new ReferenceDescriptorDef("super");
... | [
"Processes an anonymous reference definition.\n\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\n@doc.tag type=\"content\"\n@doc.param name=\"attributes\" optional=\"true\" description=\"Attributes of the reference as nam... | [
"Returns a File object whose path is the expected user directory.\nDoes not create or check for existence.\n@param prefix\n@param suffix\n@param parent\n@return",
"Puts a message in the wake-up queue of this node to send the message on wake-up.\n@param serialMessage the message to put in the wake-up queue.",
"E... |
public void addCommandClass(ZWaveCommandClass commandClass) {
ZWaveCommandClass.CommandClass key = commandClass.getCommandClass();
if (!supportedCommandClasses.containsKey(key)) {
supportedCommandClasses.put(key, commandClass);
}
} | [
"Adds a command class to the list of supported command classes by this\nendpoint. Does nothing if command class is already added.\n@param commandClass the command class instance to add."
] | [
"Provides an object that can build SQL clauses to match this string representation.\n\nThis method can be overridden for other IP address types to match in their own ways.\n\n@param isEntireAddress\n@param translator\n@return",
"A specific, existing custom field can be updated by making a PUT request on the URL f... |
@Override
public void solve(DMatrixRMaj B, DMatrixRMaj X) {
blockB.reshape(B.numRows,B.numCols,false);
MatrixOps_DDRB.convert(B,blockB);
// since overwrite B is true X does not need to be passed in
alg.solve(blockB,null);
MatrixOps_DDRB.convert(blockB,X);
} | [
"Only converts the B matrix and passes that onto solve. Te result is then copied into\nthe input 'X' matrix.\n\n@param B A matrix ℜ <sup>m × p</sup>. Not modified.\n@param X A matrix ℜ <sup>n × p</sup>, where the solution is written to. Modified."
] | [
"In the 2.0 xsd the vault is in an external file, which has no namespace, using the output of the vault tool.\n\n@param f the file containing the external vault configuration as generated by the vault tool\n@return the vault config",
"Creates an observer\n\n@param method The observer method abstraction\n@p... |
public Info getInfo(String ... fields) {
QueryStringBuilder builder = new QueryStringBuilder();
if (fields.length > 0) {
builder.appendParam("fields", fields);
}
URL url = DEVICE_PIN_URL_TEMPLATE.buildWithQuery(this.getAPI().getBaseURL(), builder.toString(), this.getID()... | [
"Gets information about the device pin.\n@param fields the fields to retrieve.\n@return info about the device pin."
] | [
"to avoid creation of unmaterializable proxies",
"Merge the contents of the given plugin.xml into this one.",
"Compares current cluster with final cluster. Uses pertinent store defs\nfor each cluster to determine if a node that hosts a zone-primary in the\ncurrent cluster will no longer host any zone-nary in th... |
public void put(final K key, V value) {
ManagedReference<V> ref = new ManagedReference<V>(bundle, value) {
@Override
public void finalizeReference() {
super.finalizeReference();
internalMap.remove(key, get());
}
};
internalMap.p... | [
"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"
] | [
"Creates the graphic element to be shown when the datasource is empty",
"Build copyright map once.",
"Use this API to delete nsip6 resources.",
"Generate a map file from a jar file.\n\n@param jarFile jar file\n@param mapFileName map file name\n@param mapClassMethods true if we want to produce .Net style class... |
public static void main(String[] args) throws Exception {
StringUtils.printErrInvocationString("CRFClassifier", args);
Properties props = StringUtils.argsToProperties(args);
CRFClassifier<CoreLabel> crf = new CRFClassifier<CoreLabel>(props);
String testFile = crf.flags.testFile;
String textFi... | [
"The main method. See the class documentation."
] | [
"Obtains a Pax local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Pax local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Overrides the superclass implementation to allow the AttributeDefinition for each f... |
private void propagateFacetNames() {
// collect all names and configurations
Collection<String> facetNames = new ArrayList<String>();
Collection<I_CmsSearchConfigurationFacet> facetConfigs = new ArrayList<I_CmsSearchConfigurationFacet>();
facetNames.addAll(m_fieldFacets.keySet());
... | [
"Propagates the names of all facets to each single facet."
] | [
"Add a calendar day node.\n\n@param parentNode parent node\n@param calendar ProjectCalendar instance\n@param day calendar day",
"Send a device found announcement to all registered listeners.\n\n@param announcement the message announcing the new device",
"when divisionPrefixLen is null, isAutoSubnets has no effe... |
public static double J0(double x) {
double ax;
if ((ax = Math.abs(x)) < 8.0) {
double y = x * x;
double ans1 = 57568490574.0 + y * (-13362590354.0 + y * (651619640.7
+ y * (-11214424.18 + y * (77392.33017 + y * (-184.9052456)))));
double an... | [
"Bessel function of order 0.\n\n@param x Value.\n@return J0 value."
] | [
"Configure all UI elements in the \"ending\"-options panel.",
"Write the given long value as a 4 byte unsigned integer. Overflow is\nignored.\n\n@param buffer The buffer to write to\n@param index The position in the buffer at which to begin writing\n@param value The value to write",
"Saves messages to a xmlvf... |
private EventTypeEnum getEventType(Message message) {
boolean isRequestor = MessageUtils.isRequestor(message);
boolean isFault = MessageUtils.isFault(message);
boolean isOutbound = MessageUtils.isOutbound(message);
//Needed because if it is rest request and method does not exists had be... | [
"Gets the event type from message.\n\n@param message the message\n@return the event type"
] | [
"Deletes specified entity clearing all its properties and deleting all its outgoing links.\n\n@param entity to delete.",
"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.",
"Remove all references to a groupI... |
public boolean canBypassConvert(TypeDescriptor sourceType, TypeDescriptor targetType) {
Assert.notNull(targetType, "The targetType to convert to cannot be null");
if (sourceType == null) {
return true;
}
GenericConverter converter = getConverter(sourceType, targetType);
return (converter == NO_OP_CONVERTER... | [
"Returns true if conversion between the sourceType and targetType can be bypassed.\nMore precisely this method will return true if objects of sourceType can be\nconverted to the targetType by returning the source object unchanged.\n@param sourceType context about the source type to convert from (may be null if sour... | [
"Scales a process type\n\n@param appName See {@link #listApps} for a list of apps that can be used.\n@param processType type of process to maintain\n@param quantity number of processes to maintain",
"Load the available layers.\n\n@param image the installed image\n@param productConfig the product c... |
public static String join(Collection<String> s, String delimiter) {
return join(s, delimiter, false);
} | [
"Join the Collection of Strings using the specified delimiter.\n\n@param s\nThe String collection\n@param delimiter\nThe delimiter String\n@return The joined String"
] | [
"Read an optional month value form a JSON value.\n@param val the JSON value that should represent the month.\n@return the month from the JSON or null if reading the month fails.",
"Matches an array value if it contains all the elements of the argument array\n@param rhs The arguments\n@return PredicateExpression: ... |
private void populateBar(Row row, Task task)
{
Integer calendarID = row.getInteger("CALENDAU");
ProjectCalendar calendar = m_project.getCalendarByUniqueID(calendarID);
//PROJID
task.setUniqueID(row.getInteger("BARID"));
task.setStart(row.getDate("STARV"));
task.setFinish(row.getD... | [
"Uses data from a bar to populate a task.\n\n@param row bar data\n@param task task to populate"
] | [
"Use this API to fetch dbdbprofile resource of given name .",
"Derive a calendar for a resource.\n\n@param parentCalendarID calendar from which resource calendar is derived\n@return new calendar for a resource",
"Returns an iterator that will only offer leaf trace regions. If the nested regions have gaps, these... |
public JsonObject getJSONwithOperations(TreeContext context, ITree tree, List<Operation> operations) {
OperationNodePainter opNodePainter = new OperationNodePainter(operations);
Collection<NodePainter> painters = new ArrayList<NodePainter>();
painters.add(opNodePainter);
return getJSONwithCustorLabels(context,... | [
"Decorates a node with the affected operator, if any.\n\n@param context\n@param tree\n@param operations\n@return"
] | [
"Get an Iterator based on the ReportQuery\n\n@param query\n@return Iterator",
"Set the amount of padding between child objects.\n@param axis {@link Axis}\n@param padding",
"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@thro... |
public FastReportBuilder addGroups(int numgroups) {
groupCount = numgroups;
for (int i = 0; i < groupCount; i++) {
GroupBuilder gb = new GroupBuilder();
PropertyColumn col = (PropertyColumn) report.getColumns().get(i);
gb.setCriteriaColumn(col);
report.getColumnsGroups().add(gb.build());
}
return th... | [
"This method should be called after all column have been added to the report.\n@param numgroups\n@return"
] | [
"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",
"Retrieves a specific range of child items in this folder.\n\n@param offset the index of the first child item to retrieve.\n@param limit the maximum number of children ... |
protected static boolean setCustomForDefaultClient(String profileName, String pathName, Boolean isResponse, String customData) {
try {
Client client = new Client(profileName, false);
client.toggleProfile(true);
client.setCustom(isResponse, pathName, customData);
i... | [
"set custom response or request for a profile's default client, ensures profile and path are enabled\n\n@param profileName profileName to modift, default client is used\n@param pathName friendly name of path\n@param isResponse true if response, false for request\n@param customData custom response/request data\n@ret... | [
"Specifies convergence criteria\n\n@param maxIterations Maximum number of iterations\n@param ftol convergence based on change in function value. try 1e-12\n@param gtol convergence based on residual magnitude. Try 1e-12",
"Creates an operation to list the deployments.\n\n@return the operation",
"Calculates how m... |
public static VectorTile.Tile.GeomType toGeomType(Geometry geometry) {
VectorTile.Tile.GeomType result = VectorTile.Tile.GeomType.UNKNOWN;
if(geometry instanceof Point
|| geometry instanceof MultiPoint) {
result = VectorTile.Tile.GeomType.POINT;
} else if(geometry i... | [
"Get the MVT type mapping for the provided JTS Geometry.\n\n@param geometry JTS Geometry to get MVT type for\n@return MVT type for the given JTS Geometry, may return\n{@link com.wdtinc.mapbox_vector_tile.VectorTile.Tile.GeomType#UNKNOWN}"
] | [
"Sets the provided square matrix to be a random symmetric matrix whose values are selected from an uniform distribution\nfrom min to max, inclusive.\n\n@param A The matrix that is to be modified. Must be square. Modified.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have... |
public static String constructSerializerInfoXml(StoreDefinition storeDefinition) {
Element store = new Element(StoreDefinitionsMapper.STORE_ELMT);
store.addContent(new Element(StoreDefinitionsMapper.STORE_NAME_ELMT).setText(storeDefinition.getName()));
Element keySerializer = new Element(StoreDe... | [
"Given a storedefinition, constructs the xml string to be sent out in\nresponse to a \"schemata\" fetch request\n\n@param storeDefinition\n@return serialized store definition"
] | [
"Extract note text.\n\n@param row task data\n@return note text",
"Use this API to unset the properties of sslcertkey resources.\nProperties that need to be unset are specified in args array.",
"Get this property from the given object.\n@param object an array\n@return the length of the array object\n@throws Ille... |
public final void warn(Object pObject)
{
getLogger().log(FQCN, Level.WARN, pObject, null);
} | [
"generate a message for loglevel WARN\n\n@param pObject the message Object"
] | [
"Samples a batch of indices in the range [0, numExamples) without replacement.",
"Returns an iterable containing the items in this folder sorted by name and direction.\n@param sort the field to sort by, can be set as `name`, `id`, and `date`.\n@param direction the direction to display the item results.\n@param fi... |
private ServerDetails createInitialDeployDetailsFromOldDeployDetails(ServerDetails oldDeployerDetails) {
RepositoryConf oldDeployRepositoryConfig = oldDeployerDetails.getDeployReleaseRepository();
RepositoryConf oldSnapshotDeployRepositoryConfig = oldDeployerDetails.getDeploySnapshotRepository();
... | [
"Creates a new ServerDetails object for deployer, this will take URL and name from the oldDeployer ServerDetails"
] | [
"Returns the expression string required\n\n@param ds\n@return",
"Use this API to unset the properties of nslimitselector resources.\nProperties that need to be unset are specified in args array.",
"Decide which donor node to steal from. This is a policy implementation.\nI.e., in the future, additional policies ... |
private void parse(String header)
{
ArrayList<String> list = new ArrayList<String>(4);
StringBuilder sb = new StringBuilder();
int index = 1;
while (index < header.length())
{
char c = header.charAt(index++);
if (Character.isDigit(c))
{
sb.append(c... | [
"Parses values out of the header text.\n\n@param header header text"
] | [
"Term prefix.\n\n@param term\nthe term\n@return the string",
"Use this API to fetch cmppolicylabel_policybinding_binding resources of given name .",
"Set possible tile URLs.\n\n@param tileUrls tile URLs",
"Returns the negative of the input variable",
"Decomposes a submatrix. The results are written to the ... |
public IExternalAccess getAgentsExternalAccess(String agent_name) {
return cmsService.getExternalAccess(getAgentID(agent_name)).get(
new ThreadSuspendable());
} | [
"This method searches in the Component Management Service, so given an\nagent name returns its IExternalAccess\n\n@param agent_name\nThe name of the agent in the platform\n@return The IComponentIdentifier of the agent in the platform"
] | [
"Get a store definition from the given list of store definitions\n\n@param list A list of store definitions\n@param name The name of the store\n@return The store definition",
"Determine which math transform to use when creating the coordinate of the label.\n\n@param mapCrs the crs of the map, used if the {@link #... |
public static byte[] copy(byte[] array, int from, int to) {
if(to - from < 0) {
return new byte[0];
} else {
byte[] a = new byte[to - from];
System.arraycopy(array, from, a, 0, to - from);
return a;
}
} | [
"Copy the specified bytes into a new array\n\n@param array The array to copy from\n@param from The index in the array to begin copying from\n@param to The least index not copied\n@return A new byte[] containing the copied bytes"
] | [
"Extract resource data.",
"Read an individual Phoenix task relationship.\n\n@param relation Phoenix task relationship",
"Populate the properties indicating the source of this schedule.\n\n@param properties project properties",
"set the property destination type for given property\n\n@param propertyName\n@para... |
public AiTextureInfo getTextureInfo(AiTextureType type, int index) {
return new AiTextureInfo(type, index, getTextureFile(type, index),
getTextureUVIndex(type, index), getBlendFactor(type, index),
getTextureOp(type, index), getTextureMapModeW(type, index),
getT... | [
"Returns all information related to a single texture.\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture information"
] | [
"Updates the image information.",
"Set the model used by the right table.\n\n@param model table model",
"Checks whether the given field definition is used as the primary key of a class referenced by\na reference.\n\n@param modelDef The model\n@param fieldDef The current field descriptor def\n@return The referen... |
protected boolean waitForJobs() throws InterruptedException {
final Pair<Long, Job> peekPair;
try (Guard ignored = timeQueue.lock()) {
peekPair = timeQueue.peekPair();
}
if (peekPair == null) {
awake.acquire();
return true;
}
final long... | [
"returns true if a job was queued within a timeout"
] | [
"Converts this object to JSON.\n\n@return the JSON representation\n\n@throws JSONException if JSON operations fail",
"Transforms a config file with an XSLT transform.\n\n@param name file name of the config file\n@param transform file name of the XSLT file\n\n@throws Exception if something goes wrong",
"Add a cu... |
public static String getJavaClassFromSchemaInfo(String schemaInfo) {
final String ONLY_JAVA_CLIENTS_SUPPORTED = "Only Java clients are supported currently, so the format of the schema-info should be: <schema-info>java=foo.Bar</schema-info> where foo.Bar is the fully qualified name of the message.";
if(... | [
"Extracts the java class name from the schema info\n\n@param schemaInfo the schema info, a string like: java=java.lang.String\n@return the name of the class extracted from the schema info"
] | [
"This method reads an eight byte integer from the input array.\n\n@param data the input array\n@param offset offset of integer data in the array\n@return integer value",
"Move the SQL value to the next one for version processing.",
"Tokenizes the input file and extracts the required data.\n\n@param is input str... |
@Override
public boolean deleteObject(GcsFilename filename, long timeoutMillis) throws IOException {
HTTPRequest req = makeRequest(filename, null, DELETE, timeoutMillis);
HTTPResponse resp;
try {
resp = urlfetch.fetch(req);
} catch (IOException e) {
throw createIOException(new HTTPRequestI... | [
"True if deleted, false if not found."
] | [
"Set hint number for country",
"This method extracts project properties from a Phoenix file.\n\n@param phoenixSettings Phoenix settings\n@param storepoint Current storepoint",
"Attempts to revert the working copy. In case of failure it just logs the error.",
"Use this API to fetch all the vridparam resources ... |
protected void parseOperationsLR(Symbol ops[], TokenList tokens, Sequence sequence) {
if( tokens.size == 0 )
return;
TokenList.Token token = tokens.first;
if( token.getType() != Type.VARIABLE )
throw new ParseError("The first token in an equation needs to be a variable... | [
"Parses operations where the input comes from variables to its left and right\n\n@param ops List of operations which should be parsed\n@param tokens List of all the tokens\n@param sequence List of operation sequence"
] | [
"Create a mapping from entity names to entity ID values.",
"A factory method for users that need to report success without actually running any analysis. The returned\nresult will be successful, but will not contain the actual configurations of extensions.\n\n@return a \"fake\" successful analysis result",
"Fil... |
public static gslbvserver_spilloverpolicy_binding[] get(nitro_service service, String name) throws Exception{
gslbvserver_spilloverpolicy_binding obj = new gslbvserver_spilloverpolicy_binding();
obj.set_name(name);
gslbvserver_spilloverpolicy_binding response[] = (gslbvserver_spilloverpolicy_binding[]) obj.get_re... | [
"Use this API to fetch gslbvserver_spilloverpolicy_binding resources of given name ."
] | [
"Estimate excluded volume fraction by monte carlo method\n@return excluded volume fraction",
"Method to close the file caseManager. It is called just one time, by the\nMASReader, once every test and stroy have been added.\n\n@param caseManager",
"Returns formatted version of Iban.\n\n@return A string representi... |
static DocumentVersionInfo getRemoteVersionInfo(final BsonDocument remoteDocument) {
final BsonDocument version = getDocumentVersionDoc(remoteDocument);
return new DocumentVersionInfo(
version,
remoteDocument != null
? BsonUtils.getDocumentId(remoteDocument) : null
... | [
"Returns the current version info for a provided remote document.\n@param remoteDocument the remote BSON document from which to extract version info\n@return a DocumentVersionInfo"
] | [
"Returns the matrix's rank. Automatic selection of threshold\n\n@param A Matrix. Not modified.\n@return The rank of the decomposed matrix.",
"Adds a foreignkey to this table.\n\n@param relationName The name of the relation represented by the foreignkey\n@param remoteTable The referenced table\n@param localColu... |
public static CmsUUID readId(JSONObject obj, String key) {
String strValue = obj.optString(key);
if (!CmsUUID.isValidUUID(strValue)) {
return null;
}
return new CmsUUID(strValue);
} | [
"Reads a UUID from a JSON object.\n\nReturns null if the JSON value for the given key is not present or not a valid UUID\n\n@param obj the JSON object\n@param key the JSON key\n\n@return the UUID"
] | [
"Gets display duration for specified frame.\n\n@param n int index of frame.\n@return delay in milliseconds.",
"Print the class's attributes fd",
"OJB can handle only classes that declare at least one primary key attribute,\nthis method checks this condition.\n\n@param realObject The real object to check\n@throw... |
private void processClientId(HttpServletRequest httpServletRequest, History history) {
// get the client id from the request header if applicable.. otherwise set to default
// also set the client uuid in the history object
if (httpServletRequest.getHeader(Constants.PROFILE_CLIENT_HEADER_NAME) !=... | [
"Apply the matching client UUID for the request\n\n@param httpServletRequest\n@param history"
] | [
"Return the raw source line corresponding to the specified AST node\n\n@param node - the Groovy AST node",
"Entry point for recursive resolution of an expression and all of its\nnested expressions.\n\n@todo Ensure unresolvable expressions don't trigger infinite recursion.",
"read broker info for watching topics... |
protected boolean cannotInstantiate(Class<?> actionClass) {
return actionClass.isAnnotation() || actionClass.isInterface() || actionClass.isEnum()
|| (actionClass.getModifiers() & Modifier.ABSTRACT) != 0 || actionClass.isAnonymousClass();
} | [
"Interfaces, enums, annotations, and abstract classes cannot be\ninstantiated.\n\n@param actionClass\nclass to check\n@return returns true if the class cannot be instantiated or should be\nignored"
] | [
"Function to perform forward activation",
"Use this API to fetch all the vpnclientlessaccesspolicy resources that are configured on netscaler.",
"Adds Editor specific UI components to the toolbar.\n@param context The context that provides access to the toolbar.",
"Sets the node meta data.\n\n@param key - the ... |
public void setJobTypes(final Map<String, ? extends Class<?>> jobTypes) {
checkJobTypes(jobTypes);
this.jobTypes.clear();
this.jobTypes.putAll(jobTypes);
} | [
"Clear any current allowed job types and use the given set.\n@param jobTypes the job types to allow"
] | [
"Execute JavaScript in the browser.\n\n@param code The code to execute.\n@return The return value of the JavaScript.\n@throws CrawljaxException when javascript execution failed.",
"All the indexes defined in the database. Type widening means that the returned Index objects\nare limited to the name, design documen... |
public static boolean isConstructorCall(Expression expression, String classNamePattern) {
return expression instanceof ConstructorCallExpression && expression.getType().getName().matches(classNamePattern);
} | [
"Return true if the expression is a constructor call on a class that matches the supplied.\n@param expression - the expression\n@param classNamePattern - the possible List of class names\n@return as described"
] | [
"Shortcut for mapping an arbitrary observable to void, using the IO scheduler.\n@param fromObservable the source observable\n@return a void-emitting observable",
"Number of failed actions in scheduler",
"Set the inner angle of the spotlight cone in degrees.\n\nBeyond the outer cone angle there is no illuminatio... |
public VerticalLayout getEmptyLayout() {
m_emptyLayout = CmsVaadinUtils.getInfoLayout(CmsOuTreeType.USER.getEmptyMessageKey());
setVisible(size() > 0);
m_emptyLayout.setVisible(size() == 0);
return m_emptyLayout;
} | [
"Layout which gets displayed if table is empty.\n\n@see org.opencms.ui.apps.user.I_CmsFilterableTable#getEmptyLayout()"
] | [
"Use this API to save cacheobject resources.",
"Executes a query using the given parameters. The query results will be added to the\nExecutionResults using the given identifier.\n\n@param identifier\nThe identifier to be used for the results when added to the ExecutionResults\n@param name\nThe name of the query t... |
public void setLocale(Locale locale)
{
List<SimpleDateFormat> formats = new ArrayList<SimpleDateFormat>();
for (SimpleDateFormat format : m_formats)
{
formats.add(new SimpleDateFormat(format.toPattern(), locale));
}
m_formats = formats.toArray(new SimpleDateFormat[formats.size... | [
"This method is called when the locale of the parent file is updated.\nIt resets the locale specific date attributes to the default values\nfor the new locale.\n\n@param locale new locale"
] | [
"Returns the portion of the field name after the last dot, as field names\nmay actually be paths.",
"Calculate the Hamming distance between two hashes\n\n@param h1\n@param h2\n@return",
"Add a Renderer instance as prototype.\n\n@param renderer to use as prototype.\n@return the current RendererBuilder instance."... |
private void deleteLinks(@NotNull final PersistentStoreTransaction txn, @NotNull final PersistentEntity entity) {
final PersistentEntityId id = entity.getId();
final int entityTypeId = id.getTypeId();
final long entityLocalId = id.getLocalId();
final Transaction envTxn = txn.getEnvironme... | [
"Deletes all outgoing links of specified entity.\n\n@param entity the entity."
] | [
"Stops the current debug server. Active connections are\nnot affected.",
"Returns the compact records for all attachments on the task.\n\n@param task Globally unique identifier for the task.\n@return Request object",
"return a prepared Insert Statement fitting for the given ClassDescriptor",
"Converts a tab ... |
void update(JsonObject jsonObject) {
for (JsonObject.Member member : jsonObject) {
if (member.getValue().isNull()) {
continue;
}
this.parseJSONMember(member);
}
this.clearPendingChanges();
} | [
"Updates this BoxJSONObject using the information in a JSON object.\n@param jsonObject the JSON object containing updated information."
] | [
"Add a channel to the animation to animate the named bone.\n@param boneName name of bone to animate.\n@param channel The animation channel.",
"Handles Multi Instance Encapsulation message. Decapsulates\nan Application Command message and handles it using the right\ninstance.\n@param serialMessage the serial me... |
public void updateConfig(String appName, Map<String, String> config) {
connection.execute(new ConfigUpdate(appName, config), apiKey);
} | [
"Update environment variables to an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param config Key/Value pairs of environment variables."
] | [
"Returns a description a block of work, or \"exit\" if no more blocks exist\n\n@param name the assigned name of the consumer requesting a block of work\n@return a description a block of work, or \"exit\" if no more blocks exist",
"Called by spring when application context is being destroyed.",
"Returns the JMX ... |
public void forAllClassDefinitions(String template, Properties attributes) throws XDocletException
{
for (Iterator it = _model.getClasses(); it.hasNext(); )
{
_curClassDef = (ClassDescriptorDef)it.next();
generate(template);
}
_curClassDef = null;
... | [
"Processes the template for all class definitions.\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\""
] | [
"Arrange to become the tempo master. Starts a sequence of interactions with the other players that should end\nup with us in charge of the group tempo and beat alignment.\n\n@throws IllegalStateException if we are not sending status updates\n@throws IOException if there is a problem sending the master yield request... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.