query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
private static void checkPreconditions(final Set<Object> possibleValues) {
if( possibleValues == null ) {
throw new NullPointerException("possibleValues Set should not be null");
} else if( possibleValues.isEmpty() ) {
throw new IllegalArgumentException("possibleValues Set should not be empty");
}
} | [
"Checks the preconditions for creating a new IsIncludedIn processor with a Set of Objects.\n\n@param possibleValues\nthe Set of possible values\n@throws NullPointerException\nif possibleValues is null\n@throws IllegalArgumentException\nif possibleValues is empty"
] | [
"Do synchronization of the given J2EE ODMG Transaction",
"Perform all Cursor cleanup here.",
"Use this API to fetch cachepolicylabel_binding resource of given name .",
"This method writes project properties to a Planner file.",
"create a new instance of class clazz.\nfirst use the public default constructor.\nIf this fails also try to use protected an private constructors.\n@param clazz the class to instantiate\n@return the fresh instance of class clazz\n@throws InstantiationException",
"Given a HTTPResponce, process it, throwing an error if needed and return a Token for the next\nrequest.",
"Close the Closeable. Logging a warning if any problems occur.\n\n@param c the thing to close",
"Use this API to fetch dnssuffix resources of given names .",
"EAP 7.0"
] |
private void createNodeMappings(MtasTokenIdFactory mtasTokenIdFactory,
Level level, Level parentLevel) {
MtasToken nodeToken;
if (level.node != null && level.positionStart != null
&& level.positionEnd != null) {
nodeToken = new MtasTokenString(mtasTokenIdFactory.createTokenId(),
level.node, "");
nodeToken.setOffset(level.offsetStart, level.offsetEnd);
nodeToken.setRealOffset(level.realOffsetStart, level.realOffsetEnd);
nodeToken.addPositionRange(level.positionStart, level.positionEnd);
tokenCollection.add(nodeToken);
if (parentLevel != null) {
parentLevel.tokens.add(nodeToken);
}
// only for first mapping(?)
for (MtasToken token : level.tokens) {
token.setParentId(nodeToken.getId());
}
}
} | [
"Creates the node mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param parentLevel\nthe parent level"
] | [
"Enter information into the hidden input field.\n\n@param input The input to enter into the hidden field.",
"Convert an MPXJ Duration instance into an integer duration in minutes\nready to be written to an MPX file.\n\n@param properties project properties, used for duration units conversion\n@param duration Duration instance\n@return integer duration in minutes",
"Adds the file to the tar archive represented by output stream. It's caller's responsibility to close output stream\nproperly.\n\n@param out target archive.\n@param source file to be added.\n@param fileSize size of the file (which is known in most cases).\n@throws IOException in case of any issues with underlying store.",
"Parses the given XML doc to extract the properties and return them into a java.util.Properties.\n@param doc to parse\n@param sectionName which section to extract\n@return Properties map",
"Checks if there is an annotation of the given type on this method or on type level for all interfaces and superclasses\n\n@param method the method to scan\n@param annotation the annotation to search for\n@return <i>true</i> if the given annotation is present on method or type level annotations in the type hierarchy",
"Performs a Versioned put operation with the specified composite request\nobject\n\n@param requestWrapper Composite request object containing the key and the\nversioned object\n@return Version of the value for the successful put\n@throws ObsoleteVersionException",
"Write entries into the storage.\nOverriding methods should first delegate to super before adding their own entries.",
"Write throwable as attachment.\n\n@param throwable to write\n@param title title of attachment\n@return Created {@link ru.yandex.qatools.allure.model.Attachment}",
"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"
] |
public static base_response disable(nitro_service client, String id) throws Exception {
Interface disableresource = new Interface();
disableresource.id = id;
return disableresource.perform_operation(client,"disable");
} | [
"Use this API to disable Interface of given name."
] | [
"Performs case-sensitive depth-first search for a child object and then\nremoves it if found.\n\n@param name name of scene object to be removed.\n\n@return true if child was found (and removed), else false",
"Get the active overrides with parameters and the active server group for a client\n\n@param profileID Id of profile to get configuration for\n@param clientUUID Client Id to export configuration\n@return SingleProfileBackup containing active overrides and active server group\n@throws Exception exception",
"Add a '<' clause so the column must be less-than the value.",
"return a generic Statement for the given ClassDescriptor",
"The Baseline Duration field shows the original span of time planned\nto complete a task.\n\n@return - duration string",
"Makes sure that the operation name and the address have been set and returns a ModelNode\nrepresenting the operation request.",
"This method handles submitting and then waiting for the request from the\nserver. It uses the ClientRequest API to actually write the request and\nthen read back the response. This implementation will not block for a\nresponse from the server.\n\n@param <T> Return type\n\n@param clientRequest ClientRequest implementation used to write the\nrequest and read the response\n@param operationName Simple string representing the type of request\n\n@return Data returned by the individual requests",
"Used by Pipeline jobs only",
"This method decodes a byte array with the given encryption code\nusing XOR encryption.\n\n@param data Source data\n@param encryptionCode Encryption code"
] |
public static BoxDeveloperEditionAPIConnection getAppUserConnection(String userId, String clientId,
String clientSecret, JWTEncryptionPreferences encryptionPref, IAccessTokenCache accessTokenCache) {
BoxDeveloperEditionAPIConnection connection = new BoxDeveloperEditionAPIConnection(userId,
DeveloperEditionEntityType.USER, clientId, clientSecret, encryptionPref, accessTokenCache);
connection.tryRestoreUsingAccessTokenCache();
return connection;
} | [
"Creates a new Box Developer Edition connection with App User token.\n@param userId the user ID to use for an App User.\n@param clientId the client ID to use when exchanging the JWT assertion for an access token.\n@param clientSecret the client secret to use when exchanging the JWT assertion for an access token.\n@param encryptionPref the encryption preferences for signing the JWT.\n@param accessTokenCache the cache for storing access token information (to minimize fetching new tokens)\n@return a new instance of BoxAPIConnection."
] | [
"Add an appliable \"post-run\" dependent for this task item.\n\n@param appliable the appliable \"post-run\" dependent.\n@return the key to be used as parameter to taskResult(string) method to retrieve updated \"post-run\" dependent",
"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.",
"Give an embedded association, creates all the nodes and relationships required to represent it.\nIt assumes that the entity node containing the association already exists in the db.\n\n@param executionEngine the {@link GraphDatabaseService} to run the query\n@param associationKey the {@link AssociationKey} identifying the association\n@param embeddedKey the {@link EntityKey} identifying the embedded component\n@return the created {@link Relationship} that represents the association",
"Sets the replace var map to single target.\n\n@param replacementVarMapList\nthe replacement var map list\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder",
"Reset the crawler to its initial state.",
"Constraint that ensures that the field has a column property. If none is specified, then\nthe name of the field is used.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)",
"Remove a license from an artifact\n\n@param gavc String The artifact GAVC\n@param licenseId String The license id to be removed.",
"Attempts to insert a colon so that a value without a colon can\nbe parsed.",
"Sets the location value as string.\n\n@param value the string representation of the location value (JSON)"
] |
public static responderhtmlpage get(nitro_service service) throws Exception{
responderhtmlpage obj = new responderhtmlpage();
responderhtmlpage[] response = (responderhtmlpage[])obj.get_resources(service);
return response[0];
} | [
"Use this API to fetch all the responderhtmlpage resources that are configured on netscaler."
] | [
"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.",
"Creates a Set out of the given keys\n\n@param <K> the key type\n@param keys\nthe keys\n@return a Set containing the given keys",
"Returns the accrued interest of the bond for a given time.\n\n@param time The time of interest as double.\n@param model The model under which the product is valued.\n@return The accrued interest.",
"Embeds the given SVG element into a new SVG element scaling the graphic to the given dimension and\napplying the given rotation.",
"Transforms user name and icon size into the image path.\n\n@param name the user name\n@param size IconSize to get icon for\n\n@return the path",
"Construct new root step. Used for inspect problems with Allure lifecycle\n\n@return new root step marked as broken",
"Returns the root path for this source file, based upon the package name.\n\nFor example, if path is \"/project/src/main/java/org/example/Foo.java\" and the package is \"org.example\", then this\nshould return \"/project/src/main/java\".\n\nReturns null if the folder structure does not match the package name.",
"Takes a String and converts it to a Date\n\n@param dateString the date\n@return Date denoted by dateString",
"Add image with a exception message in the PDF document.\n\n@param context\nPDF context\n@param e\nexception to put in image"
] |
protected byte[] readByteArray(InputStream is, int size) throws IOException
{
byte[] buffer = new byte[size];
if (is.read(buffer) != buffer.length)
{
throw new EOFException();
}
return (buffer);
} | [
"This method reads a byte array from the input stream.\n\n@param is the input stream\n@param size number of bytes to read\n@return byte array\n@throws IOException on file read error or EOF"
] | [
"Use this API to unset the properties of clusterinstance resource.\nProperties that need to be unset are specified in args array.",
"Set the TableAlias for ClassDescriptor",
"Adds a new point.\n\n@param point a point\n@return this for chaining",
"waits for all async mutations that were added before this was called to be flushed. Does not\nwait for async mutations added after call.",
"Returns all program element docs that have a visibility greater or\nequal than the specified level",
"Tells you if the expression is the false expression, either literal or constant.\n@param expression\nexpression\n@return\nas described",
"Changes the index buffer associated with this mesh.\n@param ibuf new index buffer to use\n@see #setIndices(int[])\n@see #getIndexBuffer()\n@see #getIntIndices()",
"Executes a API query action to get a new token.\nThe method only executes the action, without doing any\nchecks first. If errors occur, they are logged and null is returned.\n\n@param tokenType The kind of token to retrieve like \"csrf\" or \"login\"\n@return newly retrieved token or null if no token was retrieved",
"Parses an RgbaColor from a hexadecimal, rgb, rgba, hsl, or hsla\nvalue.\n\n@return returns the parsed color"
] |
public static String resolveOrOriginal(String input) {
try {
return resolve(input, true);
} catch (UnresolvedExpressionException e) {
return input;
}
} | [
"Attempts to substitute all the found expressions in the input\nwith their corresponding resolved values.\nIf any of the found expressions failed to resolve or\nif the input does not contain any expression, the input is returned as is.\n\n@param input the input string\n@return the input with resolved expressions or the original input in case\nthe input didn't contain any expressions or at least one of the\nexpressions could not be resolved"
] | [
"Bhattacharyya distance between two normalized histograms.\n\n@param histogram1 Normalized histogram.\n@param histogram2 Normalized histogram.\n@return The Bhattacharyya distance between the two histograms.",
"Use this API to delete cacheselector resources of given names.",
"Obtain collection of profiles\n\n@param model\n@return\n@throws Exception",
"Clears all properties of specified entity.\n\n@param entity to clear.",
"Creates a date from the equivalent long value. This conversion\ntakes account of the time zone.\n\n@param date date expressed as a long integer\n@return new Date instance",
"Write correlation id to message.\n\n@param message the message\n@param correlationId the correlation id",
"Store a comment based on comment text, gavc and user information\n\n@param gavc - entity id\n@param commentText - comment text\n@param credential - user credentials\n@param entityType - type of the entity",
"Checks if the InputStream have the text\n\n@param in InputStream to read\n@param text Text to check\n@return whether the inputstream has the text",
"Calculates the legend bounds for a custom list of legends."
] |
private void store(final PrintJobStatus printJobStatus) throws JSONException {
JSONObject metadata = new JSONObject();
metadata.put(JSON_REQUEST_DATA, printJobStatus.getEntry().getRequestData().getInternalObj());
metadata.put(JSON_STATUS, printJobStatus.getStatus().toString());
metadata.put(JSON_START_DATE, printJobStatus.getStartTime());
metadata.put(JSON_REQUEST_COUNT, printJobStatus.getRequestCount());
if (printJobStatus.getCompletionDate() != null) {
metadata.put(JSON_COMPLETION_DATE, printJobStatus.getCompletionTime());
}
metadata.put(JSON_ACCESS_ASSERTION, this.assertionPersister.marshal(printJobStatus.getAccess()));
if (printJobStatus.getError() != null) {
metadata.put(JSON_ERROR, printJobStatus.getError());
}
if (printJobStatus.getResult() != null) {
metadata.put(JSON_REPORT_URI, printJobStatus.getResult().getReportURIString());
metadata.put(JSON_FILENAME, printJobStatus.getResult().getFileName());
metadata.put(JSON_FILE_EXT, printJobStatus.getResult().getFileExtension());
metadata.put(JSON_MIME_TYPE, printJobStatus.getResult().getMimeType());
}
this.registry.put(RESULT_METADATA + printJobStatus.getReferenceId(), metadata);
} | [
"Store the data of a print job in the registry.\n\n@param printJobStatus the print job status"
] | [
"Upload a photo from an InputStream.\n\n@param in\n@param metaData\n@return photoId or ticketId\n@throws FlickrException",
"Updates the indices in the index buffer from a Java char array.\nAll of the entries of the input char array are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if char array is wrong size",
"Remove a column from the Document\n\n@param entity the {@link Document} with the column\n@param column the column to remove",
"Used to create a new retention policy with optional parameters.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param type the type of the retention policy. Can be \"finite\" or \"indefinite\".\n@param length the duration in days that the retention policy will be active for after being assigned to content.\n@param action the disposition action can be \"permanently_delete\" or \"remove_retention\".\n@param optionalParams the optional parameters.\n@return the created retention policy's info.",
"Sets the replace var map to single target single var.\n\n@param variable\nthe variable\n@param replaceList\n: the list of strings that will replace the variable\n@param uniformTargetHost\nthe uniform target host\n@return the parallel task builder",
"For use on a slave HC to get all the server groups used by the host\n\n@param hostResource the host resource\n@return the server configs on this host",
"Expects a height mat as input\n\n@param input - A grayscale height map\n@return edges",
"Given a protobuf rebalance-partition info, converts it into our\nrebalance-partition info\n\n@param rebalanceTaskInfoMap Proto-buff version of\nRebalanceTaskInfoMap\n@return RebalanceTaskInfo object.",
"Creates a Bytes object by copying the data of the given ByteBuffer.\n\n@param bb Data will be read from this ByteBuffer in such a way that its position is not\nchanged."
] |
public Shard getShard(String docId) {
assertNotEmpty(docId, "docId");
return client.couchDbClient.get(new DatabaseURIHelper(db.getDBUri()).path("_shards")
.path(docId).build(),
Shard.class);
} | [
"Get info about the shard a document belongs to.\n\n@param docId document ID\n@return Shard info\n@see <a\nhref=\"https://console.bluemix.net/docs/services/Cloudant/api/advanced.html#-get-database-_shards-\"\ntarget=\"_blank\">_shards</a>"
] | [
"Given a BSON document, remove any forbidden fields and return the document. If no changes are\nmade, the original document reference is returned. If changes are made, a cloned copy of the\ndocument with the changes will be returned.\n\n@param document the document from which to remove forbidden fields\n\n@return a BsonDocument without any forbidden fields.",
"Read a Synchro date from an input stream.\n\n@param is input stream\n@return Date instance",
"Use this API to fetch responderhtmlpage resource of given name .",
"Makes a CRFDatum by producing features and a label from input data at a\nspecific position, using the provided factory.\n\n@param info\nThe input data\n@param loc\nThe position to build a datum at\n@param featureFactory\nThe FeatureFactory to use to extract features\n@return The constructed CRFDatum",
"Retrieve a calendar exception which applies to this date.\n\n@param date target date\n@return calendar exception, or null if none match this date",
"Cancel request and worker on host.\n\n@param targetHosts\nthe target hosts",
"Provide Jersey client for the targeted Grapes server\n\n@return webResource",
"Load a cubemap texture asynchronously.\n\nThis is the implementation of\n{@link GVRAssetLoader#loadCubemapTexture(GVRAndroidResource.TextureCallback, GVRAndroidResource, int)}\n- it will usually be more convenient (and more efficient) to call that\ndirectly.\n\n@param context\nThe GVRF context\n@param textureCache\nTexture cache - may be {@code null}\n@param callback\nAsynchronous notifications\n@param resource\nBasically, a stream containing a compressed texture. Taking a\n{@link GVRAndroidResource} parameter eliminates six overloads.\n@param priority\nThis request's priority. Please see the notes on asynchronous\npriorities in the <a href=\"package-summary.html#async\">package\ndescription</a>.\n@return A {@link Future} that you can pass to methods like\n{@link GVRShaderData#setMainTexture(Future)}",
"Sets a property on this Javascript object for which the value is a\nJavascript object itself.\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property."
] |
private static void checkPreconditions(final int maxSize, final String suffix) {
if( maxSize <= 0 ) {
throw new IllegalArgumentException(String.format("maxSize should be > 0 but was %d", maxSize));
}
if( suffix == null ) {
throw new NullPointerException("suffix should not be null");
}
} | [
"Checks the preconditions for creating a new Truncate processor.\n\n@param maxSize\nthe maximum size of the String\n@param suffix\nthe String to append if the input is truncated (e.g. \"...\")\n@throws IllegalArgumentException\nif {@code maxSize <= 0}\n@throws NullPointerException\nif suffix is null"
] | [
"If needed, destroy the remaining conversation contexts after an HTTP session was invalidated within the current request.\n\n@param request",
"Find a given range object in a list of ranges by a value in that range. Does a binary\nsearch over the ranges but instead of checking for equality looks within the range.\nTakes the array size as an option in case the array grows while searching happens\n@param <T> Range type\n@param ranges data list\n@param value value in the list\n@param arraySize the max search index of the list\n@return search result of range\nTODO: This should move into SegmentList.scala",
"Retrieve the frequency of an exception.\n\n@param exception XML calendar exception\n@return frequency",
"Return list of all files in the directory.\n\n@param directory target directory on file system\n@return list of files in the directory or empty list if directory is empty.",
"Adds a command class to the list of supported command classes by this node.\nDoes nothing if command class is already added.\n@param commandClass the command class instance to add.",
"This method is used to configure the format pattern.\n\n@param patterns new format patterns",
"Based on the current request represented by the HttpExchange construct a complete URL for the supplied path.\n\n@param exchange - The current HttpExchange\n@param path - The path to include in the constructed URL\n@return The constructed URL",
"Returns the raw class of the given type.",
"Ranks a map based on integer values\n@param inputMap Input\n@return The ranked map"
] |
private void writeWorkWeeks(Project.Calendars.Calendar xmlCalendar, ProjectCalendar mpxjCalendar)
{
List<ProjectCalendarWeek> weeks = mpxjCalendar.getWorkWeeks();
if (!weeks.isEmpty())
{
WorkWeeks xmlWorkWeeks = m_factory.createProjectCalendarsCalendarWorkWeeks();
xmlCalendar.setWorkWeeks(xmlWorkWeeks);
List<WorkWeek> xmlWorkWeekList = xmlWorkWeeks.getWorkWeek();
for (ProjectCalendarWeek week : weeks)
{
WorkWeek xmlWeek = m_factory.createProjectCalendarsCalendarWorkWeeksWorkWeek();
xmlWorkWeekList.add(xmlWeek);
xmlWeek.setName(week.getName());
TimePeriod xmlTimePeriod = m_factory.createProjectCalendarsCalendarWorkWeeksWorkWeekTimePeriod();
xmlWeek.setTimePeriod(xmlTimePeriod);
xmlTimePeriod.setFromDate(week.getDateRange().getStart());
xmlTimePeriod.setToDate(week.getDateRange().getEnd());
WeekDays xmlWeekDays = m_factory.createProjectCalendarsCalendarWorkWeeksWorkWeekWeekDays();
xmlWeek.setWeekDays(xmlWeekDays);
List<Project.Calendars.Calendar.WorkWeeks.WorkWeek.WeekDays.WeekDay> dayList = xmlWeekDays.getWeekDay();
for (int loop = 1; loop < 8; loop++)
{
DayType workingFlag = week.getWorkingDay(Day.getInstance(loop));
if (workingFlag != DayType.DEFAULT)
{
Project.Calendars.Calendar.WorkWeeks.WorkWeek.WeekDays.WeekDay day = m_factory.createProjectCalendarsCalendarWorkWeeksWorkWeekWeekDaysWeekDay();
dayList.add(day);
day.setDayType(BigInteger.valueOf(loop));
day.setDayWorking(Boolean.valueOf(workingFlag == DayType.WORKING));
if (workingFlag == DayType.WORKING)
{
Project.Calendars.Calendar.WorkWeeks.WorkWeek.WeekDays.WeekDay.WorkingTimes times = m_factory.createProjectCalendarsCalendarWorkWeeksWorkWeekWeekDaysWeekDayWorkingTimes();
day.setWorkingTimes(times);
List<Project.Calendars.Calendar.WorkWeeks.WorkWeek.WeekDays.WeekDay.WorkingTimes.WorkingTime> timesList = times.getWorkingTime();
ProjectCalendarHours bch = week.getCalendarHours(Day.getInstance(loop));
if (bch != null)
{
for (DateRange range : bch)
{
if (range != null)
{
Project.Calendars.Calendar.WorkWeeks.WorkWeek.WeekDays.WeekDay.WorkingTimes.WorkingTime time = m_factory.createProjectCalendarsCalendarWorkWeeksWorkWeekWeekDaysWeekDayWorkingTimesWorkingTime();
timesList.add(time);
time.setFromTime(range.getStart());
time.setToTime(range.getEnd());
}
}
}
}
}
}
}
}
} | [
"Write the work weeks associated with this calendar.\n\n@param xmlCalendar XML calendar instance\n@param mpxjCalendar MPXJ calendar instance"
] | [
"Groups all of the metadata cache files that are candidates for auto-attachment to player slots into lists\nthat are keyed by the playlist ID used to create the cache file. Files that cache all tracks have a playlist\nID of 0.\n\n@return a map from playlist ID to the caches holding tracks from that playlist",
"Write flow id.\n\n@param message the message\n@param flowId the flow id",
"Record the connection establishment time\n\n@param dest Destination of the socket to connect to. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param connEstTimeUs The number of us to wait before establishing a\nconnection",
"Adds a new role to the list of defined roles.\n\n@param roleName - The name of the role being added.",
"returns a sorted array of methods",
"We have reason to believe we might have enough information to calculate a signature for the track loaded on a\nplayer. Verify that, and if so, perform the computation and record and report the new signature.",
"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 data points, the data from this lattice will be overwritten.\n\n@param other The lattice containing the data to be appended.\n@param model The model to use for context, in case the other lattice follows a different convention.\n\n@return The lattice with the combined swaption entries.",
"Updates the information about this weblink with any info fields that have been modified locally.\n\n<p>The only fields that will be updated are the ones that have been modified locally. For example, the following\ncode won't update any information (or even send a network request) since none of the info's fields were\nchanged:</p>\n\n<pre>BoxWebLink webLink = new BoxWebLink(api, id);\nBoxWebLink.Info info = webLink.getInfo();\nwebLink.updateInfo(info);</pre>\n\n@param info the updated info.",
"Main database initialization. To be called only when _ds is a valid DataSource."
] |
@SuppressWarnings("WeakerAccess")
public int findBeatAtTime(long milliseconds) {
int found = Arrays.binarySearch(timeWithinTrackValues, milliseconds);
if (found >= 0) { // An exact match, just change 0-based array index to 1-based beat number
return found + 1;
} else if (found == -1) { // We are before the first beat
return found;
} else { // We are after some beat, report its beat number
return -(found + 1);
}
} | [
"Finds the beat in which the specified track position falls.\n\n@param milliseconds how long the track has been playing\n\n@return the beat number represented by that time, or -1 if the time is before the first beat"
] | [
"Get the names of all current registered providers.\n\n@return the names of all current registered providers, never null.",
"Notify all shutdown listeners that the shutdown completed.",
"Creates a new RgbaColor from the specified HSL components.\n\n<p>\n<i>Implementation based on <a\nhref=\"http://en.wikipedia.org/wiki/HSL_and_HSV\">wikipedia</a>\nand <a\nhref=\"http://www.w3.org/TR/css3-color/#hsl-color\">w3c</a></i>\n\n@param H\nHue [0,360)\n@param S\nSaturation [0,100]\n@param L\nLightness [0,100]",
"Get the active overrides with parameters and the active server group for a client\n\n@param profileID Id of profile to get configuration for\n@param clientUUID Client Id to export configuration\n@return SingleProfileBackup containing active overrides and active server group\n@throws Exception exception",
"Use this API to unset the properties of systemuser resource.\nProperties that need to be unset are specified in args array.",
"Removes an existing metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return this metadata object.",
"Replaces the model used to depict the controller in the scene.\n\n@param controllerModel root of hierarchy to use for controller model\n@see #getControllerModel()\n@see #showControllerModel(boolean)",
"Main method of this class related to RecyclerView widget. This method is the responsible of\ncreate a new Renderer instance with all the needed information to implement the rendering.\nThis method will validate all the attributes passed in the builder constructor and will create\na RendererViewHolder instance.\n\nThis method is used with RecyclerView because the view recycling mechanism is implemented out\nof this class and we only have to return new RendererViewHolder instances.\n\n@return ready to use RendererViewHolder instance.",
"Get a list of path transformers for a given address.\n\n@param address the path address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return a list of path transformations"
] |
@Override
public Token recoverInline(Parser recognizer) throws RecognitionException
{
// SINGLE TOKEN DELETION
Token matchedSymbol = singleTokenDeletion(recognizer);
if (matchedSymbol != null)
{
// we have deleted the extra token.
// now, move past ttype token as if all were ok
recognizer.consume();
return matchedSymbol;
}
// SINGLE TOKEN INSERTION
if (singleTokenInsertion(recognizer))
{
return getMissingSymbol(recognizer);
}
// BeetlException exception = new BeetlParserException(BeetlException.PARSER_MISS_ERROR);
// exception.pushToken(this.getGrammarToken(recognizer.getCurrentToken()));
// throw exception;
throw new InputMismatchException(recognizer);
} | [
"Make sure we don't attempt to recover inline; if the parser\nsuccessfully recovers, it won't throw an exception."
] | [
"Acquire transaction with a single permit in a thread. Transactions are acquired reentrantly, i.e.\nwith respect to transactions already acquired in the thread.\n\n@return the number of acquired permits, identically equal to 1.",
"Disable all overrides for a specified path\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client",
"Open the event stream\n\n@return true if successfully opened, false if not",
"Remove a custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object",
"Set the html as value inside the tooltip.",
"Resolves the path relative to the parent and normalizes it.\n\n@param parent the parent path\n@param path the path\n\n@return the normalized path",
"Adds a logical operator block.\n\n@param list parent criteria list\n@param block current block\n@param operator logical operator represented by this block",
"Extract data for a single task.\n\n@param parent task parent\n@param row Synchro task data",
"Add an additional SSExtension\n@param ssExt the ssextension to set"
] |
public static CmsShell getTopShell() {
ArrayList<CmsShell> shells = SHELL_STACK.get();
if (shells.isEmpty()) {
return null;
}
return shells.get(shells.size() - 1);
} | [
"Gets the top of thread-local shell stack, or null if it is empty.\n\n@return the top of the shell stack"
] | [
"List the greetings in the specified guestbook.",
"Tests whether the given string is the name of a java.lang type.",
"Update list of sorted services by copying it from the array and making it unmodifiable.",
"The timeout which we block for when a resource is not available\n\n@param timeout The timeout\n@param unit The units of the timeout",
"Execute a slave process. Pump events to the given event bus.",
"Method to build Mail Channel Adapter for IMAP.\n@param urlName Mail source URL.\n@return Mail Channel for IMAP",
"Add a plugin path\n\n@param model\n@param add\n@return\n@throws Exception",
"Adds all rows from the TSV file specified, using the provided delimiter and null value.\n\n@param file The file to read the data from.\n@param delimiter A column delimiter.\n@param nullValue Value to be treated as null in the source data.\n@return {@code this}",
"Checks if the name of the file follows the version-n format\n\n@param versionDir The directory\n@return Returns true if the name is correct, else false"
] |
public void removeExtension(Resource rootResource, String moduleName, ManagementResourceRegistration rootRegistration) throws IllegalStateException {
final ManagementResourceRegistration profileReg;
if (rootRegistration.getPathAddress().size() == 0) {
//domain or server extension
// Can't use processType.isServer() to determine where to look for profile reg because a lot of test infrastructure
// doesn't add the profile mrr even in HC-based tests
ManagementResourceRegistration reg = rootRegistration.getSubModel(PathAddress.pathAddress(PathElement.pathElement(PROFILE)));
if (reg == null) {
reg = rootRegistration;
}
profileReg = reg;
} else {
//host model extension
profileReg = rootRegistration;
}
ManagementResourceRegistration deploymentsReg = processType.isServer() ? rootRegistration.getSubModel(PathAddress.pathAddress(PathElement.pathElement(DEPLOYMENT))) : null;
ExtensionInfo extension = extensions.remove(moduleName);
if (extension != null) {
//noinspection SynchronizationOnLocalVariableOrMethodParameter
synchronized (extension) {
Set<String> subsystemNames = extension.subsystems.keySet();
final boolean dcExtension = processType.isHostController() ?
rootRegistration.getPathAddress().size() == 0 : false;
for (String subsystem : subsystemNames) {
if (hasSubsystemsRegistered(rootResource, subsystem, dcExtension)) {
// Restore the data
extensions.put(moduleName, extension);
throw ControllerLogger.ROOT_LOGGER.removingExtensionWithRegisteredSubsystem(moduleName, subsystem);
}
}
for (Map.Entry<String, SubsystemInformation> entry : extension.subsystems.entrySet()) {
String subsystem = entry.getKey();
profileReg.unregisterSubModel(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, subsystem));
if (deploymentsReg != null) {
deploymentsReg.unregisterSubModel(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, subsystem));
deploymentsReg.unregisterSubModel(PathElement.pathElement(ModelDescriptionConstants.SUBDEPLOYMENT, subsystem));
}
if (extension.xmlMapper != null) {
SubsystemInformationImpl subsystemInformation = SubsystemInformationImpl.class.cast(entry.getValue());
for (String namespace : subsystemInformation.getXMLNamespaces()) {
extension.xmlMapper.unregisterRootElement(new QName(namespace, SUBSYSTEM));
}
}
}
}
}
} | [
"Cleans up a extension module's subsystems from the resource registration model.\n\n@param rootResource the model root resource\n@param moduleName the name of the extension's module. Cannot be {@code null}\n@throws IllegalStateException if the extension still has subsystems present in {@code rootResource} or its children"
] | [
"Find and return the appropriate getter method for field.\n\n@return Get method or null (or throws IllegalArgumentException) if none found.",
"Delivers the correct JSON Object for properties\n\n@param properties\n@throws org.json.JSONException",
"Use this API to update gslbservice resources.",
"Initialize the pattern choice button group.",
"Remove a handler from the list\n@param toRemove The handler to remove. Any handler object that\nmatches this class will be removed.\n@return true if this handler was in the list.",
"Finds the parent group of the given one and returns it\n\n@param group Group for which the parent is needed\n@return The parent group of the given one. If the given one is the first one, it returns the same group",
"Reads numBytes bytes, and returns the corresponding string",
"Use this API to add gslbsite.",
"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."
] |
public JsonNode wbSetLabel(String id, String site, String title,
String newEntity, String language, String value,
boolean bot, long baserevid, String summary)
throws IOException, MediaWikiApiErrorException {
Validate.notNull(language,
"Language parameter cannot be null when setting a label");
Map<String, String> parameters = new HashMap<String, String>();
parameters.put("language", language);
if (value != null) {
parameters.put("value", value);
}
JsonNode response = performAPIAction("wbsetlabel", id, site, title, newEntity,
parameters, summary, baserevid, bot);
return response;
} | [
"Executes the API action \"wbsetlabel\" for the given parameters.\n@param id\nthe id of the entity to be edited; if used, the site and title\nparameters must be null\n@param site\nwhen selecting an entity by title, the site key for the title,\ne.g., \"enwiki\"; if used, title must also be given but id must\nbe null\n@param title\nstring used to select an entity by title; if used, site must\nalso be given but id must be null\n@param newEntity\nused for creating a new entity of a given type; the value\nindicates the intended entity type; possible values include\n\"item\" and \"property\"; if used, the parameters id, site, and\ntitle must be null\n@param language\nthe language code for the label\n@param value\nthe value of the label to set. Set it to null to remove the label.\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the label as returned by the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException"
] | [
"Unilaterally merge an update description into this update description.\n@param otherDescription the update description to merge into this\n@return this merged update description",
"Function to perform backward activation",
"Starts this EventStream and begins long polling the API.\n@throws IllegalStateException if the EventStream is already started.",
"Makes a DocumentReaderAndWriter based on the flags the CRFClassifier\nwas constructed with. Will create the flags.readerAndWriter and\ninitialize it with the CRFClassifier's flags.",
"Append a Handler to a portion of the handler tree\n@param parent The parent to add the child to\n@param child The Handler to add.",
"Another method to force an input string into a fixed width field\nand set it on the right with the left side filled with space ' ' characters.\n\n@param input input string\n@param width required width\n@return formatted string",
"Decode a code from the stream s using huffman table h. Return the symbol or\na negative value if there is an error. If all of the lengths are zero, i.e.\nan empty code, or if the code is incomplete and an invalid code is received,\nthen -9 is returned after reading MAXBITS bits.\n\nFormat notes:\n\n- The codes as stored in the compressed data are bit-reversed relative to\na simple integer ordering of codes of the same lengths. Hence below the\nbits are pulled from the compressed data one at a time and used to\nbuild the code value reversed from what is in the stream in order to\npermit simple integer comparisons for decoding.\n\n- The first code for the shortest length is all ones. Subsequent codes of\nthe same length are simply integer decrements of the previous code. When\nmoving up a length, a one bit is appended to the code. For a complete\ncode, the last code of the longest length will be all zeros. To support\nthis ordering, the bits pulled during decoding are inverted to apply the\nmore \"natural\" ordering starting with all zeros and incrementing.\n\n@param h Huffman table\n@return status code",
"Read assignment data.",
"Convenience method for setting the value of a private object field,\nwithout the stress of checked exceptions in the reflection API.\n\n@param object\nObject containing the field.\n@param fieldName\nName of the field to set.\n@param value\nValue to which to set the field."
] |
public void restore(String state) {
JsonObject json = JsonObject.readFrom(state);
String accessToken = json.get("accessToken").asString();
String refreshToken = json.get("refreshToken").asString();
long lastRefresh = json.get("lastRefresh").asLong();
long expires = json.get("expires").asLong();
String userAgent = json.get("userAgent").asString();
String tokenURL = json.get("tokenURL").asString();
String baseURL = json.get("baseURL").asString();
String baseUploadURL = json.get("baseUploadURL").asString();
boolean autoRefresh = json.get("autoRefresh").asBoolean();
int maxRequestAttempts = json.get("maxRequestAttempts").asInt();
this.accessToken = accessToken;
this.refreshToken = refreshToken;
this.lastRefresh = lastRefresh;
this.expires = expires;
this.userAgent = userAgent;
this.tokenURL = tokenURL;
this.baseURL = baseURL;
this.baseUploadURL = baseUploadURL;
this.autoRefresh = autoRefresh;
this.maxRequestAttempts = maxRequestAttempts;
} | [
"Restores a saved connection state into this BoxAPIConnection.\n\n@see #save\n@param state the saved state that was created with {@link #save}."
] | [
"Use this API to fetch lbvserver_auditnslogpolicy_binding resources of given name .",
"Returns a \"clean\" version of the given filename in which spaces have\nbeen converted to dashes and all non-alphanumeric chars are underscores.",
"Closes the connection to the Z-Wave controller.",
"Computes the likelihood of the random draw\n\n@return The likelihood.",
"Returns an instance of the CleverTap SDK.\n\n@param context The Android context\n@return The {@link CleverTapAPI} object\n@deprecated use {@link CleverTapAPI#getDefaultInstance(Context context)}",
"Return a copy of the new fragment and set the variable above.",
"Assigns a retention policy to all items with a given metadata template, optionally matching on fields.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param templateID the ID of the metadata template to assign the policy to.\n@param filter optional fields to match against in the metadata template.\n@return info about the created assignment.",
"Use this API to unset the properties of onlinkipv6prefix resource.\nProperties that need to be unset are specified in args array.",
"Get the property name of a method name. For example the property name of\nsetSomeValue would be someValue. Names not beginning with set or get are\nnot changed.\n\n@param name The name to process\n@return The property name"
] |
public double getValue(ForwardCurve forwardCurve, double swaprateVolatility) {
double[] swapTenor = new double[fixingDates.length+1];
System.arraycopy(fixingDates, 0, swapTenor, 0, fixingDates.length);
swapTenor[swapTenor.length-1] = paymentDates[paymentDates.length-1];
TimeDiscretization fixTenor = new TimeDiscretizationFromArray(swapTenor);
TimeDiscretization floatTenor = new TimeDiscretizationFromArray(swapTenor);
double forwardSwapRate = Swap.getForwardSwapRate(fixTenor, floatTenor, forwardCurve);
double swapAnnuity = SwapAnnuity.getSwapAnnuity(fixTenor, forwardCurve);
double payoffUnit = SwapAnnuity.getSwapAnnuity(new TimeDiscretizationFromArray(swapTenor[0], swapTenor[1]), forwardCurve) / (swapTenor[1] - swapTenor[0]);
return AnalyticFormulas.huntKennedyCMSOptionValue(forwardSwapRate, swaprateVolatility, swapAnnuity, exerciseDate, swapTenor[swapTenor.length-1]-swapTenor[0], payoffUnit, strike) * (swapTenor[1] - swapTenor[0]);
} | [
"This method returns the value of the product using a Black-Scholes model for the swap rate with the Hunt-Kennedy convexity adjustment.\nThe model is determined by a discount factor curve and a swap rate volatility.\n\n@param forwardCurve The forward curve from which the swap rate is calculated. The discount curve, associated with this forward curve is used for discounting this option.\n@param swaprateVolatility The volatility of the log-swaprate.\n@return Value of this product"
] | [
"Use this API to fetch dnsview resources of given names .",
"helper to calculate the navigationBar height\n\n@param context\n@return",
"Returns a SimpleConfiguration clientConfig with properties set from this configuration\n\n@return SimpleConfiguration",
"Send a failed operation response.\n\n@param context the request context\n@param errorCode the error code\n@param message the operation message\n@throws IOException for any error",
"Read in the configuration properties.",
"Set brightness to eg. darken the resulting image for use as background\n\n@param brightness default is 0, pos values increase brightness, neg. values decrease brightness\n.-100 is black, positive goes up to 1000+",
"Removes a tag from the resource.\n@param key the key of the tag to remove\n@return the next stage of the definition/update",
"Checks if the child is currently in ViewPort\n@param dataIndex child index\n@return true if the child is in viewport, false - otherwise",
"Delete rows that match the prepared statement."
] |
public boolean setVisibility(final Visibility visibility) {
if (visibility != mVisibility) {
Log.d(Log.SUBSYSTEM.WIDGET, TAG, "setVisibility(%s) for %s", visibility, getName());
updateVisibility(visibility);
mVisibility = visibility;
return true;
}
return false;
} | [
"Set the visibility of the object.\n\n@see Visibility\n@param visibility\nThe visibility of the object.\n@return {@code true} if the visibility was changed, {@code false} if it\nwasn't."
] | [
"Configure file logging and stop console logging.\n\n@param filename\nLog to this file.",
"Set the specific device class of the node.\n@param specificDeviceClass the specificDeviceClass to set\n@exception IllegalArgumentException thrown when the specific device class does not match\nthe generic device class.",
"Applies the mask to this address and then compares values with the given address\n\n@param mask\n@param other\n@return",
"Use this API to delete application.",
"Makes a DocumentReaderAndWriter based on\nflags.plainTextReaderAndWriter. Useful for reading in\nuntokenized text documents or reading plain text from the command\nline. An example of a way to use this would be to return a\nedu.stanford.nlp.wordseg.Sighan2005DocumentReaderAndWriter for\nthe Chinese Segmenter.",
"Port forward missing module changes for each layer.\n\n@param patch the current patch\n@param context the patch context\n@throws PatchingException\n@throws IOException\n@throws XMLStreamException",
"Get the present keys of all entries with a given type, checking hereby if assignable.\n\n@param type The attribute type, not null.\n@return all present keys of attributes being assignable to the type, never null.",
"Creates a rectangular matrix which is zero except along the diagonals.\n\n@param numRows Number of rows in the matrix.\n@param numCols NUmber of columns in the matrix.\n@return A matrix with diagonal elements equal to one.",
"The default field facets.\n\n@param categoryConjunction flag, indicating if category selections in the facet should be \"AND\" combined.\n@return the default field facets."
] |
public InputStream sendRequest(String requestMethod,
Map<String, String> parameters) throws IOException {
String queryString = getQueryString(parameters);
URL url = new URL(this.apiBaseUrl);
HttpURLConnection connection = (HttpURLConnection) WebResourceFetcherImpl
.getUrlConnection(url);
setupConnection(requestMethod, queryString, connection);
OutputStreamWriter writer = new OutputStreamWriter(
connection.getOutputStream());
writer.write(queryString);
writer.flush();
writer.close();
int rc = connection.getResponseCode();
if (rc != 200) {
logger.warn("Error: API request returned response code " + rc);
}
InputStream iStream = connection.getInputStream();
fillCookies(connection.getHeaderFields());
return iStream;
} | [
"Sends a request to the API with the given parameters and the given\nrequest method and returns the result string. It automatically fills the\ncookie map with cookies in the result header after the request.\n\nWarning: You probably want to use ApiConnection.sendJsonRequest\nthat execute the request using JSON content format,\nthrows the errors and logs the warnings.\n\n@param requestMethod\neither POST or GET\n@param parameters\nMaps parameter keys to values. Out of this map the function\nwill create a query string for the request.\n@return API result\n@throws IOException"
] | [
"Export the odo overrides setup and odo configuration\n\n@param oldExport Whether this is a backup from scratch or backing up because user will upload after (matches API)\n@return The odo configuration and overrides in JSON format, can be written to a file after",
"Finish the initialization.\n\n@param container\n@param isShutdownHookEnabled",
"Converts the given hash code into an index into the\nhash table.",
"Compute the repair set from the given values and nodes\n\n@param nodeValues The value found on each node\n@return A set of repairs to perform",
"Process the host info and determine which configuration elements are required on the slave host.\n\n@param hostInfo the host info\n@param root the model root\n@param extensionRegistry the extension registry\n@return",
"Use this API to fetch wisite_farmname_binding resources of given name .",
"Add an empty work week.\n\n@return new work week",
"Find the number of Strings matched to the given Matcher.\n\n@param matcher a Matcher\n@return int the number of Strings matched to the given matcher.\n@since 1.0",
"Remove a bean from the context, calling the destruction callback if any.\n\n@param name bean name\n@return previous value"
] |
public static List<GVRAtlasInformation> loadAtlasInformation(InputStream ins) {
try {
int size = ins.available();
byte[] buffer = new byte[size];
ins.read(buffer);
return loadAtlasInformation(new JSONArray(new String(buffer, "UTF-8")));
} catch (JSONException je) {
je.printStackTrace();
} catch (IOException ex) {
ex.printStackTrace();
}
return null;
} | [
"This method is a sync parse to the JSON stream of atlas information.\n\n@return List of atlas information."
] | [
"Replaces the translations in an existing container with the translations for the provided locale.\n@param locale the locale for which translations should be loaded.\n@return <code>true</code> if replacing succeeded, <code>false</code> otherwise.",
"Creates an instance of a NewSimpleBean from an annotated class\n\n@param clazz The annotated class\n@param beanManager The Bean manager\n@return a new NewSimpleBean instance",
"This is pretty ugly. We end up mimicking the request logic here, so this\nneeds to stay in sync with handleRequest.",
"Change the color of the center which indicates the new color.\n\n@param color int of the color.",
"Start a task. The id is needed to end the task\n\n@param id\n@param taskName",
"Use this API to fetch authenticationnegotiatepolicy_binding resource of given name .",
"Returns the configured bundle, or the provided default bundle.\n@param defaultMessages the default bundle\n@param locale the preferred locale\n@return the configured bundle or, if not found, the default bundle.",
"Sets the jdbcLevel. parse the string setting and check that it is indeed an integer.\n@param jdbcLevel The jdbcLevel to set",
"Calculates the local translation and rotation for a bone.\nAssumes WorldRot and WorldPos have been calculated for the bone."
] |
private String extractAndConvertTaskType(Task task)
{
String activityType = (String) task.getCachedValue(m_activityTypeField);
if (activityType == null)
{
activityType = "Resource Dependent";
}
else
{
if (ACTIVITY_TYPE_MAP.containsKey(activityType))
{
activityType = ACTIVITY_TYPE_MAP.get(activityType);
}
}
return activityType;
} | [
"Attempts to locate the activity type value extracted from an existing P6 schedule.\nIf necessary converts to the form which can be used in the PMXML file.\nReturns \"Resource Dependent\" as the default value.\n\n@param task parent task\n@return activity type"
] | [
"Creates a new pagination configuration if at least one of the provided parameters is not null.\nOtherwise returns null.\n@param pageParam The request parameter used to send the current page number.\n@param pageSizes The page sizes for the first pages. The last provided size is the size of all following pages.\n@param pageNavLength The length of the \"Google\"-like page navigation. Should be an odd number.\n@return the pagination configuration, or <code>null</code> if none of the provided parameters is not null.",
"Open the store with the version directory specified. If null is specified\nwe open the directory with the maximum version\n\n@param versionDir Version Directory to open. If null, we open the max\nversioned / latest directory",
"Assign to the data object the val corresponding to the fieldType.",
"Loads a PDF document and creates a DOM tree from it.\n@param doc the source document\n@return a DOM Document representing the DOM tree\n@throws IOException",
"returns the bytesize of the give bitmap",
"Retrieve the var data key for a specific field.\n\n@param type field type\n@return var data key",
"Find the earliest start time of the specified methods.\n@param methods A list of test methods.\n@return The earliest start time.",
"Use this API to fetch gslbservice resource of given name .",
"Map the Primavera UDF to a custom field.\n\n@param fieldType parent object type\n@param dataType UDF data type\n@param name UDF name\n@return FieldType instance"
] |
public static List<Number> findIndexValues(Object self, Closure closure) {
return findIndexValues(self, 0, closure);
} | [
"Iterates over the elements of an iterable collection of items and returns\nthe index values of the items that match the condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param closure the filter to perform a match on the collection\n@return a list of numbers corresponding to the index values of all matched objects\n@since 1.5.2"
] | [
"Called every frame if the picker is enabled\nto generate pick events.\n@param frameTime starting time of the current frame",
"Calculate start dates for a yearly recurrence.\n\n@param calendar current date\n@param dates array of start dates",
"Get the element value in the list by index\n@param index the position in the list from which to get the element\n@return the element value",
"Uploads bytes to an open upload session.\n@param data data\n@param offset the byte position where the chunk begins in the file.\n@param partSize the part size returned as part of the upload session instance creation.\nOnly the last chunk can have a lesser value.\n@param totalSizeOfFile The total size of the file being uploaded.\n@return the part instance that contains the part id, offset and part size.",
"Adds a new cell to the current grid\n@param cell the td component",
"Checks given permissions are needed to show rationale.\n\n@return returns true if one of the permission is needed to show rationale.",
"Convert the MSPDI representation of a UUID into a Java UUID instance.\n\n@param value MSPDI UUID\n@return Java UUID instance",
"Gets the favorite entry for a given row.\n\n@param row the widget used to display the favorite\n@return the favorite entry for the widget",
"Remember execution time for all executed suites."
] |
private void process(String input, String output) throws MPXJException, IOException
{
//
// Extract the project data
//
MPPReader reader = new MPPReader();
m_project = reader.read(input);
String varDataFileName;
String projectDirName;
int mppFileType = NumberHelper.getInt(m_project.getProjectProperties().getMppFileType());
switch (mppFileType)
{
case 8:
{
projectDirName = " 1";
varDataFileName = "FixDeferFix 0";
break;
}
case 9:
{
projectDirName = " 19";
varDataFileName = "Var2Data";
break;
}
case 12:
{
projectDirName = " 112";
varDataFileName = "Var2Data";
break;
}
case 14:
{
projectDirName = " 114";
varDataFileName = "Var2Data";
break;
}
default:
{
throw new IllegalArgumentException("Unsupported file type " + mppFileType);
}
}
//
// Load the raw file
//
FileInputStream is = new FileInputStream(input);
POIFSFileSystem fs = new POIFSFileSystem(is);
is.close();
//
// Locate the root of the project file system
//
DirectoryEntry root = fs.getRoot();
m_projectDir = (DirectoryEntry) root.getEntry(projectDirName);
//
// Process Tasks
//
Map<String, String> replacements = new HashMap<String, String>();
for (Task task : m_project.getTasks())
{
mapText(task.getName(), replacements);
}
processReplacements(((DirectoryEntry) m_projectDir.getEntry("TBkndTask")), varDataFileName, replacements, true);
//
// Process Resources
//
replacements.clear();
for (Resource resource : m_project.getResources())
{
mapText(resource.getName(), replacements);
mapText(resource.getInitials(), replacements);
}
processReplacements((DirectoryEntry) m_projectDir.getEntry("TBkndRsc"), varDataFileName, replacements, true);
//
// Process project properties
//
replacements.clear();
ProjectProperties properties = m_project.getProjectProperties();
mapText(properties.getProjectTitle(), replacements);
processReplacements(m_projectDir, "Props", replacements, true);
replacements.clear();
mapText(properties.getProjectTitle(), replacements);
mapText(properties.getSubject(), replacements);
mapText(properties.getAuthor(), replacements);
mapText(properties.getKeywords(), replacements);
mapText(properties.getComments(), replacements);
processReplacements(root, "\005SummaryInformation", replacements, false);
replacements.clear();
mapText(properties.getManager(), replacements);
mapText(properties.getCompany(), replacements);
mapText(properties.getCategory(), replacements);
processReplacements(root, "\005DocumentSummaryInformation", replacements, false);
//
// Write the replacement raw file
//
FileOutputStream os = new FileOutputStream(output);
fs.writeFilesystem(os);
os.flush();
os.close();
fs.close();
} | [
"Process an MPP file to make it anonymous.\n\n@param input input file name\n@param output output file name\n@throws Exception"
] | [
"Sets the bit at the specified index.\n@param index The index of the bit to set (0 is the least-significant bit).\n@param set A boolean indicating whether the bit should be set or not.\n@throws IndexOutOfBoundsException If the specified index is not a bit\nposition in this bit string.",
"Opens a new FileOutputStream for a file of the given name in the given\nresult directory. Any file of this name that exists already will be\nreplaced. The caller is responsible for eventually closing the stream.\n\n@param resultDirectory\nthe path to the result directory\n@param filename\nthe name of the file to write to\n@return FileOutputStream for the file\n@throws IOException\nif the file or example output directory could not be created",
"Hide keyboard from phoneEdit field",
"Returns the dimension of the type of the current member.\n\n@return The member dimension\n@exception XDocletException if an error occurs\n@see OjbMemberTagsHandler#getMemberType()",
"Function to serialize the given Vector clock into a string. If something\ngoes wrong, it returns an empty string.\n\n@param vc The Vector clock to serialize\n@return The string (JSON) version of the specified Vector clock",
"Creates a Document that can be passed to the MongoDB batch insert function",
"Initialize elements from the duration panel.",
"Merge a subtree.\n\n@param targetRegistry the target registry\n@param subTree the subtree",
"Set the main attribute \"Bundle-RequiredExecutionEnvironment\" to the given\nvalue.\n\n@param bree The new value"
] |
public String getLinkCopyText(JSONObject jsonObject){
if(jsonObject == null) return "";
try {
JSONObject copyObject = jsonObject.has("copyText") ? jsonObject.getJSONObject("copyText") : null;
if(copyObject != null){
return copyObject.has("text") ? copyObject.getString("text") : "";
}else{
return "";
}
} catch (JSONException e) {
Logger.v("Unable to get Link Text with JSON - "+e.getLocalizedMessage());
return "";
}
} | [
"Returns the text for the JSONObject of Link provided\nThe JSONObject of Link provided should be of the type \"copy\"\n@param jsonObject of Link\n@return String"
] | [
"Authenticates the API connection for Box Developer Edition.",
"Checks String to see if the parameter is null.\n@param paramValue Object that will be checked if null.\n@return this.true if the parameter that is being checked is not null",
"Constructs a triangule Face from vertices v0, v1, and v2.\n\n@param v0\nfirst vertex\n@param v1\nsecond vertex\n@param v2\nthird vertex",
"Retrieve and validate the zone id value from the REST request.\n\"X-VOLD-Zone-Id\" is the zone id header.\n\n@return valid zone id or -1 if there is no/invalid zone id",
"Remove the set of partitions from the node provided\n\n@param node The node from which we're removing the partitions\n@param donatedPartitions The list of partitions to remove\n@return The new node without the partitions",
"Adds the dependencies typical for particular deployment types.\nThis is not accurate and doesn't cover the real needs of the project.\nBasically it's just to have \"something\" for the initial implementation.",
"Modifier method to set the unique ID of this calendar.\n\n@param uniqueID unique identifier",
"return the ctc costs and gradients, given the probabilities and labels",
"of the unbound provider ("
] |
private static void addCacheFormatEntry(List<Message> trackListEntries, int playlistId, ZipOutputStream zos) throws IOException {
// Add a marker so we can recognize this as a metadata archive. I would use the ZipFile comment, but
// that is not available until Java 7, and Beat Link is supposed to be backwards compatible with Java 6.
// Since we are doing this anyway, we can also provide information about the nature of the cache, and
// how many metadata entries it contains, which is useful for auto-attachment.
zos.putNextEntry(new ZipEntry(CACHE_FORMAT_ENTRY));
String formatEntry = CACHE_FORMAT_IDENTIFIER + ":" + playlistId + ":" + trackListEntries.size();
zos.write(formatEntry.getBytes("UTF-8"));
} | [
"Add a marker so we can recognize this as a metadata archive. I would use the ZipFile comment, but\nthat is not available until Java 7, and Beat Link is supposed to be backwards compatible with Java 6.\nSince we are doing this anyway, we can also provide information about the nature of the cache, and\nhow many metadata entries it contains, which is useful for auto-attachment.\n\n@param trackListEntries the tracks contained in the cache, so we can record the number\n@param playlistId the playlist contained in the cache, or 0 if it is all tracks from the media\n@param zos the stream to which the ZipFile is being written\n\n@throws IOException if there is a problem creating the format entry"
] | [
"Set the association in the entry state.\n\n@param collectionRole the role of the association\n@param association the association",
"Parses formatter attributes.\n\n@param formatterLoc the node location\n@return the map of formatter attributes (unmodifiable)",
"Starts recursive delete on all delete objects object graph",
"Returns an java object read from the specified ResultSet column.",
"Get the original-image using the specified URL suffix.\n\n@deprecated\n@see PhotosInterface#getImage(Photo, int)\n@param suffix\nThe URL suffix, including the .extension\n@return The BufferedImage object\n@throws IOException\n@throws FlickrException",
"Issue the database statements to create the table associated with a table configuration.\n\n@param connectionSource\nconnectionSource Associated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@return The number of statements executed to do so.",
"Creates a random diagonal matrix where the diagonal elements are selected from a uniform\ndistribution that goes from min to max.\n\n@param N Dimension of the matrix.\n@param min Minimum value of a diagonal element.\n@param max Maximum value of a diagonal element.\n@param rand Random number generator.\n@return A random diagonal matrix.",
"Use this API to delete appfwjsoncontenttype resources of given names.",
"This method takes the textual version of a constraint name\nand returns an appropriate class instance. Note that unrecognised\nvalues are treated as \"As Soon As Possible\" constraints.\n\n@param locale target locale\n@param type text version of the constraint type\n@return ConstraintType instance"
] |
public static Object newInstance(Class target, Class type, Object arg) throws InstantiationException,
IllegalAccessException,
IllegalArgumentException,
InvocationTargetException,
NoSuchMethodException,
SecurityException
{
return newInstance(target, new Class[]{ type }, new Object[]{ arg });
} | [
"Returns a new instance of the given class using the constructor with the specified parameter.\n\n@param target The class to instantiate\n@param type The types of the single parameter of the constructor\n@param arg The argument\n@return The instance"
] | [
"Use this API to unset the properties of nsdiameter resource.\nProperties that need to be unset are specified in args array.",
"Display web page, but no user interface - close",
"Adds OPT_Z | OPT_ZONE option to OptionParser, with one argument.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Check whether the media seems to have changed since a saved version of it was used. We ignore changes in\nfree space because those probably just reflect history entries being added.\n\n@param originalMedia the media details when information about it was saved\n\n@return true if there have been detectable significant changes to the media since it was saved\n\n@throws IllegalArgumentException if the {@link #hashKey()} values of the media detail objects differ",
"Returns angle in degrees between two points\n\n@param ax x of the point 1\n@param ay y of the point 1\n@param bx x of the point 2\n@param by y of the point 2\n@return angle in degrees between two points",
"Get a list of all active server mappings defined for current profile\n\n@return Collection of ServerRedirects",
"Use this API to fetch auditsyslogpolicy_vpnglobal_binding resources of given name .",
"Invert by solving for against an identity matrix.\n\n@param A_inv Where the inverted matrix saved. Modified.",
"Open the given url in default system browser."
] |
public void execute(CommandHandler handler,
int timeout,
TimeUnit unit) throws
CommandLineException,
InterruptedException, ExecutionException, TimeoutException {
ExecutableBuilder builder = new ExecutableBuilder() {
CommandContext c = newTimeoutCommandContext(ctx);
@Override
public Executable build() {
return () -> {
handler.handle(c);
};
}
@Override
public CommandContext getCommandContext() {
return c;
}
};
execute(builder, timeout, unit);
} | [
"public for testing purpose"
] | [
"Print a task type.\n\n@param value TaskType instance\n@return task type value",
"Stop announcing ourselves and listening for status updates.",
"Removes a tag from the task. Returns an empty data block.\n\n@param task The task to remove a tag from.\n@return Request object",
"Creates a new status update on the project.\n\nReturns the full record of the newly created project status update.\n\n@param project The project on which to create a status update.\n@return Request object",
"Use this API to update vpnclientlessaccesspolicy.",
"Helper method that encapsulates the logic to acquire a lock.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param lockName\nall calls to this method will contend for a unique lock with\nthe name of lockName\n@param timeout\nseconds until the lock will expire\n@param lockHolder\na unique string used to tell if you are the current holder of\na lock for both acquisition, and extension\n@return Whether or not the lock was acquired.",
"Transforms a list of Integer objects to an array of primitive int values.\n\n@param integers\n@return",
"Adds a materialization listener.\n\n@param listener\nThe listener to add",
"Reads OAuth 2.0 with JWT app configurations from the reader. The file should be in JSON format.\n\n@param reader a reader object which points to a JSON formatted configuration file\n@return a new Instance of BoxConfig\n@throws IOException when unable to access the mapping file's content of the reader"
] |
public static base_responses delete(nitro_service client, String network[]) throws Exception {
base_responses result = null;
if (network != null && network.length > 0) {
route6 deleteresources[] = new route6[network.length];
for (int i=0;i<network.length;i++){
deleteresources[i] = new route6();
deleteresources[i].network = network[i];
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | [
"Use this API to delete route6 resources of given names."
] | [
"Prints the data for a single class to the given stream. This will be a\nsingle line in CSV.\n\n@param out\nthe output to write to\n@param classRecord\nthe class record to write\n@param entityIdValue\nthe item id that this class record belongs to",
"A convenience method for creating an immutable map.\n\n@param self a Map\n@return an immutable Map\n@see java.util.Collections#unmodifiableMap(java.util.Map)\n@since 1.0",
"Print duration in tenths of minutes.\n\n@param duration Duration instance\n@return duration in tenths of minutes",
"Use this API to fetch clusterinstance_binding resource of given name .",
"Assigns retention policy with givenID to folder or enterprise.\n@param api the API connection to be used by the created assignment.\n@param policyID id of the assigned retention policy.\n@param assignTo object representing folder or enterprise to assign policy to.\n@return info about created assignment.",
"This one picks up on Dan2 ideas, but seeks to make less distinctions\nmid sequence by sorting for long words, but to maintain extra\ndistinctions for short words, by always recording the class of the\nfirst and last two characters of the word.\nCompared to chris2 on which it is based,\nit uses more Unicode classes, and so collapses things like\npunctuation more, and might work better with real unicode.\n\n@param s The String to find the word shape of\n@param omitIfInBoundary If true, character classes present in the\nfirst or last two (i.e., BOUNDARY_SIZE) letters\nof the word are not also registered\nas classes that appear in the middle of the word.\n@param knownLCWords If non-null and non-empty, tag with a \"k\" suffix words\nthat are in this list when lowercased (representing\nthat the word is \"known\" as a lowercase word).\n@return A word shape for the word.",
"Access an attribute.\n\n@param type the attribute's type, not {@code null}\n@param key the attribute's key, not {@code null}\n@return the attribute value, or {@code null}.",
"Specifies an input field to assign a value to. Crawljax first tries to match the found HTML\ninput element's id and then the name attribute.\n\n@param type\nthe type of input field\n@param identification\nthe locator of the input field\n@return an InputField",
"Adds a free connection.\n\n@param connectionHandle\n@throws SQLException on error"
] |
public void forAllMemberTagTokens(String template, Properties attributes) throws XDocletException
{
if (getCurrentField() != null) {
forAllMemberTagTokens(template, attributes, FOR_FIELD);
}
else if (getCurrentMethod() != null) {
forAllMemberTagTokens(template, attributes, FOR_METHOD);
}
} | [
"Iterates over all tokens in current member tag with the name tagName and evaluates the body for every token.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException If an error occurs\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"delimiter\" description=\"delimiter for the StringTokenizer. consult javadoc for\njava.util.StringTokenizer default is ','\"\[email protected] name=\"skip\" description=\"how many tokens to skip on start\""
] | [
"Use this API to fetch all the systemeventhistory resources that are configured on netscaler.\nThis uses systemeventhistory_args which is a way to provide additional arguments while fetching the resources.",
"Build resolution context in which message will be discovered and built\n@param components resolution components, used to identify message bundle\n@param messageParams message parameters will be substituted in message and used in pattern matching\n@since 3.1\n@return immutable resolution context instance for given parameters",
"Checks that the targetClass is widening the argument class\n\n@param argumentClass\n@param targetClass\n@return",
"this method is basically checking whether we can return \"this\" for getNetworkSection",
"Creates the box tree for the PDF file.\n@param dim",
"we have only one implementation on classpath.",
"Converts a DTO attribute into a generic attribute object.\n\n@param attribute\nThe DTO attribute.\n@return The server side attribute representation. As we don't know at this point what kind of object the\nattribute is (that's a problem for the <code>FeatureModel</code>), we return an <code>Object</code>.",
"Calculate the child size along the axis\n@param dataIndex data index\n@param axis {@link Axis}\n@return child size",
"Starts the compressor."
] |
public void copyNodeMetaData(ASTNode other) {
if (other.metaDataMap == null) {
return;
}
if (metaDataMap == null) {
metaDataMap = new ListHashMap();
}
metaDataMap.putAll(other.metaDataMap);
} | [
"Copies all node meta data from the other node to this one\n@param other - the other node"
] | [
"Resolve the single type argument of the given generic interface against\nthe given target class which is assumed to implement the generic interface\nand possibly declare a concrete type for its type variable.\n@param clazz the target class to check against\n@param genericIfc the generic interface or superclass to resolve the type argument from\n@return the resolved type of the argument, or {@code null} if not resolvable",
"Opens file for editing.\n\n@param currentChangeListId The current change list id to open the file for editing at\n@param filePath The filePath which contains the file we need to edit\n@throws IOException Thrown in case of perforce communication errors\n@throws InterruptedException",
"Use this API to update spilloverpolicy.",
"Convert JsonString to Object of Clazz\n\n@param json\n@param clazz\n@return Object of Clazz",
"Read the role definitions from a GanttProject project.\n\n@param gpProject GanttProject project",
"creates a shape list containing all child shapes and set it to the\ncurrent shape new shape get added to the shape array\n@param shapes\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"Gets the invalid message.\n\n@param key the key\n@return the invalid message",
"Determines the field via reflection look-up.\n\n@param clazz The java class to search in\n@param fieldName The field's name\n@return The field object or <code>null</code> if no matching field was found",
"Decodes a signed request, returning the payload of the signed request as a specified type.\n@param signedRequest the value of the signed_request parameter sent by Facebook.\n@param type the type to bind the signed_request to.\n@param <T> the Java type to bind the signed_request to.\n@return the payload of the signed request as an object\n@throws SignedRequestException if there is an error decoding the signed request"
] |
public AT_Row setCharTranslator(CharacterTranslator charTranslator) {
if(this.hasCells()){
for(AT_Cell cell : this.getCells()){
cell.getContext().setCharTranslator(charTranslator);
}
}
return this;
} | [
"Sets the character translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param charTranslator translator\n@return this to allow chaining"
] | [
"This method writes resource data to a Planner file.",
"Reverse how the transition is applied, such that the transition previously performed when progress=start of range is only performed when progress=end of range\n\n@return",
"Build a new WebDriver based EmbeddedBrowser.\n\n@return the new build WebDriver based embeddedBrowser",
"Use this API to delete dnssuffix resources of given names.",
"these are the iterators used by MACAddress",
"Save an HTTP response to a file\n@param response the response to save\n@param destFile the destination file\n@throws IOException if the response could not be downloaded",
"Join N sets.",
"Utility function to get the current value.",
"Send a get artifacts request\n\n@param hasLicense\n@return list of artifact\n@throws GrapesCommunicationException"
] |
public void setConnection(JdbcConnectionDescriptor jcd) throws PlatformException
{
_jcd = jcd;
String targetDatabase = (String)_dbmsToTorqueDb.get(_jcd.getDbms().toLowerCase());
if (targetDatabase == null)
{
throw new PlatformException("Database "+_jcd.getDbms()+" is not supported by torque");
}
if (!targetDatabase.equals(_targetDatabase))
{
_targetDatabase = targetDatabase;
_creationScript = null;
_initScripts.clear();
}
} | [
"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"
] | [
"The amount of time to keep an idle client thread alive\n\n@param threadIdleTime",
"Heuristic check if string might be an IPv6 address.\n\n@param input Any string or null\n@return true, if input string contains only hex digits and at least two colons, before '.' or '%' character.",
"Add assignments to the tree.\n\n@param parentNode parent tree node\n@param file assignments container",
"Function to update store definitions. Unlike the put method, this\nfunction does not delete any existing state. It only updates the state of\nthe stores specified in the given stores.xml\n\n@param valueBytes specifies the bytes of the stores.xml containing\nupdates for the specified stores",
"Adapt the size of the tiles so that we have the same amount of tiles as we would have had with maxWidth\nand maxHeight, but with the smallest tiles as possible.",
"Send ourselves \"updates\" about any tracks that were loaded before we started, or before we were requesting\ndetails, since we missed them.",
"Set the list of supported resolutions. Each resolution is specified in map units per pixel.\n\n@param resolutions\nresolutions\n@deprecated use {@link #setZoomLevels()}",
"Returns a list that contains all the entries of the given iterator in the same order.\n\n@param iterator\nthe iterator. May not be <code>null</code>.\n@return a list with the same entries as the given iterator. Never <code>null</code>.",
"Get a random pod that provides the specified service in the specified namespace.\n\n@param client\nThe client instance to use.\n@param name\nThe name of the service.\n@param namespace\nThe namespace of the service.\n\n@return The pod or null if no pod matches."
] |
private void removeListener(CmsUUID listenerId) {
getRequest().getSession().removeAttribute(SESSION_ATTRIBUTE_LISTENER_ID);
m_listeners.remove(listenerId);
} | [
"Remove the listener active in this session.\n\n@param listenerId the id of the listener to remove"
] | [
"Get all Groups\n\n@return\n@throws Exception",
"Log block data.\n\n@param blockIndex current block index\n@param startIndex start index\n@param blockLength length",
"return the workspace size needed for ctc",
"Use this API to fetch all the systementitydata resources that are configured on netscaler.\nThis uses systementitydata_args which is a way to provide additional arguments while fetching the resources.",
"resumed a given deployment\n\n@param deployment The deployment to resume",
"Check if a module can be promoted in the Grapes server\n\n@param name\n@param version\n@return a boolean which is true only if the module can be promoted\n@throws GrapesCommunicationException",
"Create an Product delivery\n\n@throws AuthenticationException, GrapesCommunicationException, IOException",
"Flush output streams.",
"Start listening for device announcements and keeping track of the DJ Link devices visible on the network.\nIf already listening, has no effect.\n\n@throws SocketException if the socket to listen on port 50000 cannot be created"
] |
public static int getMemberDimension() throws XDocletException
{
if (getCurrentField() != null) {
return getCurrentField().getDimension();
}
else if (getCurrentMethod() != null) {
XMethod method = getCurrentMethod();
if (MethodTagsHandler.isGetterMethod(method)) {
return method.getReturnType().getDimension();
}
else if (MethodTagsHandler.isSetterMethod(method)) {
XParameter param = (XParameter)method.getParameters().iterator().next();
return param.getDimension();
}
}
return 0;
} | [
"Returns the dimension of the type of the current member.\n\n@return The member dimension\n@exception XDocletException if an error occurs\n@see OjbMemberTagsHandler#getMemberType()"
] | [
"Resizes an image to the specified height, changing width in the same proportion\n@param originalImage Image in memory\n@param heightOut The height to resize\n@return New Image in memory",
"Get an CollectionDescriptor by name BRJ\n@param name\n@return CollectionDescriptor or null",
"The main entry point for processing graphical indicator definitions.\n\n@param indicators graphical indicators container\n@param properties project properties\n@param props properties data",
"Gets the listener classes to which dispatching should be prevented while\nthis event is being dispatched.\n\n@return The listener classes marked to prevent.\n@see #preventCascade(Class)",
"Command to select a document from the POIFS for viewing.\n\n@param entry document to view",
"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.",
"Add a Opacity bar to the color wheel.\n\n@param bar The instance of the Opacity bar.",
"returns true if a job was queued within a timeout",
"Use this API to fetch a vpnglobal_vpnnexthopserver_binding resources."
] |
protected void processTusFiles(String assemblyUrl) throws IOException, ProtocolException {
tusClient.setUploadCreationURL(new URL(getClient().getHostUrl() + "/resumable/files/"));
tusClient.enableResuming(tusURLStore);
for (Map.Entry<String, File> entry : files.entrySet()) {
processTusFile(entry.getValue(), entry.getKey(), assemblyUrl);
}
for (Map.Entry<String, InputStream> entry : fileStreams.entrySet()) {
processTusFile(entry.getValue(), entry.getKey(), assemblyUrl);
}
} | [
"Prepares all files added for tus uploads.\n\n@param assemblyUrl the assembly url affiliated with the tus upload.\n@throws IOException when there's a failure with file retrieval.\n@throws ProtocolException when there's a failure with tus upload."
] | [
"Returns an Organization\n\n@param organizationId String\n@return DbOrganization",
"We have received an update that invalidates the beat grid for a player, so clear it and alert\nany listeners if this represents a change. This does not affect the hot cues; they will stick around until the\nplayer loads a new track that overwrites one or more of them.\n\n@param update the update which means we have no beat grid for the associated player",
"Returns the most likely class for the word at the given position.",
"Returns an java object read from the specified ResultSet column.",
"Process start.\n\n@param endpoint the endpoint\n@param eventType the event type",
"Gets the automaton by id.\n\n@param id the id\n@return the automaton by id\n@throws IOException Signals that an I/O exception has occurred.",
"Returns the resource bundle for current Locale, i.e. locale set in the PageComponent.\nAlways create a new instance, this avoids getting the incorrect locale information.\n\n@return resourcebundle for internationalized messages",
"Returns the spread value such that the sum of cash flows of the bond discounted with a given reference curve\nwith the additional spread coincides with a given price.\n\n@param bondPrice The target price as double.\n@param referenceCurve The reference curve used for discounting the coupon payments.\n@param model The model under which the product is valued.\n@return The optimal spread value.",
"These exact lines are shared between three different tools, so\nthey have been moved here to reduce code duplication.\n@return The parsed command-line, with options removed."
] |
public ThumborUrlBuilder align(VerticalAlign valign, HorizontalAlign halign) {
return align(valign).align(halign);
} | [
"Set the horizontal and vertical alignment for the image when image gets cropped by resizing.\n\n@param valign Vertical alignment.\n@param halign Horizontal alignment.\n@throws IllegalStateException if image has not been marked for resize."
] | [
"Parses a name into a Region object and creates a new Region instance if not found among the existing ones.\n\n@param name a region name\n@return the parsed or created region",
"Gets as many of the requested bytes as available from this buffer.\n\n@return number of bytes actually got from this buffer (0 if no bytes are available)",
"Initializes the model",
"Use this API to fetch aaauser_aaagroup_binding resources of given name .",
"Not exposed directly - the Query object passed as parameter actually contains results...",
"generate a message for loglevel DEBUG\n\n@param pObject the message Object",
"Sets the promotion state.\n\n<P>INFO: This method updates automatically all the contained artifacts.\n\n@param promoted boolean",
"Enable or disable this component.\n@param flag true to enable, false to disable.\n@see #enable()\n@see #disable()\n@see #isEnabled()",
"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"
] |
public static base_responses add(nitro_service client, inat resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
inat addresources[] = new inat[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new inat();
addresources[i].name = resources[i].name;
addresources[i].publicip = resources[i].publicip;
addresources[i].privateip = resources[i].privateip;
addresources[i].tcpproxy = resources[i].tcpproxy;
addresources[i].ftp = resources[i].ftp;
addresources[i].tftp = resources[i].tftp;
addresources[i].usip = resources[i].usip;
addresources[i].usnip = resources[i].usnip;
addresources[i].proxyip = resources[i].proxyip;
addresources[i].mode = resources[i].mode;
addresources[i].td = resources[i].td;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"Use this API to add inat resources."
] | [
"Curries a function that takes one argument.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed argument.\n@return a function that takes no arguments. Never <code>null</code>.",
"Push an event which describes a purchase made.\n\n@param eventName Has to be specified as \"Charged\". Anything other than this\nwill result in an {@link InvalidEventNameException} being thrown.\n@param chargeDetails A {@link HashMap}, with keys as strings, and values as {@link String},\n{@link Integer}, {@link Long}, {@link Boolean}, {@link Float}, {@link Double},\n{@link java.util.Date}, or {@link Character}\n@param items An {@link ArrayList} which contains up to 15 {@link HashMap} objects,\nwhere each HashMap object describes a particular item purchased\n@throws InvalidEventNameException Thrown if the event name is not \"Charged\"\n@deprecated use {@link CleverTapAPI#pushChargedEvent(HashMap chargeDetails, ArrayList items)}",
"Reads an argument of type \"number\" from the request.",
"Deploys application reading resources from specified InputStream\n\n@param inputStream where resources are read\n@throws IOException",
"Based on a provided locale return a SoyMsgBundle file.\n\nIf a passed in locale object is \"Optional.absent()\",\nthe implementation will return Optional.absent() as well\n@param locale - maybe locale\n@return maybe soy msg bundle",
"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.",
"Use this API to fetch lbvserver_auditnslogpolicy_binding resources of given name .",
"Returns the name of the class to be instantiated.\n@param rs the Resultset\n@return null if the column is not available",
"Pauses the playback of a sound."
] |
protected void updateLabelActiveStyle() {
if (this.valueBoxBase.getText() != null && !this.valueBoxBase.getText().isEmpty()) {
label.addStyleName(CssName.ACTIVE);
} else {
label.removeStyleName(CssName.ACTIVE);
}
} | [
"Updates the style of the field label according to the field value if the\nfield value is empty - null or \"\" - removes the label 'active' style else\nwill add the 'active' style to the field label."
] | [
"2-D Perlin noise function.\n\n@param x X Value.\n@param y Y Value.\n@return Returns function's value at point xy.",
"Provide array of String results from inputOutput MFString field named url.\n@array saved in valueDestination",
"Returns the perma link for the given resource and optional detail content.<p<\n\n@param cms the CMS context to use\n@param resourceName the page to generate the perma link for\n@param detailContentId the structure id of the detail content (may be null)\n\n@return the perma link",
"Prepare a parallel TCP Task.\n\n@param command\nthe command\n@return the parallel task builder",
"Switches from a dense to sparse matrix",
"Tells you if the expression is true, which can be true or Boolean.TRUE.\n@param expression\nexpression\n@return\nas described",
"Swaps two specified partitions.\n\nPair-wase partition swapping may be more prone to local minima than\nlarger perturbations. Could consider \"swapping\" a list of\n<nodeId/partitionId>. This would allow a few nodes to be identified\n(random # btw 2-5?) and then \"swapped\" (shuffled? rotated?).\n\n@return modified cluster metadata.",
"Creates a random Hermitian matrix with elements from min to max value.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symmetric matrix.",
"This method performs database modification at the very and of transaction."
] |
public InsertIntoTable set(String name, Object value) {
builder.set(name, value);
return this;
} | [
"Set the given column name to the given value.\n\n@param name The column name to set.\n@param value the value to set.\n@return {@code this}\n@throws IllegalArgumentException if a column name does not exist in the table."
] | [
"Use this API to fetch all the callhome resources that are configured on netscaler.",
"This method writes extended attribute data for an assignment.\n\n@param xml MSPDI assignment\n@param mpx MPXJ assignment",
"Creates a style definition used for the body element.\n@return The body style definition.",
"Shows the given step.\n\n@param step the step",
"This method is called to alert project listeners to the fact that\na calendar has been read from a project file.\n\n@param calendar calendar instance",
"Sets the lower limits for the \"moving\" body rotation relative to joint point.\n\n@param limitX the X axis lower rotation limit (in radians)\n@param limitY the Y axis lower rotation limit (in radians)\n@param limitZ the Z axis lower rotation limit (in radians)",
"Interim and final clusters ought to have same partition counts, same\nzones, and same node state. Partitions per node may of course differ.\n\n@param interimCluster\n@param finalCluster",
"Reset a timer of the given string name for the given thread. If no such\ntimer exists yet, then it will be newly created.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@param threadId\nof the thread to track, or 0 if only system clock should be\ntracked",
"Access the customInfo of a message using this accessor. The CustomInfo\nmap will be automatically created and stored in the event if it is not yet present\n\n@param message\n@return"
] |
private void initFieldFactories() {
if (m_model.hasMasterMode()) {
TranslateTableFieldFactory masterFieldFactory = new CmsMessageBundleEditorTypes.TranslateTableFieldFactory(
m_table,
m_model.getEditableColumns(CmsMessageBundleEditorTypes.EditMode.MASTER));
masterFieldFactory.registerKeyChangeListener(this);
m_fieldFactories.put(CmsMessageBundleEditorTypes.EditMode.MASTER, masterFieldFactory);
}
TranslateTableFieldFactory defaultFieldFactory = new CmsMessageBundleEditorTypes.TranslateTableFieldFactory(
m_table,
m_model.getEditableColumns(CmsMessageBundleEditorTypes.EditMode.DEFAULT));
defaultFieldFactory.registerKeyChangeListener(this);
m_fieldFactories.put(CmsMessageBundleEditorTypes.EditMode.DEFAULT, defaultFieldFactory);
} | [
"Initialize the field factories for the messages table."
] | [
"Read data for an individual task from the tables in a PEP file.\n\n@param parent parent task\n@param id task ID\n@return task instance",
"Create an info object from an authscope object.\n\n@param authscope the authscope",
"Set the specific device class of the node.\n@param specificDeviceClass the specificDeviceClass to set\n@exception IllegalArgumentException thrown when the specific device class does not match\nthe generic device class.",
"Add a mapping of properties between two beans\n\n@param beanToBeanMapping",
"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",
"Get the permission information for the specified photo.\n\nThis method requires authentication with 'read' permission.\n\n@param photoId\nThe photo id\n@return The Permissions object\n@throws FlickrException",
"Returns the first 24 photos for a given tag cluster.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param tag\n@param clusterId\n@return PhotoList\n@throws FlickrException",
"Parse a string representation of an Integer value.\n\n@param value string representation\n@return Integer value",
"Promote a module in the Grapes server\n\n@param name\n@param version\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException"
] |
public static Expression type(String lhs, Type rhs) {
return new Expression(lhs, "$type", rhs.toString());
} | [
"Check the document field's type\nand object\n@param lhs The field to check\n@param rhs The type\n@return Expression: lhs $type rhs"
] | [
"Combines adjacent blocks of the same type.",
"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.",
"Searches the variables layers, top to bottom, for the iterable having all of it's items of the given type. Return\nnull if not found.",
"Compares two double values up to some delta.\n\n@param a\n@param b\n@param delta\n@return The value 0 if a equals b, a value greater than 0 if if a > b, and a value less than 0 if a < b.",
"Make an individual Datum out of the data list info, focused at position\nloc.\n@param info A List of WordInfo objects\n@param loc The position in the info list to focus feature creation on\n@param featureFactory The factory that constructs features out of the item\n@return A Datum (BasicDatum) representing this data instance",
"Returns the value of an option, or the default if the value is null or the key is not part of the map.\n@param configOptions the map with the config options.\n@param optionKey the option to get the value of\n@param defaultValue the default value to return if the option is not set.\n@return the value of an option, or the default if the value is null or the key is not part of the map.",
"Adds a logical operator block.\n\n@param list parent criteria list\n@param block current block\n@param operator logical operator represented by this block",
"Sets an attribute in the main section of the manifest.\n\n@param name the attribute's name\n@param value the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods.",
"Send a master handoff yield response to all registered listeners.\n\n@param fromPlayer the device number that is responding to our request that it yield the tempo master role to us\n@param yielded will be {@code true} if we should now be the tempo master"
] |
public Map<String, CmsCategory> getReadCategory() {
if (null == m_categories) {
m_categories = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {
public Object transform(Object categoryPath) {
try {
CmsCategoryService catService = CmsCategoryService.getInstance();
return catService.localizeCategory(
m_cms,
catService.readCategory(m_cms, (String)categoryPath, getRequestContext().getUri()),
m_cms.getRequestContext().getLocale());
} catch (CmsException e) {
LOG.warn(e.getLocalizedMessage(), e);
return null;
}
}
});
}
return m_categories;
} | [
"Transforms the category path of a category to the category.\n@return a map from root or site path to category."
] | [
"The way calendars are stored in an MSPDI file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and now in this method we can convert those\nID values into the correct names.\n\n@param baseCalendars list of calendars and base calendar IDs\n@param map map of calendar ID values and calendar objects",
"An endpoint to compile an array of soy templates to JavaScript.\n\nThis endpoint is a preferred way of compiling soy templates to JavaScript but it requires a user to compose a url\non their own or using a helper class TemplateUrlComposer, which calculates checksum of a file and puts this in url\nso that whenever a file changes, after a deployment a JavaScript, url changes and a new hash is appended to url, which enforces\ngetting of new compiles JavaScript resource.\n\nInvocation of this url may throw two types of http exceptions:\n1. notFound - usually when a TemplateResolver cannot find a template with an associated name\n2. error - usually when there is a permission error and a user is not allowed to compile a template into a JavaScript\n\n@param hash - some unique number that should be used when we are caching this resource in a browser and we use http cache headers\n@param templateFileNames - an array of template names, e.g. client-words,server-time, which may or may not contain extension\ncurrently three modes are supported - soy extension, js extension and no extension, which is preferred\n@param disableProcessors - whether the controller should run registered outputProcessors after the compilation is complete.\n@param request - HttpServletRequest\n@param locale - locale\n@return response entity, which wraps a compiled soy to JavaScript files.\n@throws IOException - io error",
"Use this API to delete appfwjsoncontenttype resources of given names.",
"Joins the given ints using the given separator into a single string.\n\n@return the joined string or an empty string if the int array is null",
"Request a scoped transactional token for a particular resource.\n@param accessToken application access token.\n@param scope scope of transactional token.\n@param resource resource transactional token has access to.\n@return a BoxAPIConnection which can be used to perform transactional requests.",
"Transfer the ownership of an application to another user.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param to Username of the person to transfer the app to. This is usually in the form of \"[email protected]\".",
"Calculate matrix exponential of a square matrix.\n\nA scaled Pade approximation algorithm is used.\nThe algorithm has been directly translated from Golub & Van Loan \"Matrix Computations\",\nalgorithm 11.3.1. Special Horner techniques from 11.2 are also used to minimize the number\nof matrix multiplications.\n\n@param A square matrix\n@return matrix exponential of A",
"Use this API to unset the properties of callhome resource.\nProperties that need to be unset are specified in args array.",
"Delete a file ignoring failures.\n\n@param file file to delete"
] |
public <T extends CanvasWriter> T getWriter(Class<T> type, OauthToken oauthToken, Boolean serializeNulls) {
LOG.debug("Factory call to instantiate class: " + type.getName());
RestClient restClient = new RefreshingRestClient();
@SuppressWarnings("unchecked")
Class<T> concreteClass = (Class<T>) writerMap.get(type);
if (concreteClass == null) {
throw new UnsupportedOperationException("No implementation for requested interface found: " + type.getName());
}
LOG.debug("got writer class: " + concreteClass);
try {
Constructor<T> constructor = concreteClass.getConstructor(String.class, Integer.class, OauthToken.class,
RestClient.class, Integer.TYPE, Integer.TYPE, Integer.class, Boolean.class);
return constructor.newInstance(canvasBaseUrl, CANVAS_API_VERSION, oauthToken, restClient,
connectTimeout, readTimeout, null, serializeNulls);
} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException e) {
throw new UnsupportedOperationException("Unknown error instantiating the concrete API class: " + type.getName(), e);
}
} | [
"Get a writer implementation to push data into Canvas while being able to control the behavior of blank values.\nIf the serializeNulls parameter is set to true, this writer will serialize null fields in the JSON being\nsent to Canvas. This is required if you want to explicitly blank out a value that is currently set to something.\n@param type Interface type you wish to get an implementation for\n@param oauthToken An OAuth token to use for authentication when making API calls\n@param serializeNulls Whether or not to include null fields in the serialized JSON. Defaults to false if null\n@param <T> A writer implementation\n@return An instantiated instance of the requested writer type"
] | [
"Utility function that converts a list to a map.\n\n@param list The list in which even elements are keys and odd elements are\nvalues.\n@rturn The map container that maps even elements to odd elements, e.g.\n0->1, 2->3, etc.",
"Use this API to fetch filtered set of lbvserver resources.\nset the filter parameter values in filtervalue object.",
"Determine the enum value corresponding to the track source slot found in the packet.\n\n@return the proper value",
"Pops the top of the stack of active elements if the current position in the call stack corresponds to the one\nthat pushed the active elements.\n\n<p>This method does not do any type checks, so take care to retrieve the elements with the same types used to push\nto them onto the stack.\n\n@param <T> the type of the elements\n\n@return the active elements or null if the current call stack did not push any active elements onto the stack",
"Retrieve the jdbc type for the field descriptor that is related\nto this argument.",
"Gets the crouton's layout parameters, constructing a default if necessary.\n\n@return the layout parameters",
"Sets the maximum time to wait before a call to getConnection is timed out.\n\nSetting this to zero is similar to setting it to Long.MAX_VALUE\n\n@param connectionTimeout\n@param timeUnit the unit of the connectionTimeout argument",
"Scales the brightness of a pixel.",
"Check that a list allowing null and empty item contains at least one element that is\nnot blank.\n@param list can't be null\n@return"
] |
public static <T> List<T> sortWith(Iterable<T> iterable, Comparator<? super T> comparator) {
return ListExtensions.sortInplace(Lists.newArrayList(iterable), comparator);
} | [
"Creates a sorted list that contains the items of the given iterable. The resulting list is sorted according to\nthe order induced by the specified comparator.\n\n@param iterable\nthe items to be sorted. May not be <code>null</code>.\n@param comparator\nthe comparator to be used. May be <code>null</code> to indicate that the natural ordering of the\nelements should be used.\n@return a sorted list as a shallow copy of the given iterable.\n@see Collections#sort(List, Comparator)\n@see #sort(Iterable)\n@see #sortBy(Iterable, org.eclipse.xtext.xbase.lib.Functions.Function1)\n@see ListExtensions#sortInplace(List, Comparator)\n@since 2.7"
] | [
"Within a single zone, tries swapping some minimum number of random\npartitions per node with some minimum number of random partitions from\nother nodes within the zone. Chooses the best swap in each iteration.\nLarge values of the greedSwapMaxPartitions... arguments make this method\nequivalent to comparing every possible swap. This is very expensive.\n\nNormal case should be :\n\n#zones X #nodes/zone X max partitions/node X max partitions/zone\n\n@param nextCandidateCluster cluster object.\n@param greedyAttempts See RebalanceCLI.\n@param greedySwapMaxPartitionsPerNode See RebalanceCLI.\n@param greedySwapMaxPartitionsPerZone See RebalanceCLI.\n@param greedySwapZoneIds The set of zoneIds to consider. Each zone is done\nindependently.\n@param storeDefs\n@return updated cluster",
"Internal method for recursivly searching for a class descriptor that avoids\nclass loading when we already have a class object.\n\n@param clazz The class whose descriptor we need to find\n@return ClassDescriptor for <code>clazz</code> or <code>null</code>\nif no ClassDescriptor could be located.",
"Read the given source byte array, then overwrite this buffer's contents\n\n@param src source byte array\n@param srcOffset offset in source byte array to read from\n@param destOffset offset in this buffer to read to\n@param length max number of bytes to read\n@return the number of bytes read",
"Make a sort order for use in a query.",
"Adjusts beforeIndex to account for the possibility that the given widget is\nalready a child of this panel.\n\n@param child the widget that might be an existing child\n@param beforeIndex the index at which it will be added to this panel\n@return the modified index",
"Get the PropertyDescriptor for aClass and aPropertyName",
"Creates the row key of the given association row; columns present in the given association key will be obtained\nfrom there, all other columns from the given native association row.",
"Use this API to fetch dnsview_binding resource of given name .",
"Method to build Integration Flow for Mail. Suppress Warnings for\nMailInboundChannelAdapterSpec.\n@return Integration Flow object for Mail Source"
] |
public static double[] getTileLayerSize(TileCode code, Envelope maxExtent, double scale) {
double div = Math.pow(2, code.getTileLevel());
double tileWidth = Math.ceil((scale * maxExtent.getWidth()) / div) / scale;
double tileHeight = Math.ceil((scale * maxExtent.getHeight()) / div) / scale;
return new double[] { tileWidth, tileHeight };
} | [
"Calculates the tiles width and height.\n\n@param code\nThe unique tile code. Determines what tile we're talking about.\n@param maxExtent\nThe maximum extent of the grid to which this tile belongs.\n@param scale\nThe current client side scale.\n@return Returns an array of double values where the first value is the tile width and the second value is the\ntile height."
] | [
"Creates a sorted list that contains the items of the given iterable. The resulting list is in ascending order,\naccording to the natural ordering of the elements in the iterable.\n\n@param iterable\nthe items to be sorted. May not be <code>null</code>.\n@return a sorted list as a shallow copy of the given iterable.\n@see Collections#sort(List)\n@see #sort(Iterable, Comparator)\n@see #sortBy(Iterable, org.eclipse.xtext.xbase.lib.Functions.Function1)\n@see ListExtensions#sortInplace(List)",
"For internal use! This method creates real new PB instances",
"Release all memory addresses taken by this allocator.\nBe careful in using this method, since all of the memory addresses become invalid.",
"Seeks to the given season within the given year\n\n@param seasonString\n@param yearString",
"Extracts the last revision id from the JSON response returned\nby the API after an edit\n\n@param response\nthe response as returned by Mediawiki\n@return\nthe new revision id of the edited entity\n@throws JsonMappingException",
"Print time unit.\n\n@param value TimeUnit instance\n@return time unit value",
"Sinc function.\n\n@param x Value.\n@return Sinc of the value.",
"Adds a collection of listeners to the current project.\n\n@param listeners collection of listeners",
"Get log file\n\n@return log file"
] |
public static void setQuota(final GreenMailUser user, final Quota quota) {
Session session = GreenMailUtil.getSession(ServerSetupTest.IMAP);
try {
Store store = session.getStore("imap");
store.connect(user.getEmail(), user.getPassword());
try {
((QuotaAwareStore) store).setQuota(quota);
} finally {
store.close();
}
} catch (Exception ex) {
throw new IllegalStateException("Can not set quota " + quota
+ " for user " + user, ex);
}
} | [
"Sets a quota for a users.\n\n@param user the user.\n@param quota the quota."
] | [
"Calculate where within the beat grid array the information for the specified beat can be found.\nYes, this is a super simple calculation; the main point of the method is to provide a nice exception\nwhen the beat is out of bounds.\n\n@param beatNumber the beat desired\n\n@return the offset of the start of our cache arrays for information about that beat",
"Retrieve list of assignment extended attributes.\n\n@return list of extended attributes",
"Returns the average event value in the current interval",
"Serialize a content into a targeted file, checking that the parent directory exists.\n\n@param folder File\n@param content String\n@param fileName String",
"Issue the database statements to create the table associated with a table configuration.\n\n@param connectionSource\nconnectionSource Associated connection source.\n@param tableConfig\nHand or spring wired table configuration. If null then the class must have {@link DatabaseField}\nannotations.\n@return The number of statements executed to do so.",
"Sets the fieldConversion.\n@param fieldConversionClassName The fieldConversion to set",
"Returns a new intern odmg-transaction for the current database.",
"Gets an iterable of all the assignments of this task.\n@param fields the fields to retrieve.\n@return an iterable containing info about all the assignments.",
"Applies this patch to a JSON value.\n\n@param node the value to apply the patch to\n@return the patched JSON value\n@throws JsonPatchException failed to apply patch\n@throws NullPointerException input is null"
] |
public static base_responses update(nitro_service client, nspbr6 resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
nspbr6 updateresources[] = new nspbr6[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new nspbr6();
updateresources[i].name = resources[i].name;
updateresources[i].action = resources[i].action;
updateresources[i].srcipv6 = resources[i].srcipv6;
updateresources[i].srcipop = resources[i].srcipop;
updateresources[i].srcipv6val = resources[i].srcipv6val;
updateresources[i].srcport = resources[i].srcport;
updateresources[i].srcportop = resources[i].srcportop;
updateresources[i].srcportval = resources[i].srcportval;
updateresources[i].destipv6 = resources[i].destipv6;
updateresources[i].destipop = resources[i].destipop;
updateresources[i].destipv6val = resources[i].destipv6val;
updateresources[i].destport = resources[i].destport;
updateresources[i].destportop = resources[i].destportop;
updateresources[i].destportval = resources[i].destportval;
updateresources[i].srcmac = resources[i].srcmac;
updateresources[i].protocol = resources[i].protocol;
updateresources[i].protocolnumber = resources[i].protocolnumber;
updateresources[i].vlan = resources[i].vlan;
updateresources[i].Interface = resources[i].Interface;
updateresources[i].priority = resources[i].priority;
updateresources[i].msr = resources[i].msr;
updateresources[i].monitor = resources[i].monitor;
updateresources[i].nexthop = resources[i].nexthop;
updateresources[i].nexthopval = resources[i].nexthopval;
updateresources[i].nexthopvlan = resources[i].nexthopvlan;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | [
"Use this API to update nspbr6 resources."
] | [
"Marshal the assertion as a JSON object.\n\n@param assertion the assertion to marshal",
"exposed only for tests",
"Put features in a tile. This will assure all features are only added in one tile. When a feature's unique tile\nis different from this one a link is added in the tile.\n\n@param tile\ntile to put features in\n@param maxTileExtent\nthe maximum tile extent\n@throws GeomajasException oops",
"Remove all the existing links of the Declaration.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration",
"From the set of classes a new set is built containing all indexed\nsubclasses, but removing then all subtypes of indexed entities.\n\n@param selection\n\n@return a new set of entities",
"Computes annualized seasonal adjustments from given monthly realized CPI values.\n\n@param realizedCPIValues An array of consecutive monthly CPI values (minimum size is 12*numberOfYearsToAverage))\n@param lastMonth The index of the last month in the sequence of realizedCPIValues (corresponding to the enums in <code>{@link java.time.Month}</code>).\n@param numberOfYearsToAverage The number of years to go back in the array of realizedCPIValues.\n@return Array of annualized seasonal adjustments, where [0] corresponds to the adjustment for from December to January.",
"Adds a redirect URL to the specified profile ID\n\n@param model\n@param profileId\n@param srcUrl\n@param destUrl\n@param hostHeader\n@return\n@throws Exception",
"This method returns the existing folder, and if it does not exist, the\nmethod generates it.\n\n@param path\n@param dest_dir\n@return the folder\n@throws BeastException",
"Add exceptions to the calendar.\n\n@param mpxjCalendar MPXJ calendar\n@param gpCalendar GanttProject calendar"
] |
public String getScopes() {
final StringBuilder sb = new StringBuilder();
for (final Scope scope : Scope.values()) {
sb.append(scope);
sb.append(", ");
}
final String scopes = sb.toString().trim();
return scopes.substring(0, scopes.length() - 1);
} | [
"Returns the comma separated list of available scopes\n\n@return String"
] | [
"The transaction will be executed with caching enabled. However, all newly cached values will be discarded as soon\nas the transaction is over.\n@since 2.1",
"Looks up the object from the cache\n\n@param oid The Identity to look up the object for\n@return The object if found, otherwise null",
"Get a handler based on its class\n@param clazz The class of the Handler to return.\nIf multiple Handlers exist, the first one is returned.\n@param <E> The class of the handler to return.\n@return The handler matching the class name.",
"Exports a single queue to an XML file.",
"Fill the attributes in the processor.\n\n@param processors The processors\n@param initialAttributes The attributes\n@see RequireAttributes\n@see ProvideAttributes",
"Performs a standard QR decomposition on the specified submatrix that is one block wide.\n\n@param blockLength\n@param Y\n@param gamma",
"Remove the given pair into the 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@param <K> type of the map keys.\n@param <V> type of the map values.\n@param map the map to update.\n@param entry the entry (key, value) to remove from the map.\n@return {@code true} if the pair was removed.\n@since 2.15",
"Propagate onNoPick events to listeners\n@param picker GVRPicker which generated the event",
"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."
] |
protected Method resolveTargetMethod(Message message,
FieldDescriptor payloadField) {
Method targetMethod = fieldToMethod.get(payloadField);
if (targetMethod == null) {
// look up and cache target method; this block is called only once
// per target method, so synchronized is ok
synchronized (this) {
targetMethod = fieldToMethod.get(payloadField);
if (targetMethod == null) {
String name = payloadField.getName();
for (Method method : service.getClass().getMethods()) {
if (method.getName().equals(name)) {
try {
method.setAccessible(true);
} catch (Exception ex) {
log.log(Level.SEVERE,"Error accessing RPC method",ex);
}
targetMethod = method;
fieldToMethod.put(payloadField, targetMethod);
break;
}
}
}
}
}
if (targetMethod != null) {
return targetMethod;
} else {
throw new RuntimeException("No matching method found by the name '"
+ payloadField.getName() + "'");
}
} | [
"Find out which method to call on the service bean."
] | [
"Build a stack trace for this path. This can be used in generating more meaningful exceptions\nwhile using Crawljax in conjunction with JUnit for example.\n\n@return a array of StackTraceElements denoting the steps taken by this path. The first\nelement [0] denotes the last {@link Eventable} on this path while the last item\ndenotes the first {@link Eventable} executed.",
"Use this API to Force hafailover.",
"Unregister the mgmt channel.\n\n@param old the proxy controller to unregister\n@param shuttingDown whether the server inventory is shutting down\n@return whether the registration can be removed from the domain-controller",
"Read an element which contains only a single list attribute of a given\ntype.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@param type the value type class\n@param <T> the value type\n@return the value list\n@throws javax.xml.stream.XMLStreamException if an error occurs or if the\nelement does not contain the specified attribute, contains other\nattributes, or contains child elements.",
"Add a '>' clause so the column must be greater-than the value.",
"Curries a function that takes three arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes two arguments. Never <code>null</code>.",
"Specify the method to instantiate objects\nrepresented by this descriptor.\n@see #setFactoryClass",
"Checks the preconditions for creating a new ForbidSubStr processor with a List of forbidden substrings.\n\n@param forbiddenSubStrings\nthe forbidden substrings\n@throws NullPointerException\nif forbiddenSubStrings is null\n@throws IllegalArgumentException\nif forbiddenSubStrings is empty",
"Writes the data collected about properties to a file."
] |
public static boolean changeHost(String hostName,
boolean enable,
boolean disable,
boolean remove,
boolean isEnabled,
boolean exists) throws Exception {
// Open the file that is the first
// command line parameter
File hostsFile = new File("/etc/hosts");
FileInputStream fstream = new FileInputStream("/etc/hosts");
File outFile = null;
BufferedWriter bw = null;
// only do file output for destructive operations
if (!exists && !isEnabled) {
outFile = File.createTempFile("HostsEdit", ".tmp");
bw = new BufferedWriter(new FileWriter(outFile));
System.out.println("File name: " + outFile.getPath());
}
// Get the object of DataInputStream
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String strLine;
boolean foundHost = false;
boolean hostEnabled = false;
/*
* Group 1 - possible commented out host entry
* Group 2 - destination address
* Group 3 - host name
* Group 4 - everything else
*/
Pattern pattern = Pattern.compile("\\s*(#?)\\s*([^\\s]+)\\s*([^\\s]+)(.*)");
while ((strLine = br.readLine()) != null) {
Matcher matcher = pattern.matcher(strLine);
// if there is a match to the pattern and the host name is the same as the one we want to set
if (matcher.find() &&
matcher.group(3).toLowerCase().compareTo(hostName.toLowerCase()) == 0) {
foundHost = true;
if (remove) {
// skip this line altogether
continue;
} else if (enable) {
// we will disregard group 2 and just set it to 127.0.0.1
if (!exists && !isEnabled)
bw.write("127.0.0.1 " + matcher.group(3) + matcher.group(4));
} else if (disable) {
if (!exists && !isEnabled)
bw.write("# " + matcher.group(2) + " " + matcher.group(3) + matcher.group(4));
} else if (isEnabled && matcher.group(1).compareTo("") == 0) {
// host exists and there is no # before it
hostEnabled = true;
}
} else {
// just write the line back out
if (!exists && !isEnabled)
bw.write(strLine);
}
if (!exists && !isEnabled)
bw.write('\n');
}
// if we didn't find the host in the file but need to enable it
if (!foundHost && enable) {
// write a new host entry
if (!exists && !isEnabled)
bw.write("127.0.0.1 " + hostName + '\n');
}
// Close the input stream
in.close();
if (!exists && !isEnabled) {
bw.close();
outFile.renameTo(hostsFile);
}
// return false if the host wasn't found
if (exists && !foundHost)
return false;
// return false if the host wasn't enabled
if (isEnabled && !hostEnabled)
return false;
return true;
} | [
"Only one boolean param should be true at a time for this function to return the proper results\n\n@param hostName\n@param enable\n@param disable\n@param remove\n@param isEnabled\n@param exists\n@return\n@throws Exception"
] | [
"Re-Tag the websocket connection hold by this context with label specified.\nThis method will remove all previous tags on the websocket connection and then\ntag it with the new label.\n@param label the label.\n@return this websocket conext.",
"Given a file name and read-only storage format, tells whether the file\nname format is correct\n\n@param fileName The name of the file\n@param format The RO format\n@return true if file format is correct, else false",
"Finds all variables in the context with the given names, and also attaches all WindupFreeMarkerMethods from all addons into the map.\n\nThis allows external addons to extend the capabilities in the freemarker reporting system.",
"Shuffle an array.\n\n@param array Array.\n@param seed Random seed.",
"Filter everything until we found the first NL character.",
"A variant of the gamma function.\n@param a the number to apply gain to\n@param b the gain parameter. 0.5 means no change, smaller values reduce gain, larger values increase gain.\n@return the output value",
"Create a unique signature for this shader.\nThe signature for simple shaders is just the class name.\nFor the more complex shaders generated by GVRShaderTemplate\nthe signature includes information about the vertex attributes,\nuniforms, textures and lights used by the shader variant.\n\n@param defined\nnames to be defined for this shader\n@return string signature for shader\n@see GVRShaderTemplate",
"Replace HTML entities\n@param content Content\n@param map Map\n@return Replaced content",
"Render a zero Double as null.\n\n@param value double value\n@return null if the double value is zero"
] |
public static int Mod(int x, int m) {
if (m < 0) m = -m;
int r = x % m;
return r < 0 ? r + m : r;
} | [
"Gets the proper modulus operation.\n\n@param x Integer.\n@param m Modulo.\n@return Modulus."
] | [
"Adds new connections to the partition.\n@param connectionsToCreate number of connections to create\n@throws InterruptedException",
"Add statistics about sent emails.\n\n@param recipients The list of recipients.\n@param storageUsed If a remote storage was used.",
"Return the TransactionManager of the external app",
"Use this API to fetch authenticationtacacspolicy_authenticationvserver_binding resources of given name .",
"Vend a SessionVar with the function to create the default value",
"Adds a value to the list if does not already exists.\n\n@param list the list\n@param value value to add if not exists in the list",
"Create an executable jar to generate the report. Created jar contains only\nallure configuration file.",
"Get the element at the index as a json object.\n\n@param i the index of the object to access",
"Handles logging tasks related to a failure to connect to a remote HC.\n@param uri the URI at which the connection attempt was made. Can be {@code null} indicating a failure to discover the HC\n@param discoveryOption the {@code DiscoveryOption} used to determine {@code uri}\n@param moreOptions {@code true} if there are more untried discovery options\n@param e the exception"
] |
public void setTargetTranslator(TargetTranslator targetTranslator) {
if(targetTranslator!=null){
this.targetTranslator = targetTranslator;
this.charTranslator = null;
this.htmlElementTranslator = null;
}
} | [
"Sets the target translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator"
] | [
"Use this API to update dbdbprofile.",
"Use this API to fetch aaauser_aaagroup_binding resources of given name .",
"Adds a submodule to the module.\n\n<P>\nINFO: If the module is promoted, all added submodule will be promoted.\n\n@param submodule Module",
"Creates the udpClient with proper handler.\n\n@return the bound request builder\n@throws HttpRequestCreateException\nthe http request create exception",
"Awaits at most 5 minutes until all pods meets the given predicate.\n\n@param filter used to wait to detect that a pod is up and running.",
"Gets Widget bounds depth\n@return depth",
"The user can be referenced by their globally unique user ID or their email address.\nReturns the full user record for the invited user.\n\n@param workspace The workspace or organization to invite the user to.\n@return Request object",
"binds the objects primary key and locking values to the statement, BRJ",
"Converts an object to an instance of the target type.\n\n@param mapper the object mapper\n@param source the source to convert\n@param targetType the target class type\n@return target instance\n@see SquigglyUtils#objectify(ObjectMapper, Object, Class)"
] |
public static dospolicy get(nitro_service service, String name) throws Exception{
dospolicy obj = new dospolicy();
obj.set_name(name);
dospolicy response = (dospolicy) obj.get_resource(service);
return response;
} | [
"Use this API to fetch dospolicy resource of given name ."
] | [
"Attribute name and value are not escaped or modified in any way.\n\n@param name\n@param value\n@return self",
"Creates a XopBean. The image on the disk is included as a byte array,\na DataHandler and java.awt.Image\n@return the bean\n@throws Exception",
"Extracts out a matrix from source given a sub matrix with arbitrary rows and columns specified in\ntwo array lists\n\n@param src Source matrix. Not modified.\n@param rows array of row indexes\n@param rowsSize maximum element in row array\n@param cols array of column indexes\n@param colsSize maximum element in column array\n@param dst output matrix. Must be correct shape.",
"Classify the contents of a file.\n\n@param filename\nContains the sentence(s) to be classified.\n@return {@link List} of classified List of IN.",
"Copy the settings from another calendar to this calendar.\n\n@param cal calendar data source",
"Sleeps if necessary to slow down the caller.\n\n@param eventsSeen Number of events seen since last invocation. Basis for\ndetermining whether its necessary to sleep.",
"ten less than Cube Q",
"2-D Integer array to double array.\n\n@param array Integer array.\n@return Double array.",
"Get viewport size along the axis\n@param axis {@link Axis}\n@return size"
] |
public void bindScriptBundleToScene(GVRScriptBundle scriptBundle, GVRScene scene) throws IOException, GVRScriptException {
for (GVRSceneObject sceneObject : scene.getSceneObjects()) {
bindBundleToSceneObject(scriptBundle, sceneObject);
}
} | [
"Binds a script bundle to a scene.\n@param scriptBundle\nThe {@code GVRScriptBundle} object containing script binding information.\n@param scene\nThe scene to bind to.\n@throws IOException if script bundle file cannot be read.\n@throws GVRScriptException if script processing error occurs."
] | [
"Creates an endpoint reference from a given adress.\n@param address\n@param props\n@return",
"Tries to load a the bundle for a given locale, also loads the backup\nlocales with the same language.\n\n@param baseName the raw bundle name, without locale qualifiers\n@param locale the locale\n@param wantBase whether a resource bundle made only from the base name\n(with no locale information attached) should be returned.\n@return the resource bundle if it was loaded, otherwise the backup",
"Sets the top padding for all cells in the table.\n@param paddingTop new padding, ignored if smaller than 0\n@return this to allow chaining",
"checks whether the specified Object obj is read-locked by Transaction tx.\n@param tx the transaction\n@param obj the Object to be checked\n@return true if lock exists, else false",
"Counts the number of lines.\n\n@param str the input string\n@return Returns the number of lines terminated by '\\n' in string",
"Use this API to fetch all the vridparam resources that are configured on netscaler.",
"Obtain the ID associated with a profile name\n\n@param profileName profile name\n@return ID of profile",
"Use this API to fetch all the dnsview resources that are configured on netscaler.",
"detect if WS Addressing feature already enabled.\n\n@param provider the interceptor provider\n@param bus the bus\n@return true, if successful"
] |
private synchronized Client allocateClient(int targetPlayer, String description) throws IOException {
Client result = openClients.get(targetPlayer);
if (result == null) {
// We need to open a new connection.
final DeviceAnnouncement deviceAnnouncement = DeviceFinder.getInstance().getLatestAnnouncementFrom(targetPlayer);
if (deviceAnnouncement == null) {
throw new IllegalStateException("Player " + targetPlayer + " could not be found " + description);
}
final int dbServerPort = getPlayerDBServerPort(targetPlayer);
if (dbServerPort < 0) {
throw new IllegalStateException("Player " + targetPlayer + " does not have a db server " + description);
}
final byte posingAsPlayerNumber = (byte) chooseAskingPlayerNumber(targetPlayer);
Socket socket = null;
try {
InetSocketAddress address = new InetSocketAddress(deviceAnnouncement.getAddress(), dbServerPort);
socket = new Socket();
socket.connect(address, socketTimeout.get());
socket.setSoTimeout(socketTimeout.get());
result = new Client(socket, targetPlayer, posingAsPlayerNumber);
} catch (IOException e) {
try {
socket.close();
} catch (IOException e2) {
logger.error("Problem closing socket for failed client creation attempt " + description);
}
throw e;
}
openClients.put(targetPlayer, result);
useCounts.put(result, 0);
}
useCounts.put(result, useCounts.get(result) + 1);
return result;
} | [
"Finds or opens a client to talk to the dbserver on the specified player, incrementing its use count.\n\n@param targetPlayer the player number whose database needs to be interacted with\n@param description a short description of the task being performed for error reporting if it fails,\nshould be a verb phrase like \"requesting track metadata\"\n\n@return the communication client for talking to that player, or {@code null} if the player could not be found\n\n@throws IllegalStateException if we can't find the target player or there is no suitable player number for us\nto pretend to be\n@throws IOException if there is a problem communicating"
] | [
"Create a new server group\n\n@param groupName name of server group\n@return Created ServerGroup",
"Gets string content from InputStream\n\n@param is InputStream to read\n@return InputStream content",
"Performs validation of the observer method for compliance with the specifications.",
"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",
"Given the comma separated list of properties as a string, splits it\nmultiple strings\n\n@param paramValue Concatenated string\n@param type Type of parameter ( to throw exception )\n@return List of string properties",
"Takes the specified object and converts the argument to a String.\n\n@param arg The object to convert\n@return A String representation of the argument.",
"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}",
"Returns the value of the indicated property of the current object on the specified level.\n\n@param level The level\n@param name The name of the property\n@return The property value",
"Initializes an annotation class\n\n@param name The name of the annotation class\n@return The instance of the annotation. Returns a dummy if the class was\nnot found"
] |
private String parseRssFeed(String feed) {
String[] result = feed.split("<br />");
String[] result2 = result[2].split("<BR />");
return result2[0];
} | [
"Parser for actual conditions\n\n@param feed\n@return"
] | [
"Export data base contents to a directory using supplied connection.\n\n@param connection database connection\n@param directory target directory\n@throws Exception",
"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",
"This filter adds rounded corners to the image using the specified color as the background.\n\n@param radiusInner amount of pixels to use as radius.\n@param radiusOuter specifies the second value for the ellipse used for the radius. Use 0 for\nno value.\n@param color fill color for clipped region.",
"Calls a function script associated with this component.\nThe function is called even if the component\nis not enabled and not attached to a scene object.\n@param funcName name of script function to call.\n@param args function parameters as an array of objects.\n@return true if function was called, false if no such function\n@see org.gearvrf.script.GVRScriptFile#invokeFunction(String, Object[]) invokeFunction",
"A loop driver for applying operations to all primary ClassNodes in\nour AST. Automatically skips units that have already been processed\nthrough the current phase.",
"Return a long value from a prepared query.",
"Convert a Planner date-time value into a Java date.\n\n20070222T080000Z\n\n@param value Planner date-time\n@return Java Date instance",
"Used to create a new retention policy with optional parameters.\n@param api the API connection to be used by the created user.\n@param name the name of the retention policy.\n@param type the type of the retention policy. Can be \"finite\" or \"indefinite\".\n@param length the duration in days that the retention policy will be active for after being assigned to content.\n@param action the disposition action can be \"permanently_delete\" or \"remove_retention\".\n@param optionalParams the optional parameters.\n@return the created retention policy's info.",
"Get the filters ImporterServiceFilter and ImportDeclarationFilter from the properties, stop the instance if one of.\nthem is invalid."
] |
private org.apache.tools.ant.types.Path addSlaveClasspath() {
org.apache.tools.ant.types.Path path = new org.apache.tools.ant.types.Path(getProject());
String [] REQUIRED_SLAVE_CLASSES = {
SlaveMain.class.getName(),
Strings.class.getName(),
MethodGlobFilter.class.getName(),
TeeOutputStream.class.getName()
};
for (String clazz : Arrays.asList(REQUIRED_SLAVE_CLASSES)) {
String resource = clazz.replace(".", "/") + ".class";
File f = LoaderUtils.getResourceSource(getClass().getClassLoader(), resource);
if (f != null) {
path.createPath().setLocation(f);
} else {
throw new BuildException("Could not locate classpath for resource: " + resource);
}
}
return path;
} | [
"Adds a classpath source which contains the given resource.\n\nTODO: [GH-213] this is extremely ugly; separate the code required to run on the\nforked JVM into an isolated bundle and either create it on-demand (in temp.\nfiles location?) or locate it in classpath somehow (in a portable way)."
] | [
"Use this API to fetch appfwprofile_cookieconsistency_binding resources of given name .",
"Obtain the name of the caller, most likely a user but could also be a remote process.\n\n@return The name of the caller.",
"Use this API to unset the properties of nsconfig resource.\nProperties that need to be unset are specified in args array.",
"Load the installation state based on the identity\n\n@param installedIdentity the installed identity\n@return the installation state\n@throws IOException",
"Use this API to fetch lbvserver_servicegroup_binding resources of given name .",
"Retrieve and validate the key from the REST request.\n\n@return true if present, false if missing",
"Builds a string that serializes a list of objects separated by the pipe\ncharacter. The toString methods are used to turn objects into strings.\nThis operation is commonly used to build parameter lists for API\nrequests.\n\n@param objects\nthe objects to implode\n@return string of imploded objects",
"If there is a zero on the diagonal element, the off diagonal element needs pushed\noff so that all the algorithms assumptions are two and so that it can split the matrix.",
"Create constant name.\n@param state STATE_UNCHANGED, STATE_CHANGED, STATE_NEW or STATE_DELETED.\n@return cconstanname as String"
] |
public boolean hasNullPKField(ClassDescriptor cld, Object obj)
{
FieldDescriptor[] fields = cld.getPkFields();
boolean hasNull = false;
// an unmaterialized proxy object can never have nullified PK's
IndirectionHandler handler = ProxyHelper.getIndirectionHandler(obj);
if(handler == null || handler.alreadyMaterialized())
{
if(handler != null) obj = handler.getRealSubject();
FieldDescriptor fld;
for(int i = 0; i < fields.length; i++)
{
fld = fields[i];
hasNull = representsNull(fld, fld.getPersistentField().get(obj));
if(hasNull) break;
}
}
return hasNull;
} | [
"Detect if the given object has a PK field represents a 'null' value."
] | [
"Sets a new config and clears the previous cache",
"Converts a date to an instance date bean.\n@return the instance date bean.",
"Runs calls in a background thread so that the results will actually be asynchronous.\n\n@see com.google.appengine.tools.cloudstorage.RawGcsService#continueObjectCreationAsync(\ncom.google.appengine.tools.cloudstorage.RawGcsService.RawGcsCreationToken,\njava.nio.ByteBuffer, long)",
"Report on the filtered data in DMR .",
"Plots the MSD curve with the trajectory t and adds the fitted model for anomalous diffusion above.\n@param t\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds\n@param timelag Elapsed time between two frames.\n@param a Exponent alpha of power law function\n@param D Diffusion coeffcient",
"Write exceptions in the format used by MSPDI files prior to Project 2007.\n\n@param dayList list of calendar days\n@param exceptions list of exceptions",
"Reverse how the transition is applied, such that the transition previously performed when progress=start of range is only performed when progress=end of range\n\n@return",
"Returns a value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@return the metadata property value.\n@deprecated Metadata#get() does not handle all possible metadata types; use Metadata#getValue() instead",
"Converts the given list of a type to paged list of a different type.\n\n@param list the list to convert to paged list\n@param mapper the mapper to map type in input list to output list\n@param <OutT> the type of items in output paged list\n@param <InT> the type of items in input paged list\n@return the paged list"
] |
public static String getBuildString() {
String versionString = "UNKNOWN";
Properties propeties = getProperites();
if(propeties != null) {
versionString = propeties.getProperty("finmath-lib.build");
}
return versionString;
} | [
"Return the build string of this instance of finmath-lib.\nCurrently this is the Git commit hash.\n\n@return The build string of this instance of finmath-lib."
] | [
"Find the index of this animation if it is in this animator.\n\n@param findme {@link GVRAnimation} to find.\n@returns 0 based index of animation or -1 if not found\n@see GVRAnimator#addAnimation(GVRAnimation)",
"Performs a transpose across block sub-matrices. Reduces\nthe number of cache misses on larger matrices.\n\n*NOTE* If this is beneficial is highly dependent on the computer it is run on. e.g:\n- Q6600 Almost twice as fast as standard.\n- Pentium-M Same speed and some times a bit slower than standard.\n\n@param A Original matrix. Not modified.\n@param A_tran Transposed matrix. Modified.\n@param blockLength Length of a block.",
"Add a custom Log Record Handler to the root of the tree\n@param handler The handler to add\n@return this",
"Returns a persistence strategy based on the passed configuration.\n\n@param cacheMapping the selected {@link org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType}\n@param externalCacheManager the infinispan cache manager\n@param configurationUrl the location of the configuration file\n@param jtaPlatform the {@link JtaPlatform}\n@param entityTypes the meta-data of the entities\n@param associationTypes the meta-data of the associations\n@param idSourceTypes the meta-data of the id generators\n@return the persistence strategy",
"Create a handful of default currencies to keep Primavera happy.",
"Checks if the InputStream have the text\n\n@param in InputStream to read\n@param text Text to check\n@return whether the inputstream has the text",
"Invokes the given configurator, obtaining the correct global context type via the datastore configuration type of\nthe current datastore provider.\n\n@param configurator the configurator to invoke\n@return a context object containing the options set via the given configurator",
"Add a file to notify the script that asked to stop the print that it is now done processing the remain\njobs.",
"This method is called by the ++ operator for the class CharSequence.\nIt increments the last character in the given CharSequence. If the last\ncharacter in the CharSequence is Character.MAX_VALUE a Character.MIN_VALUE\nwill be appended. The empty CharSequence is incremented to a string\nconsisting of the character Character.MIN_VALUE.\n\n@param self a CharSequence\n@return a value obtained by incrementing the toString() of the CharSequence\n@since 1.8.2"
] |
protected void prepForWrite(SelectionKey selectionKey) {
if(logger.isTraceEnabled())
traceInputBufferState("About to clear read buffer");
if(requestHandlerFactory.shareReadWriteBuffer() == false) {
inputStream.clear();
}
if(logger.isTraceEnabled())
traceInputBufferState("Cleared read buffer");
outputStream.getBuffer().flip();
selectionKey.interestOps(SelectionKey.OP_WRITE);
} | [
"Flips the output buffer, and lets the Selector know we're ready to write.\n\n@param selectionKey"
] | [
"Gets the matching beans for binding criteria from a list of beans\n\n@param resolvable the resolvable\n@return A set of filtered beans",
"Loads the given class, respecting the given classloader.\n@param clazz class to load\n@return Loaded class\n@throws ClassNotFoundException",
"Gets the date time str concise.\n\n@param d\nthe d\n@return the date time str concise",
"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 channel the channel\n@param startEndRecord the start of the end of central directory record\n@param endSig the end of central dir signature\n@return true if it can be confirmed that the end of directory record points to a central directory\nfile and a complete comment is present, false otherwise\n@throws java.io.IOException",
"Writes this IIMFile to writer.\n\n@param writer\nwriter to write to\n@throws IOException\nif file can't be written to",
"Returns the value of the identified field as a String.\n@param fieldName the name of the field\n@return the value of the field as a String",
"Utility method used to convert an arbitrary Number into an Integer.\n\n@param value Number instance\n@return Integer instance",
"Reverses all the TransitionControllers managed by this TransitionManager",
"Frees the temporary LOBs when an exception is raised in the application\nor when the LOBs are no longer needed. If the LOBs are not freed, the\nspace used by these LOBs are not reclaimed.\n@param clob CLOB-wrapper to free or null\n@param blob BLOB-wrapper to free or null"
] |
public String getUncPath() {
getUncPath0();
if( share == null ) {
return "\\\\" + url.getHost();
}
return "\\\\" + url.getHost() + canon.replace( '/', '\\' );
} | [
"Retuns the Windows UNC style path with backslashs intead of forward slashes.\n\n@return The UNC path."
] | [
"Use this API to add nsacl6.",
"Use this API to update transformpolicy.",
"Get the currently selected opacity.\n\n@return The int value of the currently selected opacity.",
"Removes the specified list of users from following the project, this will not affect project membership status.\nReturns the updated project record.\n\n@param project The project to remove followers from.\n@return Request object",
"Finds properties of datatype string on test.wikidata.org. Since the test\nsite changes all the time, we cannot hardcode a specific property here.\nInstead, we just look through all properties starting from P1 to find the\nfirst few properties of type string that have an English label. These\nproperties are used for testing in this code.\n\n@param connection\n@throws MediaWikiApiErrorException\n@throws IOException",
"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",
"Flushes all changes to disk.",
"Parses the input stream to read the header\n\n@param input data input to read from\n@return the parsed protocol header\n@throws IOException",
"Extracts a numeric id from a string, which can be either a Wikidata\nentity URI or a short entity or property id.\n\n@param idString\n@param isUri\n@return numeric id, or 0 if there was an error"
] |
public static base_response rename(nitro_service client, cmppolicylabel resource, String new_labelname) throws Exception {
cmppolicylabel renameresource = new cmppolicylabel();
renameresource.labelname = resource.labelname;
return renameresource.rename_resource(client,new_labelname);
} | [
"Use this API to rename a cmppolicylabel resource."
] | [
"Checks to see if the two matrices are inverses of each other.\n\n@param a A matrix. Not modified.\n@param b A matrix. Not modified.",
"Lift a Java Callable to a Scala Function0\n\n@param f the function to lift\n\n@returns the Scala function",
"Throw IllegalArgumentException if the value is null.\n\n@param name the parameter name.\n@param value the value that should not be null.\n@param <T> the value type.\n@throws IllegalArgumentException if value is null.",
"Associate the specified value with the specified key in this map.\nIf the map previously contained a mapping for this key, the old\nvalue is replaced and returned.\n\n@param key the key with which the value is to be associated\n@param value the value to be associated with this key\n@return the value previously mapped to the key, or null",
"of the unbound provider (",
"Get the active overrides with parameters and the active server group for a client\n\n@param profileID Id of profile to get configuration for\n@param clientUUID Client Id to export configuration\n@return SingleProfileBackup containing active overrides and active server group\n@throws Exception exception",
"Return the first header value for the given header name, if any.\n@param headerName the header name\n@return the first header value, or {@code null} if none",
"Normalizes elements in 'u' by dividing by max and computes the norm2 of the normalized\narray u. Adjust the sign of the returned value depending on the size of the first\nelement in 'u'. Normalization is done to avoid overflow.\n\n<pre>\nfor i=j:numRows\nu[i] = u[i] / max\ntau = tau + u[i]*u[i]\nend\ntau = sqrt(tau)\nif( u[j] < 0 )\ntau = -tau;\n</pre>\n\n@param j Element in 'u' that it starts at.\n@param numRows Element in 'u' that it stops at.\n@param u Array\n@param max Max value in 'u' that is used to normalize it.\n@return norm2 of 'u'",
"This produces a string with no compressed segments and all segments of full length,\nwhich is 4 characters for IPv6 segments and 3 characters for IPv4 segments."
] |
public int addServerRedirectToProfile(String region, String srcUrl, String destUrl, String hostHeader,
int profileId, int clientId) throws Exception {
int serverId = -1;
try {
Client client = ClientService.getInstance().getClient(clientId);
serverId = addServerRedirect(region, srcUrl, destUrl, hostHeader, profileId, client.getActiveServerGroup());
} catch (Exception e) {
e.printStackTrace();
}
return serverId;
} | [
"Add server redirect to a profile, using current active ServerGroup\n\n@param region region\n@param srcUrl source URL\n@param destUrl destination URL\n@param hostHeader host header\n@param profileId profile ID\n@return ID of added ServerRedirect\n@throws Exception exception"
] | [
"Read a list of fixed sized blocks from the input stream.\n\n@return List of MapRow instances representing the fixed size blocks",
"Use this API to fetch all the vrid6 resources that are configured on netscaler.",
"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.",
"Adds a clause that checks whether ANY set bits in a bitmask are present\nin a numeric expression.\n\n@param expr\nSQL numeric expression to check.\n@param bits\nInteger containing the bits for which to check.",
"Read calendar data.",
"checkpoint the transaction",
"Gets as many of the requested bytes as available from this buffer.\n\n@return number of bytes actually got from this buffer (0 if no bytes are available)",
"Add an appender to Logback logging framework that will track the types of log messages made.",
"Generate a sql where-clause matching the contraints defined by the array of fields\n\n@param columns array containing all columns used in WHERE clause"
] |
public static Set<Annotation> filterInterceptorBindings(BeanManagerImpl beanManager, Collection<Annotation> annotations) {
Set<Annotation> interceptorBindings = new InterceptorBindingSet(beanManager);
for (Annotation annotation : annotations) {
if (beanManager.isInterceptorBinding(annotation.annotationType())) {
interceptorBindings.add(annotation);
}
}
return interceptorBindings;
} | [
"Extracts a set of interceptor bindings from a collection of annotations.\n@param beanManager\n@param annotations\n@return"
] | [
"Serializes any char sequence and writes it into specified buffer.",
"Use this API to delete nsip6 resources of given names.",
"Use this API to add clusternodegroup resources.",
"Method called when the renderer is going to be created. This method has the responsibility of\ninflate the xml layout using the layoutInflater and the parent ViewGroup, set itself to the\ntag and call setUpView and hookListeners methods.\n\n@param content to render. If you are using Renderers with RecyclerView widget the content will\nbe null in this method.\n@param layoutInflater used to inflate the view.\n@param parent used to inflate the view.",
"Makes an spatial shape representing the time range defined by the two specified dates.\n\n@param from the start {@link Date}\n@param to the end {@link Date}\n@return a shape",
"User-initiated commands use this method.\n\n@param command The CLI command\n@return A Response object containing the command line, DMR request, and DMR response\n@throws CommandFormatException\n@throws IOException",
"Returns the project membership record.\n\n@param projectMembership Globally unique identifier for the project membership.\n@return Request object",
"Registers Jersey HeaderDelegateProviders for the specified TinyTypes.\n\n@param head a TinyType\n@param tail other TinyTypes\n@throws IllegalArgumentException when a non-TinyType is given",
"Access an attribute.\n\n@param type the attribute's type, not {@code null}\n@param key the attribute's key, not {@code null}\n@return the attribute value, or {@code null}."
] |
public void recordServerGroupResult(final String serverGroup, final boolean failed) {
synchronized (this) {
if (groups.contains(serverGroup)) {
responseCount++;
if (failed) {
this.failed = true;
}
DomainControllerLogger.HOST_CONTROLLER_LOGGER.tracef("Recorded group result for '%s': failed = %s",
serverGroup, failed);
notifyAll();
}
else {
throw DomainControllerLogger.HOST_CONTROLLER_LOGGER.unknownServerGroup(serverGroup);
}
}
} | [
"Records the result of updating a server group.\n\n@param serverGroup the server group's name. Cannot be <code>null</code>\n@param failed <code>true</code> if the server group update failed;\n<code>false</code> if it succeeded"
] | [
"Complete timing the operation with the given identifier. If you had not previously started a timing operation with this identifier, then this\nwill effectively be a noop.",
"Use this API to fetch dbdbprofile resource of given name .",
"Print rate.\n\n@param rate Rate instance\n@return rate value",
"Calculate the duration percent complete.\n\n@param row task data\n@return percent complete",
"Scroll to the specific position\n@param position\n@return the new current item after the scrolling processed.",
"Return fallback if first string is null or empty",
"Inserts a marshalled endpoint reference to a given DOM tree rooted by parent.\n@param wsAddr\n@param parent\n@throws ServiceLocatorException",
"Reads a string of two byte characters from the input array.\nThis method assumes that the string finishes either at the\nend of the array, or when char zero is encountered.\nThe value starts at the position specified by the offset\nparameter.\n\n@param data byte array of data\n@param offset start point of unicode string\n@return string value",
"Open the store with the version directory specified. If null is specified\nwe open the directory with the maximum version\n\n@param versionDir Version Directory to open. If null, we open the max\nversioned / latest directory"
] |
public static vpnclientlessaccesspolicy[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
vpnclientlessaccesspolicy obj = new vpnclientlessaccesspolicy();
options option = new options();
option.set_filter(filter);
vpnclientlessaccesspolicy[] response = (vpnclientlessaccesspolicy[]) obj.getfiltered(service, option);
return response;
} | [
"Use this API to fetch filtered set of vpnclientlessaccesspolicy resources.\nset the filter parameter values in filtervalue object."
] | [
"Converts a vector from eigen space into sample space.\n\n@param eigenData Eigen space data.\n@return Sample space projection.",
"Account for key being fetched.\n\n@param key",
"Reads a duration value. This method relies on the fact that\nthe units of the duration have been specified elsewhere.\n\n@param value Duration value\n@param type type of units of the duration\n@return Duration instance",
"Use this API to update tmtrafficaction.",
"Get upload status for the currently authenticated user.\n\nRequires authentication with 'read' permission using the new authentication API.\n\n@return A User object with upload status data fields filled\n@throws FlickrException",
"Saves the project file displayed in this panel.\n\n@param file target file\n@param type file type",
"Returns all program element docs that have a visibility greater or\nequal than the specified level",
"disables the current active id, enables the new one selected\n\n@param profileId profile ID of the client\n@param clientUUID UUID of the client\n@param active true to make client active, false to make client inactive\n@throws Exception exception",
"required for rest assured base URI configuration."
] |
public void setEnterpriseText(int index, String value)
{
set(selectField(AssignmentFieldLists.ENTERPRISE_TEXT, index), value);
} | [
"Set an enterprise text value.\n\n@param index text index (1-40)\n@param value text value"
] | [
"Get file extension for script language.\n\n@param language the language name\n@return the file extension as string or null if the language is not in the set of languages supported by spin",
"Opens the favorite dialog.\n\n@param explorer the explorer instance (null if not currently in explorer)",
"Removes any child object that has the given name by performing\ncase-sensitive search.\n\n@param name name of scene object to be removed.\n\n@return number of removed objects, 0 if none was found.",
"Checks whether a character sequence matches against a specified pattern or not.\n\n@param pattern\npattern, that the {@code chars} must correspond to\n@param chars\na readable sequence of {@code char} values which should match the given pattern\n@return {@code true} when {@code chars} matches against the passed {@code pattern}, otherwise {@code false}",
"Array of fieldNames for which counts should be produced\n\n@param countsfields array of the field names\n@return this for additional parameter setting or to query",
"Use this API to fetch a vpnglobal_binding resource .",
"If we have a class Foo with a collection of Bar's then we go through Bar's DAO looking for a Foo field. We need\nthis field to build the query that is able to find all Bar's that have foo_id that matches our id.",
"Convert the integer representation of a duration value and duration units\ninto an MPXJ Duration instance.\n\n@param properties project properties, used for duration units conversion\n@param durationValue integer duration value\n@param unitsValue integer units value\n@return Duration instance",
"Generates a torque schema for the model.\n\n@param attributes The attributes of the tag\n@return The property value\n@exception XDocletException If an error occurs\[email protected] type=\"content\""
] |
public static FileStatus[] getDataChunkFiles(FileSystem fs,
Path path,
final int partitionId,
final int replicaType) throws IOException {
return fs.listStatus(path, new PathFilter() {
public boolean accept(Path input) {
if(input.getName().matches("^" + Integer.toString(partitionId) + "_"
+ Integer.toString(replicaType) + "_[\\d]+\\.data")) {
return true;
} else {
return false;
}
}
});
} | [
"Given a filesystem and path to a node, gets all the files which belong to\na partition and replica type\n\nWorks only for {@link ReadOnlyStorageFormat.READONLY_V2}\n\n@param fs Underlying filesystem\n@param path The node directory path\n@param partitionId The partition id for which we get the files\n@param replicaType The replica type\n@return Returns list of files of this partition, replicaType\n@throws IOException"
] | [
"Creates a non-binary text media type with the given subtype and a specified encoding",
"Complete the current operation and persist the current state to the disk. This will also trigger the invalidation\nof outdated modules.\n\n@param modification the current modification\n@param callback the completion callback",
"Use this API to add nssimpleacl.",
"Returns the number of days from the given weekday to the next weekday the event should occur.\n@param weekDay the current weekday.\n@return the number of days to the next weekday an event could occur.",
"Uploads files from the given file input fields.<p<\n\n@param fields the set of names of fields containing the files to upload\n@param filenameCallback the callback to call with the resulting map from field names to file paths\n@param errorCallback the callback to call with an error message",
"Either gets an existing lock on the specified resource or creates one if none exists.\nThis methods guarantees to do this atomically.\n\n@param resourceId the resource to get or create the lock on\n@param isolationId the isolation level identity key. See {@link CommonsOJBLockManager}.\n@return the lock for the specified resource",
"Find the channel in the animation that animates the named bone.\n@param boneName name of bone to animate.",
"Get the inactive history directories.\n\n@return the inactive history",
"Modifies the \"msgCount\" belief\n\n@param int - the number to add or remove"
] |
@Override
public void postCrawling(CrawlSession session, ExitStatus exitStatus) {
LOG.debug("postCrawling");
StateFlowGraph sfg = session.getStateFlowGraph();
checkSFG(sfg);
// TODO: call state abstraction function to get distance matrix and run rscript on it to
// create clusters
String[][] clusters = null;
// generateClusters(session);
result = outModelCache.close(session, exitStatus, clusters);
outputBuilder.write(result, session.getConfig(), clusters);
StateWriter writer =
new StateWriter(outputBuilder, sfg, ImmutableMap.copyOf(visitedStates));
for (State state : result.getStates().values()) {
try {
writer.writeHtmlForState(state);
} catch (Exception Ex) {
LOG.info("couldn't write state :" + state.getName());
}
}
LOG.info("Crawl overview plugin has finished");
} | [
"Generated the report."
] | [
"Generate a weighted score based on position for matches of URI parts.\nThe matches are weighted in descending order from left to right.\nExact match is weighted higher than group match, and group match is weighted higher than wildcard match.\n\n@param requestUriParts the parts of request URI\n@param destUriParts the parts of destination URI\n@return weighted score",
"Deserializes a variable, checking whether the datatype is custom or not\n@param s\n@param variableType\n@param dataTypes\n@return",
"Gets any assignments for this task.\n@return a list of assignments for this task.",
"Convert an Object to a DateTime, without an Exception",
"Revert all the working copy changes.",
"Parses a record containing hours and add them to a container.\n\n@param ranges hours container\n@param hoursRecord hours record",
"Non-blocking call that will throw any Exceptions in the traditional\nmanner on access\n\n@param key\n@param value\n@return",
"Create an info object from a uri and the http method object.\n\n@param uri the uri\n@param method the method",
"Adds service locator properties to an endpoint reference.\n@param epr\n@param props"
] |
protected TokenList.Token parseSubmatrixToExtract(TokenList.Token variableTarget,
TokenList tokens, Sequence sequence) {
List<TokenList.Token> inputs = parseParameterCommaBlock(tokens, sequence);
List<Variable> variables = new ArrayList<Variable>();
// for the operation, the first variable must be the matrix which is being manipulated
variables.add(variableTarget.getVariable());
addSubMatrixVariables(inputs, variables);
if( variables.size() != 2 && variables.size() != 3 ) {
throw new ParseError("Unexpected number of variables. 1 or 2 expected");
}
// first parameter is the matrix it will be extracted from. rest specify range
Operation.Info info;
// only one variable means its referencing elements
// two variables means its referencing a sub matrix
if( inputs.size() == 1 ) {
Variable varA = variables.get(1);
if( varA.getType() == VariableType.SCALAR ) {
info = functions.create("extractScalar", variables);
} else {
info = functions.create("extract", variables);
}
} else if( inputs.size() == 2 ) {
Variable varA = variables.get(1);
Variable varB = variables.get(2);
if( varA.getType() == VariableType.SCALAR && varB.getType() == VariableType.SCALAR) {
info = functions.create("extractScalar", variables);
} else {
info = functions.create("extract", variables);
}
} else {
throw new ParseError("Expected 2 inputs to sub-matrix");
}
sequence.addOperation(info.op);
return new TokenList.Token(info.output);
} | [
"Converts a submatrix into an extract matrix operation.\n@param variableTarget The variable in which the submatrix is extracted from"
] | [
"Returns the version document of the given document, if any; returns null otherwise.\n@param document the document to get the version from.\n@return the version of the given document, if any; returns null otherwise.",
"Generated the report.",
"True if a CharSequence only contains whitespace characters.\n\n@param self The CharSequence to check the characters in\n@return true If all characters are whitespace characters\n@see #isAllWhitespace(String)\n@since 1.8.2",
"Adds a parameter that requires a string argument to the argument list.\nIf the given argument is null, then the argument list remains unchanged.",
"Attempts to retrieves ResourceReport until maxWaitMs time is reached. Set maxWaitMs to -1 to\nretry forever.",
"This method processes any extended attributes associated with a resource.\n\n@param xml MSPDI resource instance\n@param mpx MPX resource instance",
"Convert a query parameter to the correct object type based on the first letter of the name.\n\n@param name parameter name\n@param value parameter value\n@return parameter object as\n@throws ParseException value could not be parsed\n@throws NumberFormatException value could not be parsed",
"Return the current working directory\n\n@return the current working directory",
"Obtain plugin information\n\n@return"
] |
private Field getFieldRecursive(Class c, String name) throws NoSuchFieldException
{
try
{
return c.getDeclaredField(name);
}
catch (NoSuchFieldException e)
{
// if field could not be found in the inheritance hierarchy, signal error
if ((c == Object.class) || (c.getSuperclass() == null) || c.isInterface())
{
throw e;
}
// if field could not be found in class c try in superclass
else
{
return getFieldRecursive(c.getSuperclass(), name);
}
}
} | [
"try to find a field in class c, recurse through class hierarchy if necessary\n\n@throws NoSuchFieldException if no Field was found into the class hierarchy"
] | [
"This method writes data for a single calendar to a Planner file.\n\n@param mpxjCalendar MPXJ calendar instance\n@param plannerCalendar Planner calendar instance\n@throws JAXBException on xml creation errors",
"Rollback to the specified push version\n\n@param rollbackToDir The version directory to rollback to",
"Randomize the gradient.",
"Update the given resource in the persistent configuration model based on the values in the given operation.\n\n@param operation the operation\n@param resource the resource that corresponds to the address of {@code operation}\n\n@throws OperationFailedException if {@code operation} is invalid or populating the model otherwise fails",
"Get the Operation metadata for a single operation on an MBean by name.\n@param operationName the Operation name (can be URL-encoded).\n@return the {@link MBeanOperationInfo} for the operation.\n@throws OperationNotFoundException Method was not found\n@throws UnsupportedEncodingException if the encoding is not supported.",
"Writes all data that was collected about classes to a json file.",
"Returns new boolean matrix with true or false values selected with equal probability.\n\n@param numRow Number of rows in the new matrix.\n@param numCol Number of columns in the new matrix.\n@param rand Random number generator used to fill the matrix.\n@return The randomly generated matrix.",
"Use this API to clear route6.",
"Use this API to fetch all the dnsaaaarec resources that are configured on netscaler.\nThis uses dnsaaaarec_args which is a way to provide additional arguments while fetching the resources."
] |
public static void shutdownStandalone(final ModelControllerClient client, final int timeout) throws IOException {
final ModelNode op = Operations.createOperation("shutdown");
op.get("timeout").set(timeout);
final ModelNode response = client.execute(op);
if (Operations.isSuccessfulOutcome(response)) {
while (true) {
if (isStandaloneRunning(client)) {
try {
TimeUnit.MILLISECONDS.sleep(20L);
} catch (InterruptedException e) {
LOGGER.trace("Interrupted during sleep", e);
}
} else {
break;
}
}
} else {
throw new OperationExecutionException(op, response);
}
} | [
"Shuts down a standalone server.\n\n@param client the client used to communicate with the server\n@param timeout the graceful shutdown timeout, a value of {@code -1} will wait indefinitely and a value of\n{@code 0} will not attempt a graceful shutdown\n\n@throws IOException if an error occurs communicating with the server"
] | [
"Move the SQL value to the next one for version processing.",
"Get a list of referring domains for a collection.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param collectionId\n(Optional) The id of the collection to get stats for. If not provided, stats for all collections will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getCollectionDomains.html\"",
"Reconstructs a number that is represented by more than one byte in a network packet in big-endian order.\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 length the number of bytes making up the value\n@return the reconstructed number",
"Returns the field with the specified value properly formatted. Multiline\nvalues are automatically indented, and dots are added on the empty lines.\n\n<pre>\nField-Name: value\n</pre>",
"Set the maximum date limit.",
"Use this API to rename a responderpolicy resource.",
"Searches for cases where a minus sign means negative operator. That happens when there is a minus\nsign with a variable to its right and no variable to its left\n\nExample:\na = - b * c",
"Returns the precedence of the specified operator. Non-operator's will\nreceive -1 or a GroovyBugError, depending on your preference.",
"AND operation which takes the previous clause and the next clause and AND's them together."
] |
public static boolean isTodoItem(final Document todoItemDoc) {
return todoItemDoc.containsKey(ID_KEY)
&& todoItemDoc.containsKey(TASK_KEY)
&& todoItemDoc.containsKey(CHECKED_KEY);
} | [
"Returns if a MongoDB document is a todo item."
] | [
"Returns a list of all the eigenvalues",
"Gets information about a trashed folder that's limited to a list of specified fields.\n@param folderID the ID of the trashed folder.\n@param fields the fields to retrieve.\n@return info about the trashed folder containing only the specified fields.",
"Checks the given class descriptor for correct object cache setting.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated",
"Handle value change event on the individual dates list.\n@param event the change event.",
"Add a console pipeline to the Redwood handler tree,\nprinting to stdout.\nCalling this multiple times will result in messages being printed\nmultiple times.\n@return this",
"Use this API to Import appfwsignatures.",
"Sets the bootstrap URLs used by the different Fat clients inside the\nCoordinator\n\n@param bootstrapUrls list of bootstrap URLs defining which cluster to\nconnect to\n@return modified CoordinatorConfig",
"Print an extended attribute currency value.\n\n@param value currency value\n@return string representation",
"Curries a function that takes three arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes two arguments. Never <code>null</code>."
] |
public static boolean isAllWhitespace(CharSequence self) {
String s = self.toString();
for (int i = 0; i < s.length(); i++) {
if (!Character.isWhitespace(s.charAt(i)))
return false;
}
return true;
} | [
"True if a CharSequence only contains whitespace characters.\n\n@param self The CharSequence to check the characters in\n@return true If all characters are whitespace characters\n@see #isAllWhitespace(String)\n@since 1.8.2"
] | [
"Producers returned from this method are not validated. Internal use only.",
"Call rollback on the underlying connection.",
"Get the DMR path for this node. For leaves, the DMR path is the path of its parent.\n@return The DMR path for this node.",
"Attempt to shutdown the server. As much shutdown as possible will be\ncompleted, even if intermediate errors are encountered.\n\n@throws VoldemortException",
"Sets the last operation response.\n\n@param response the last operation response.",
"Gets all of the column names for a result meta data\n\n@param rsmd Resultset metadata\n@return Array of column names\n@throws Exception exception",
"Cancel all currently active operations.\n\n@return a list of cancelled operations",
"Add the given headers to the given HTTP request.\n@param httpRequest the request to add the headers to\n@param headers the headers to add",
"Add tables to the tree.\n\n@param parentNode parent tree node\n@param file tables container"
] |
private String formatTimeUnit(TimeUnit timeUnit)
{
int units = timeUnit.getValue();
String result;
String[][] unitNames = LocaleData.getStringArrays(m_locale, LocaleData.TIME_UNITS_ARRAY);
if (units < 0 || units >= unitNames.length)
{
result = "";
}
else
{
result = unitNames[units][0];
}
return (result);
} | [
"This method formats a time unit.\n\n@param timeUnit time unit instance\n@return formatted time unit instance"
] | [
"Adds a basic LHS OPERATOR RHS block.\n\n@param list parent criteria list\n@param block current block",
"If the specified value is not greater than or equal to the specified minimum and\nless than or equal to the specified maximum, adjust it so that it is.\n@param value The value to check.\n@param min The minimum permitted value.\n@param max The maximum permitted value.\n@return {@code value} if it is between the specified limits, {@code min} if the value\nis too low, or {@code max} if the value is too high.\n@since 1.2",
"Remove a key for all language versions. If a descriptor is present, the key is only removed in the descriptor.\n\n@param key the key to remove.\n@return <code>true</code> if removing was successful, <code>false</code> otherwise.",
"Given a parameter, builds a new parameter for which the known generics placeholders are resolved.\n@param genericFromReceiver resolved generics from the receiver of the message\n@param placeholdersFromContext, resolved generics from the method context\n@param methodParameter the method parameter for which we want to resolve generic types\n@param paramType the (unresolved) type of the method parameter\n@return a new parameter with the same name and type as the original one, but with resolved generic types",
"Prints and stores final result of the processing. This should be called\nafter finishing the processing of a dump. It will print the statistics\ngathered during processing and it will write a CSV file with usage counts\nfor every property.",
"Reads a time value. The time is represented as tenths of a\nminute since midnight.\n\n@param data byte array of data\n@param offset location of data as offset into the array\n@return time value",
"Load the InstalledIdentity configuration based on the module.path\n\n@param installedImage the installed image\n@param productConfig the product config\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the available layers\n@throws IOException",
"Returns an empty map with expected size matching the iterable size if\nit's of type Collection. Otherwise, an empty map with the default size is\nreturned.",
"Use this API to unset the properties of nsacl6 resource.\nProperties that need to be unset are specified in args array."
] |
static void sendFailedResponse(final ManagementRequestContext<RegistrationContext> context, final byte errorCode, final String message) throws IOException {
final ManagementResponseHeader header = ManagementResponseHeader.create(context.getRequestHeader());
final FlushableDataOutput output = context.writeMessage(header);
try {
// This is an error
output.writeByte(DomainControllerProtocol.PARAM_ERROR);
// send error code
output.writeByte(errorCode);
// error message
if (message == null) {
output.writeUTF("unknown error");
} else {
output.writeUTF(message);
}
// response end
output.writeByte(ManagementProtocol.RESPONSE_END);
output.close();
} finally {
StreamUtils.safeClose(output);
}
} | [
"Send a failed operation response.\n\n@param context the request context\n@param errorCode the error code\n@param message the operation message\n@throws IOException for any error"
] | [
"Validates a favorite entry.\n\n<p>If the favorite entry references a resource or project that can't be read, this will return false.\n\n@param entry the favorite entry\n@return the",
"Make a timestamp value given a date.",
"Deletes specified entity clearing all its properties and deleting all its outgoing links.\n\n@param entity to delete.",
"Sign in a connection to the registry by key.\n\nNote multiple connections can be attached to the same key\n\n@param key\nthe key\n@param connection\nthe websocket connection\n@see #register(String, WebSocketConnection)",
"Sets the database dialect.\n\n@param dialect\nthe database dialect",
"orientation state factory method",
"This method writes a resource's availability table.\n\n@param xml MSPDI resource\n@param mpx MPXJ resource",
"Use this API to fetch lbmonbindings_servicegroup_binding resources of given name .",
"called when we are completed finished with using the TcpChannelHub"
] |
private org.apache.tools.ant.types.Path resolveFiles(org.apache.tools.ant.types.Path path) {
org.apache.tools.ant.types.Path cloned = new org.apache.tools.ant.types.Path(getProject());
for (String location : path.list()) {
cloned.createPathElement().setLocation(new File(location));
}
return cloned;
} | [
"Resolve all files from a given path and simplify its definition."
] | [
"Helper to return the first item in the iterator or null.\n\n@return T the first item or null.",
"Returns an array of the names of all atributes of this descriptor.\n\n@return The list of attribute names (will not be <code>null</code>)",
"Declares additional internal data structures.",
"Get the time zone for a specific exchange suffix\n\n@param suffix suffix for the exchange in YahooFinance\n@return time zone of the exchange",
"If directory doesn't exists try to create it.\n\n@param directory given directory to check\n@throws ReportGenerationException if can't create specified directory",
"Retrieve a UUID in the form required by Primavera PMXML.\n\n@param guid UUID instance\n@return formatted UUID",
"Maps this iterable from the source document type to the target document type.\n\n@param mapper a function that maps from the source to the target document type\n@param <U> the target document type\n@return an iterable which maps T to U",
"Sets the header of the collection component.",
"Gets or creates id of the entity type.\n\n@param entityType entity type name.\n@param allowCreate if set to true and if there is no entity type like entityType,\ncreate the new id for the entityType.\n@return entity type id."
] |
public void putBeanDeployments(BeanDeploymentArchiveMapping bdaMapping) {
for (Entry<BeanDeploymentArchive, BeanManagerImpl> entry : bdaMapping.getBdaToBeanManagerMap().entrySet()) {
beanDeploymentArchives.put(entry.getKey(), entry.getValue());
addBeanManager(entry.getValue());
}
} | [
"Add sub-deployment units to the container\n\n@param bdaMapping"
] | [
"Scans given directory for files passing given filter, adds the results into given list.",
"Execute the transactional flow - catch only specified exceptions\n\n@param input Initial data input\n@param classes Exception types to catch\n@return Try that represents either success (with result) or failure (with errors)",
"A variant of the gamma function.\n@param a the number to apply gain to\n@param b the gain parameter. 0.5 means no change, smaller values reduce gain, larger values increase gain.\n@return the output value",
"Gets information for a Box Storage Policy with optional fields.\n\n@param fields the fields to retrieve.\n@return info about this item containing only the specified fields, including storage policy.",
"Adds a type to collection with inheriting base type properties.\n\n@param type the type definition to add\n\n@return true if the type definition was added",
"Given the histogram of columns compute the col_idx for the matrix. nz_length is automatically set and\nnz_values will grow if needed.\n@param histogram histogram of column values in the sparse matrix. modified, see above.",
"Get the MonetaryAmount implementation class.\n\n@return the implementation class of the containing amount instance, never null.\n@see MonetaryAmount#getContext()",
"Transits a float propertyId from the start value to the end value.\n\n@param propertyId\n@param vals\n@return self",
"Clear the mask for a new selection"
] |
public static String compactDump(INode node, boolean showHidden) {
StringBuilder result = new StringBuilder();
try {
compactDump(node, showHidden, "", result);
} catch (IOException e) {
return e.getMessage();
}
return result.toString();
} | [
"Creates a string representation of the given node. Useful for debugging.\n\n@return a debug string for the given node."
] | [
"Writes the value key to the serialized characteristic\n\n@param builder The JSON builder to add the value to\n@param value The value to add",
"Rollback to the specified push version\n\n@param rollbackToDir The version directory to rollback to",
"Create the patching task based on the definition.\n\n@param definition the task description\n@param provider the content provider\n@param context the task context\n@return the created task",
"Output the SQL type for a Java String.",
"Determine whether or not a given serializedr is \"AVRO\" based\n\n@param serializerName\n@return",
"Unlock all edited resources.",
"Abort an active extern transaction associated with the given PB.",
"Processes the template for all reference definitions 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\[email protected] type=\"block\"",
"Sets all dates in the list.\n@param dates the dates to set\n@param checked flag, indicating if all should be checked or unchecked."
] |
private void createStringMappings(MtasTokenIdFactory mtasTokenIdFactory,
Level level, String stringValue, int offsetStart, int offsetEnd,
int position) throws IOException {
// System.out.println("createStringMappings string ");
String[] stringValues = MtasPennTreebankReader.createStrings(stringValue,
Pattern.quote(STRING_SPLITTER));
if (stringValues.length > 0 && !stringValues[0].trim().isEmpty()) {
MtasToken token = new MtasTokenString(mtasTokenIdFactory.createTokenId(),
"t", filterString(stringValues[0].trim()), position);
token.setOffset(offsetStart, offsetEnd);
tokenCollection.add(token);
level.tokens.add(token);
}
if (stringValues.length > 1 && !stringValues[1].trim().isEmpty()) {
MtasToken token = new MtasTokenString(mtasTokenIdFactory.createTokenId(),
"lemma", filterString(stringValues[1].trim()), position);
token.setOffset(offsetStart, offsetEnd);
tokenCollection.add(token);
level.tokens.add(token);
}
} | [
"Creates the string mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param position\nthe position\n@throws IOException\nSignals that an I/O exception has occurred."
] | [
"Releases a database connection, and cleans up any resources\nassociated with that connection.",
"Maps a bindingId to its corresponding BindingType.\n@param bindingId\n@return",
"Gets the actual key - will create a new row with the max key of table if it\ndoes not exist.\n@param field\n@return\n@throws SequenceManagerException",
"The method determines if the type can be resolved and if not, will try to guess the qualified name using the information from the imports.",
"Runs the currently entered query and displays the results.",
"Create a forward curve from given times and discount factors.\n\nThe forward curve will have times.length-1 fixing times from times[0] to times[times.length-2]\n<code>\nforward[timeIndex] = (givenDiscountFactors[timeIndex]/givenDiscountFactors[timeIndex+1]-1.0) / (times[timeIndex+1] - times[timeIndex]);\n</code>\nNote: If time[0] > 0, then the discount factor 1.0 will inserted at time 0.0\n\n@param name The name of this curve.\n@param times A vector of given time points.\n@param givenDiscountFactors A vector of given discount factors (corresponding to the given time points).\n@param paymentOffset The maturity of the underlying index modeled by this curve.\n@return A new ForwardCurve object.",
"Wrap PreparedStatement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a Preparedstatement.",
"Find the next match of the pattern on the tree\n\n@return whether there is a match somewhere in the tree",
"apply the base fields to other views if configured to do so."
] |
public static int getScreenWidth(Context context) {
DisplayMetrics metrics = context.getResources().getDisplayMetrics();
return metrics.widthPixels;
} | [
"Returns the screen width in pixels\n\n@param context is the context to get the resources\n@return the screen width in pixels"
] | [
"Registers the resource to the parent deployment resource. The model returned is that of the resource parameter.\n\n@param subsystemName the subsystem name\n@param resource the resource to be used for the subsystem on the deployment\n\n@return the model\n\n@throws java.lang.IllegalStateException if the subsystem resource already exists",
"Ensures that the primary keys required by the given reference are present in the referenced class.\n\n@param modelDef The model\n@param refDef The reference\n@throws ConstraintException If there is a conflict between the primary keys",
"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 a real valued diagonal matrix of the specified type",
"Throws an IllegalArgumentException when the given value is null.\n@param value the value to assert if not null\n@param name the name of the argument\n@param <T> The generic type of the value to assert if not null\n@return the value",
"Checks if the dependency server is available\n\n@return true if the server is reachable, false otherwise",
"Account for key being fetched.\n\n@param key",
"Connect sync.\n\n@param configuration the protocol configuration\n@return the connection\n@throws IOException",
"Use this API to update clusterinstance resources."
] |
public static int optionLength(String option) {
if(matchOption(option, "qualify", true) ||
matchOption(option, "qualifyGenerics", true) ||
matchOption(option, "hideGenerics", true) ||
matchOption(option, "horizontal", true) ||
matchOption(option, "all") ||
matchOption(option, "attributes", true) ||
matchOption(option, "enumconstants", true) ||
matchOption(option, "operations", true) ||
matchOption(option, "enumerations", true) ||
matchOption(option, "constructors", true) ||
matchOption(option, "visibility", true) ||
matchOption(option, "types", true) ||
matchOption(option, "autosize", true) ||
matchOption(option, "commentname", true) ||
matchOption(option, "nodefontabstractitalic", true) ||
matchOption(option, "postfixpackage", true) ||
matchOption(option, "noguillemot", true) ||
matchOption(option, "views", true) ||
matchOption(option, "inferrel", true) ||
matchOption(option, "useimports", true) ||
matchOption(option, "collapsible", true) ||
matchOption(option, "inferdep", true) ||
matchOption(option, "inferdepinpackage", true) ||
matchOption(option, "hideprivateinner", true) ||
matchOption(option, "compact", true))
return 1;
else if(matchOption(option, "nodefillcolor") ||
matchOption(option, "nodefontcolor") ||
matchOption(option, "nodefontsize") ||
matchOption(option, "nodefontname") ||
matchOption(option, "nodefontclasssize") ||
matchOption(option, "nodefontclassname") ||
matchOption(option, "nodefonttagsize") ||
matchOption(option, "nodefonttagname") ||
matchOption(option, "nodefontpackagesize") ||
matchOption(option, "nodefontpackagename") ||
matchOption(option, "edgefontcolor") ||
matchOption(option, "edgecolor") ||
matchOption(option, "edgefontsize") ||
matchOption(option, "edgefontname") ||
matchOption(option, "shape") ||
matchOption(option, "output") ||
matchOption(option, "outputencoding") ||
matchOption(option, "bgcolor") ||
matchOption(option, "hide") ||
matchOption(option, "include") ||
matchOption(option, "apidocroot") ||
matchOption(option, "apidocmap") ||
matchOption(option, "d") ||
matchOption(option, "view") ||
matchOption(option, "inferreltype") ||
matchOption(option, "inferdepvis") ||
matchOption(option, "collpackages") ||
matchOption(option, "nodesep") ||
matchOption(option, "ranksep") ||
matchOption(option, "dotexecutable") ||
matchOption(option, "link"))
return 2;
else if(matchOption(option, "contextPattern") ||
matchOption(option, "linkoffline"))
return 3;
else
return 0;
} | [
"Return the number of arguments associated with the specified option.\nThe return value includes the actual option.\nWill return 0 if the option is not supported."
] | [
"Given a filesystem and path to a node, gets all the files which belong to\na partition and replica type\n\nWorks only for {@link ReadOnlyStorageFormat.READONLY_V2}\n\n@param fs Underlying filesystem\n@param path The node directory path\n@param partitionId The partition id for which we get the files\n@param replicaType The replica type\n@return Returns list of files of this partition, replicaType\n@throws IOException",
"For given field name get the actual hint message",
"Parse currency.\n\n@param value currency value\n@return currency value",
"Transform a TMS layer description object into a raster layer info object.\n\n@param tileMap\nThe TMS layer description object.\n@return The raster layer info object as used by Geomajas.",
"Given a key and a list of steal infos give back a list of stealer node\nids which will steal this.\n\n@param key Byte array of key\n@param stealerNodeToMappingTuples Pairs of stealer node id to their\ncorresponding [ partition - replica ] tuples\n@param cluster Cluster metadata\n@param storeDef Store definitions\n@return List of node ids",
"Use this API to add autoscaleaction resources.",
"Processes an anonymous field definition specified at the class level.\n\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the field as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"autoincrement\" optional=\"true\" description=\"Whether the field is\nauto-incremented\" values=\"true,false\"\[email protected] name=\"column\" optional=\"true\" description=\"The column for the field\"\[email protected] name=\"conversion\" optional=\"true\" description=\"The fully qualified name of the\nconversion for the field\"\[email protected] name=\"default-fetch\" optional=\"true\" description=\"The default-fetch setting\"\nvalues=\"true,false\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the field\"\[email protected] name=\"id\" optional=\"true\" description=\"The position of the field in the class\ndescriptor\"\[email protected] name=\"indexed\" optional=\"true\" description=\"Whether the field is indexed\"\nvalues=\"true,false\"\[email protected] name=\"jdbc-type\" optional=\"true\" description=\"The jdbc type of the column\"\[email protected] name=\"length\" optional=\"true\" description=\"The length of the column\"\[email protected] name=\"locking\" optional=\"true\" description=\"Whether the field supports locking\"\nvalues=\"true,false\"\[email protected] name=\"name\" optional=\"false\" description=\"The name of the field\"\[email protected] name=\"nullable\" optional=\"true\" description=\"Whether the field is nullable\"\nvalues=\"true,false\"\[email protected] name=\"precision\" optional=\"true\" description=\"The precision of the column\"\[email protected] name=\"primarykey\" optional=\"true\" description=\"Whether the field is a primarykey\"\nvalues=\"true,false\"\[email protected] name=\"scale\" optional=\"true\" description=\"The scale of the column\"\[email protected] name=\"sequence-name\" optional=\"true\" description=\"The name of the sequence for\nincrementing the field\"\[email protected] name=\"table\" optional=\"true\" description=\"The table of the field (not implemented\nyet)\"\[email protected] name=\"update-lock\" optional=\"true\" description=\"Can be set to false if the persistent attribute is\nused for optimistic locking AND the dbms should update the lock column itself (default is true). Can only be set for\nTIMESTAMP and INTEGER columns\" values=\"true,false\"",
"Retrieve a map of custom document properties.\n\n@return the Document Summary Information Map",
"Given a list of store definitions, find out and return a map of similar\nstore definitions + count of them\n\n@param storeDefs All store definitions\n@return Map of a unique store definition + counts"
] |
public static final GVRPickedObject[] pickObjects(GVRScene scene, float ox, float oy, float oz, float dx,
float dy, float dz) {
sFindObjectsLock.lock();
try {
final GVRPickedObject[] result = NativePicker.pickObjects(scene.getNative(), 0L, ox, oy, oz, dx, dy, dz);
return result;
} finally {
sFindObjectsLock.unlock();
}
} | [
"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 at the\nbottom to 1 at the top. To construct a picking ray originating at the\nuser's head and pointing into the scene along the camera lookat vector,\npass in 0, 0, 0 for the origin and 0, 0, -1 for the direction.\n\n<p>\nThis method is thread safe because it guarantees that only\none thread at a time is doing a ray cast into a particular scene graph,\nand it extracts the hit data during within its synchronized block. You\ncan then examine the return list without worrying about another thread\ncorrupting your hit data.\n<p>\nDepending on the type of collider, that the hit location may not be exactly\nwhere the ray would intersect the scene object itself. Rather, it is\nwhere the ray intersects the collision geometry associated with the collider.\n\n@param scene\nThe {@link GVRScene} with all the objects to be tested.\n\n@param ox\nThe x coordinate of the ray origin.\n\n@param oy\nThe y coordinate of the ray origin.\n\n@param oz\nThe z coordinate of the ray origin.\n\n@param dx\nThe x vector of the ray direction.\n\n@param dy\nThe y vector of the ray direction.\n\n@param dz\nThe z vector of the ray direction.\n@return A list of {@link GVRPickedObject}, sorted by distance from the\ncamera rig. Each {@link GVRPickedObject} contains the scene object\nwhich owns the {@link GVRCollider} along with the hit\nlocation and distance from the camera.\n\n@since 1.6.6"
] | [
"Converts the search results from CmsSearchResource to CmsSearchResourceBean.\n@param searchResults The collection of search results to transform.",
"lookup current maximum value for a single field in\ntable the given class descriptor was associated.",
"Reads filter parameters.\n\n@param params the params\n@return the criterias",
"Synchronize the geotools transaction with the platform transaction, if such a transaction is active.\n\n@param featureStore\n@param dataSource",
"This implementation returns whether the underlying asset exists.",
"Adds a table to this model.\n\n@param table The table",
"Create a new Time, with no date component.",
"prefetch defined relationships requires JDBC level 2.0, does not work\nwith Arrays",
"This method is used to associate a child task with the current\ntask instance. It has package access, and has been designed to\nallow the hierarchical outline structure of tasks in an MPX\nfile to be constructed as the file is read in.\n\n@param child Child task.\n@param childOutlineLevel Outline level of the child task."
] |
private void harvestReturnValue(
Object obj,
CallableStatement callable,
FieldDescriptor fmd,
int index)
throws PersistenceBrokerSQLException
{
try
{
// If we have a field descriptor, then we can harvest
// the return value.
if ((callable != null) && (fmd != null) && (obj != null))
{
// Get the value and convert it to it's appropriate
// java type.
Object value = fmd.getJdbcType().getObjectFromColumn(callable, index);
// Set the value of the persistent field.
fmd.getPersistentField().set(obj, fmd.getFieldConversion().sqlToJava(value));
}
}
catch (SQLException e)
{
String msg = "SQLException during the execution of harvestReturnValue"
+ " class="
+ obj.getClass().getName()
+ ","
+ " field="
+ fmd.getAttributeName()
+ " : "
+ e.getMessage();
logger.error(msg,e);
throw new PersistenceBrokerSQLException(msg, e);
}
} | [
"Harvest a single value that was returned by a callable statement.\n\n@param obj the object that will receive the value that is harvested.\n@param callable the CallableStatement that contains the value to harvest\n@param fmd the FieldDescriptor that identifies the field where the\nharvested value will be stord.\n@param index the parameter index.\n\n@throws PersistenceBrokerSQLException if a problem occurs."
] | [
"Use this API to fetch authenticationvserver_auditnslogpolicy_binding resources of given name .",
"This method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions.\n\n@param date Date to be tested\n@return boolean value",
"Wrap connection with a proxy.\n@param target connection handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a connection.",
"the absolute and relative calls are the trickiest parts. We have to\nmove across cursor boundaries potentially.\n\na + row value indexes from beginning of resultset\na - row value indexes from the end of th resulset.\n\nCalling absolute(1) is the same as calling first().\nCalling absolute(-1) is the same as calling last().",
"Adds another scene object to pick against.\nEach frame all the colliders in the scene will be compared\nagainst the bounding volumes of all the collidables associated\nwith this picker.\n@param sceneObj new collidable\n@return index of collidable added, this is the CursorID in the GVRPickedObject",
"Initialize that Foundation Logging library.",
"Recursively write tasks.\n\n@param tasks list of tasks\n@throws IOException",
"Ensures that the foreign keys required by the given collection are present in the element class.\n\n@param modelDef The model\n@param collDef The collection\n@throws ConstraintException If there is a problem with the foreign keys",
"Create a request for elevations for multiple locations.\n\n@param req\n@param callback"
] |
static int excessArgumentsMatchesVargsParameter(Parameter[] params, ClassNode[] args) {
// we already know parameter length is bigger zero and last is a vargs
// the excess arguments are all put in an array for the vargs call
// so check against the component type
int dist = 0;
ClassNode vargsBase = params[params.length - 1].getType().getComponentType();
for (int i = params.length; i < args.length; i++) {
if (!isAssignableTo(args[i],vargsBase)) return -1;
else if (!args[i].equals(vargsBase)) dist+=getDistance(args[i], vargsBase);
}
return dist;
} | [
"Checks that excess arguments match the vararg signature parameter.\n@param params\n@param args\n@return -1 if no match, 0 if all arguments matches the vararg type and >0 if one or more vararg argument is\nassignable to the vararg type, but still not an exact match"
] | [
"apply the base fields to other views if configured to do so.",
"Get new vector clock based on this clock but incremented on index nodeId\n\n@param nodeId The id of the node to increment\n@return A vector clock equal on each element execept that indexed by\nnodeId",
"Sets the resource to which this calendar is linked. Note that this\nmethod updates the calendar's name to be the same as the resource name.\nIf the resource does not yet have a name, then the calendar is given\na default name.\n\n@param resource resource instance",
"Method used to write the name of the scenarios methods\n\n@param word\n@return the same word starting with lower case",
"Adds a security property to be passed to the server.\n\n@param key the property key\n@param value the property value\n\n@return the builder",
"Put a spatial object in the cache and index it.\n\n@param key key for object\n@param object object itself\n@param envelope envelope for object",
"Used to set the complex value of a matrix element.\n@param row The row of the element.\n@param col The column of the element.\n@param real Real component of assigned value\n@param imaginary Imaginary component of assigned value",
"Adds a new cell to the current grid\n@param cell the td component",
"Finds or creates a ResourceStorageLoadable for the given resource.\nClients should first call shouldLoadFromStorage to check whether there exists a storage version\nof the given resource.\n\n@return an IResourceStorageLoadable"
] |
public void setRotation(String rotation) {
if (rotation != null) {
try {
setRotation(Integer.parseInt(rotation));
} catch (NumberFormatException e) {
setRotation(-1);
}
}
} | [
"Set the degrees of rotation. Value will be set to -1, if not available.\n\n@param rotation"
] | [
"Retrieves an integer value from the extended data.\n\n@param type Type identifier\n@return integer value",
"remove an objects entry from the object registry",
"Enable a custom response\n\n@param custom custom response\n@param path_id path ID of the response\n@param client_uuid client UUID\n@throws Exception exception",
"Returns the value of the identified field as an Integer.\n@param fieldName the name of the field\n@return the value of the field as an Integer\n@throws FqlException if the field cannot be expressed as an Integer",
"marks the message as read",
"Use this API to fetch all the sslservice resources that are configured on netscaler.\nThis uses sslservice_args which is a way to provide additional arguments while fetching the resources.",
"Returns the index of the first invalid character of the zone, or -1 if the zone is valid\n\n@param sequence\n@return",
"Compute singular values and U and V at the same time",
"Create a transformation which takes the alignment settings into account."
] |
public static String termPrefix(String term) {
int i = term.indexOf(MtasToken.DELIMITER);
String prefix = term;
if (i >= 0) {
prefix = term.substring(0, i);
}
return prefix.replace("\u0000", "");
} | [
"Term prefix.\n\n@param term\nthe term\n@return the string"
] | [
"Returns the input to parse including the whitespace left to the cursor position since\nit may be relevant to the list of proposals for whitespace sensitive languages.",
"Template method responsible for file compression checks, file creation, and\ndelegation to specific strategy implementations.\n\n@param backupFile\nThe file to be compressed.\n@param properties\nThe appender's configuration.",
"Obtains a local date in Symmetry010 calendar system from the\nproleptic-year, month-of-year and day-of-month fields.\n\n@param prolepticYear the proleptic-year\n@param month the month-of-year\n@param dayOfMonth the day-of-month\n@return the Symmetry010 local date, not null\n@throws DateTimeException if unable to create the date",
"This is a method to stream slops to \"slop\" store when a node is detected\nfaulty in a streaming session\n\n@param key -- original key\n@param value -- original value\n@param storeName -- the store for which we are registering the slop\n@param failedNodeId -- the faulty node ID for which we register a slop\n@throws IOException",
"Returns the base URL of the print servlet.\n\n@param httpServletRequest the request",
"Convert raw data into Java types.\n\n@param type data type\n@param data raw data\n@return list of Java object",
"Configure file logging and stop console logging.\n\n@param filename\nLog to this file.",
"Mapping message info.\n\n@param messageInfo the message info\n@return the message info type",
"Whether the address has the well-known prefix for IPv4 translatable addresses as in rfc 6052 and 6144\n@return"
] |
public static String cutEnd(String data, int maxLength) {
if (data.length() > maxLength) {
return data.substring(0, maxLength) + "...";
} else {
return data;
}
} | [
"Cut all characters from maxLength and replace it with \"...\""
] | [
"The Baseline Start field shows the planned beginning date for a task at\nthe time you saved a baseline. Information in this field becomes available\nwhen you set a baseline.\n\n@return Date",
"Returns a flag indicating if also unreleased resources should be found.\n@return A flag indicating if also unreleased resources should be found.",
"Prioritises the list of step candidates that match a given step.\n\n@param stepAsText\nthe textual step to match\n@param candidates\nthe List of StepCandidate\n@return The prioritised list according to the\n{@link PrioritisingStrategy}.",
"Override for customizing XmlMapper and ObjectMapper",
"Reset the Where object so it can be re-used.",
"Check if all cluster objects in the list are congruent.\n\n@param clusterUrls of cluster objects\n@return",
"note this string is used by hashCode",
"Convenience method which allows all projects in the database to\nbe read in a single operation.\n\n@return list of ProjectFile instances\n@throws MPXJException",
"Use this API to update vserver."
] |
public void put(final String key, final Object value) {
if (TASK_DIRECTORY_KEY.equals(key) && this.values.keySet().contains(TASK_DIRECTORY_KEY)) {
// ensure that no one overwrites the task directory
throw new IllegalArgumentException("Invalid key: " + key);
}
if (value == null) {
throw new IllegalArgumentException(
"A null value was attempted to be put into the values object under key: " + key);
}
this.values.put(key, value);
} | [
"Put a new value in map.\n\n@param key id of the value for looking up.\n@param value the value."
] | [
"Converts a tab delimited string into an object with given fields\nRequires the object has public access for the specified fields\n\n@param objClass Class of object to be created\n@param str string to convert\n@param delimiterPattern delimiter\n@param fieldNames fieldnames\n@param <T> type to return\n@return Object created from string",
"Start check of execution time\n@param extra",
"Called to update the cached formats when something changes.",
"Add the list with given bundles to the \"Require-Bundle\" main attribute.\n\n@param requiredBundles The list of all bundles to add.",
"Closes the connection to the Z-Wave controller.",
"Convert a Throwable into a list containing all of its causes.\n@param t The throwable for which the causes are to be returned.\n@return A (possibly empty) list of {@link Throwable}s.",
"Initializes the counters for a property to zero if not done yet.\n\n@param usageStatistics\nstatistics object to initialize\n@param property\nthe property to count",
"Calculate the duration percent complete.\n\n@param row task data\n@return percent complete",
"Set the String of request body data to be sent to the server.\n\n@param input String of request body data to be sent to the server\n@return an {@link HttpConnection} for method chaining"
] |
public static ComponentsMultiThread getComponentsMultiThread() {
TransactionLogger instance = getInstance();
if (instance == null) {
return null;
}
return instance.componentsMultiThread;
} | [
"Get ComponentsMultiThread of current instance\n@return componentsMultiThread"
] | [
"Updates the indices in the index buffer from a Java IntBuffer.\nAll of the entries of the input int buffer are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if int buffer is wrong size",
"Maps a bindingId to its corresponding BindingType.\n@param bindingId\n@return",
"Each schema set has its own database cluster. The template1 database has the schema preloaded so that\neach test case need only create a new database and not re-invoke Migratory.",
"Read an array of bytes of a specified size.\n\n@param size number of bytes to read\n@return ByteArray instance",
"Traces the duration between origin time in the http Request and time just\nbefore being processed by the fat client\n\n@param operationType\n@param originTimeInMS - origin time in the Http Request\n@param requestReceivedTimeInMs - System Time in ms\n@param keyString",
"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 changing/setting default password for user.\n@param userName - the name of user for which password is set.\n@param password - password.\n@return",
"Checks to see if a subsystem resource has already been registered for the deployment.\n\n@param subsystemName the name of the subsystem\n\n@return {@code true} if the subsystem exists on the deployment otherwise {@code false}",
"Use this API to restore appfwprofile resources.",
"Converts assignment duration values from minutes to hours.\n\n@param list assignment data"
] |
public static Class<?> loadClass(String className, ClassLoader cl) {
try {
return Class.forName(className, false, cl);
} catch(ClassNotFoundException e) {
throw new IllegalArgumentException(e);
}
} | [
"Load the given class using a specific class loader.\n\n@param className The name of the class\n@param cl The Class Loader to be used for finding the class.\n@return The class object"
] | [
"Copies a classworlds file to a temporary location either on the local filesystem or on a slave depending on the\nnode type.\n\n@return The path of the classworlds.conf file",
"Use this API to fetch rnat6_nsip6_binding resources of given name .",
"The ARP is additional request parameters, which must be sent once\nreceived after any HTTP call. This is sort of a proxy for cookies.\n\n@return A JSON object containing the ARP key/values. Can be null.",
"Redirect standard streams so that the output can be passed to listeners.",
"Unchecks 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 CheckableGroup} and\nwas not already unchecked; {@code false} otherwise.",
"Compute the location of the generated file from the given trace file.",
"This is generally only useful for extensions that delegate some of their functionality to other \"internal\"\nextensions of their own that they need to configure.\n\n@param configuration the configuration to be supplied with the returned analysis context.\n@return an analysis context that is a clone of this instance but its configuration is replaced with the provided\none.",
"Print out the configuration that the client needs to make a request.\n\n@param json the output writer.\n@throws JSONException",
"Stop offering shared dbserver sessions."
] |
public static Class<?> loadClass(String classname, DataFormat<?> dataFormat) {
// first try context classoader
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if(cl != null) {
LOG.tryLoadingClass(classname, cl);
try {
return cl.loadClass(classname);
}
catch(Exception e) {
// ignore
}
}
// else try the classloader which loaded the dataformat
cl = dataFormat.getClass().getClassLoader();
try {
LOG.tryLoadingClass(classname, cl);
return cl.loadClass(classname);
}
catch (ClassNotFoundException e) {
throw LOG.classNotFound(classname, e);
}
} | [
"Used by dataformats if they need to load a class\n\n@param classname the name of the\n@param dataFormat\n@return"
] | [
"Returns the path to java executable.",
"Use this API to delete nssimpleacl.",
"Adds a new email alias to this user's account and confirms it without user interaction.\nThis functionality is only available for enterprise admins.\n@param email the email address to add as an alias.\n@param isConfirmed whether or not the email alias should be automatically confirmed.\n@return the newly created email alias.",
"Returns server group by ID\n\n@param id ID of server group\n@return ServerGroup\n@throws Exception exception",
"Return the number of arguments associated with the specified option.\nThe return value includes the actual option.\nWill return 0 if the option is not supported.",
"Adds a path to the request response table with the specified values\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param pathId ID of path\n@throws Exception exception",
"Sets the position of the currency symbol.\n\n@param posn currency symbol position.",
"obtains the internal JDO lifecycle state of the input StatemanagerInternal.\nThis Method is helpful to display persistent objects internal state.\n@param sm the StateManager to be inspected\n@return the LifeCycleState of a StateManager instance",
"Returns an array of all the singular values"
] |
public static String getOperationName(final ModelNode op) {
if (op.hasDefined(OP)) {
return op.get(OP).asString();
}
throw ControllerClientLogger.ROOT_LOGGER.operationNameNotFound();
} | [
"Returns the name of the operation.\n\n@param op the operation\n\n@return the name of the operation\n\n@throws IllegalArgumentException if the operation was not defined."
] | [
"Returns the overtime cost of this resource assignment.\n\n@return cost",
"Randomize the gradient.",
"Logs all properties",
"Process data for an individual calendar.\n\n@param row calendar data",
"Check whether the given id is included in the list of includes and not excluded.\n\n@param id id to check\n@param includes list of include regular expressions\n@param excludes list of exclude regular expressions\n@return true when id included and not excluded",
"Puts value at given column\n\n@param value Will be encoded using UTF-8",
"Curries a function that takes two arguments.\n\n@param function\nthe original function. May not be <code>null</code>.\n@param argument\nthe fixed first argument of {@code function}.\n@return a function that takes one argument. Never <code>null</code>.",
"Visit an open package of the current module.\n\n@param packaze the qualified name of the opened package.\n@param access the access flag of the opened package,\nvalid values are among {@code ACC_SYNTHETIC} and\n{@code ACC_MANDATED}.\n@param modules the qualified names of the modules that can use deep\nreflection to the classes of the open package or\n<tt>null</tt>.",
"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"
] |
private static void unregisterMBean(String name) {
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
try {
synchronized (mbs) {
ObjectName objName = new ObjectName(name);
if (mbs.isRegistered(objName)) {
mbs.unregisterMBean(objName);
}
}
} catch (Exception e) {
e.printStackTrace();
}
} | [
"Unregister the mbean with the given name, if there is one registered\n\n@param name The mbean name to unregister\n@see #registerMBean(Object, String)"
] | [
"returns null if no device is found.",
"Gets the boxed type of a class\n\n@param type The type\n@return The boxed type",
"Create an LBuffer from a given file.\n@param file\n@return\n@throws IOException",
"Creates an object instance from the Scala class name\n\n@param className the Scala class name\n@return An Object instance",
"Returns real unquoted value for a DisplayValue\n@param key\n@return",
"This method uses the configured git credentials and repo, to test its validity.\nIn addition, in case the user requested creation of a new tag, it checks that\nanother tag with the same name doesn't exist",
"Creates an element that represents a single positioned box containing the specified text string.\n@param data the text string to be contained in the created box.\n@return the resulting DOM element",
"Replaces an existing metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value.\n@return this metadata object.",
"try to find the first none null table name for the given class-descriptor.\nIf cld has extent classes, all of these cld's searched for the first none null\ntable name."
] |
public static Module unserializeModule(final String module) throws IOException {
final ObjectMapper mapper = new ObjectMapper();
mapper.disable(MapperFeature.USE_GETTERS_AS_SETTERS);
return mapper.readValue(module, Module.class);
} | [
"Un-serialize a Json into Module\n@param module String\n@return Module\n@throws IOException"
] | [
"Sets an argument to the collection of arguments. This guarantees only one value will be assigned to the\nargument key.\n\n@param argument the argument to add",
"Use this API to create sslfipskey resources.",
"Computes the null space using QRP decomposition. This is faster than using SVD but slower than QR.\nMuch more stable than QR though.\n@param A (Input) Matrix\n@param totalSingular Number of singular values\n@return Null space",
"Asynchronously put the work into the pending map so we can work on submitting it to the worker\nif we wanted. Could possibly cause duplicate work if we execute the work, then add to the map.\n@param task\n@return",
"Given a container, and a set of raw data blocks, this method extracts\nthe field data and writes it into the container.\n\n@param type expected type\n@param container field container\n@param id entity ID\n@param fixedData fixed data block\n@param varData var data block",
"Retrieve the value of a single-valued parameter.\n\n@param key\n@param defaultValue\n@param cnx",
"Return the current working directory\n\n@return the current working directory",
"Stop a timer of the given string name for the current thread. If no such\ntimer exists, -1 will be returned. Otherwise the return value is the CPU\ntime that was measured.\n\n@param timerName\nthe name of the timer\n@param todoFlags\n@return CPU time if timer existed and was running, and -1 otherwise",
"Retrieves a vertex attribute as a float buffer.\nThe attribute name must be one of the\nattributes named in the descriptor passed to the constructor.\n@param attributeName name of the attribute to update\n@throws IllegalArgumentException if attribute name not in descriptor vertex attribute is not <i>float</i>\n@see #setFloatArray(String, float[])\n@see #getFloatVec(String)"
] |
public boolean toggleProfile(Boolean enabled) {
// TODO: make this return values properly
BasicNameValuePair[] params = {
new BasicNameValuePair("active", enabled.toString())
};
try {
String uri = BASE_PROFILE + uriEncode(this._profileName) + "/" + BASE_CLIENTS + "/";
if (_clientId == null) {
uri += "-1";
} else {
uri += _clientId;
}
JSONObject response = new JSONObject(doPost(uri, params));
} catch (Exception e) {
// some sort of error
System.out.println(e.getMessage());
return false;
}
return true;
} | [
"Turn this profile on or off\n\n@param enabled true or false\n@return true on success, false otherwise"
] | [
"Returns the index of the first invalid character of the zone, or -1 if the zone is valid\n\n@param sequence\n@return",
"Stops the current debug server. Active connections are\nnot affected.",
"Write a string field to the JSON file.\n\n@param fieldName field name\n@param value field value",
"Use this API to update autoscaleaction.",
"Draw a rounded rectangular boundary.\n\n@param rect rectangle\n@param color colour\n@param linewidth line width\n@param r radius for rounded corners",
"Emit information about all of suite's tests.",
"Convert Collection to Set\n@param collection Collection\n@return Set",
"Method to build Mail Channel Adapter for IMAP.\n@param urlName Mail source URL.\n@return Mail Channel for IMAP",
"Use this API to fetch all the protocolhttpband resources that are configured on netscaler.\nThis uses protocolhttpband_args which is a way to provide additional arguments while fetching the resources."
] |
public Object lookup(Identity oid)
{
Object ret = null;
if (oid != null)
{
ObjectCache cache = getCache(oid, null, METHOD_LOOKUP);
if (cache != null)
{
ret = cache.lookup(oid);
}
}
return ret;
} | [
"Looks up the object from the cache\n\n@param oid The Identity to look up the object for\n@return The object if found, otherwise null"
] | [
"Returns the compact project membership records for the project.\n\n@param project The project for which to fetch memberships.\n@return Request object",
"Encrypt a string with AES-128 using the specified key.\n\n@param message Input string.\n@param key Encryption key.\n@return Encrypted output.",
"Finds all nWise combinations of a set of variables, each with a given domain of values\n\n@param nWise the number of variables in each combination\n@param coVariables the varisbles\n@param variableDomains the domains\n@return all nWise combinations of the set of variables",
"Return the bean type, untangling the proxy if needed\n\n@param name\nthe bean name\n@return The Class of the bean",
"Build the operation transformers.\n\n@param registry the shared resource registry\n@return the operation transformers",
"Convenience method to allow a cause. Grrrr.",
"Performs a transpose across block sub-matrices. Reduces\nthe number of cache misses on larger matrices.\n\n*NOTE* If this is beneficial is highly dependent on the computer it is run on. e.g:\n- Q6600 Almost twice as fast as standard.\n- Pentium-M Same speed and some times a bit slower than standard.\n\n@param A Original matrix. Not modified.\n@param A_tran Transposed matrix. Modified.\n@param blockLength Length of a block.",
"Adds OPT_X | OPT_HEX option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Gets an expiring URL for downloading a file directly from Box. This can be user,\nfor example, for sending as a redirect to a browser to cause the browser\nto download the file directly from Box.\n\n@return the temporary download URL"
] |
public Number getUnits(int field) throws MPXJException
{
Number result;
if ((field < m_fields.length) && (m_fields[field].length() != 0))
{
try
{
result = Double.valueOf(m_formats.getUnitsDecimalFormat().parse(m_fields[field]).doubleValue() * 100);
}
catch (ParseException ex)
{
throw new MPXJException("Failed to parse units", ex);
}
}
else
{
result = null;
}
return (result);
} | [
"Accessor method used to retrieve a Number instance representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field\n@throws MPXJException normally thrown when parsing fails"
] | [
"Validates the input parameters.",
"Retrieve the fixed data offset for a specific field.\n\n@param type field type\n@return offset",
"Perform the given work with a Jedis connection from the given pool.\nWraps any thrown checked exceptions in a RuntimeException.\n\n@param pool the resource pool\n@param work the work to perform\n@param <V> the result type\n@return the result of the given work",
"Locks the bundle descriptor.\n@throws CmsException thrown if locking fails.",
"Set the color for each total for the column\n@param column the number of the column (starting from 1)\n@param color",
"Returns an Object array of all FK field values of the specified object.\nIf the specified object is an unmaterialized Proxy, it will be materialized\nto read the FK values.\n\n@throws MetadataException if an error occours while accessing ForeingKey values on obj",
"Use this API to add snmpuser resources.",
"Computes the unbiased standard deviation of all the elements.\n\n@return standard deviation",
"Check if the print has not been asked to stop taking new jobs.\n\n@return true if it's OK to take new jobs."
] |
private void logBinaryStringInfo(StringBuilder binaryString) {
encodeInfo += "Binary Length: " + binaryString.length() + "\n";
encodeInfo += "Binary String: ";
int nibble = 0;
for (int i = 0; i < binaryString.length(); i++) {
switch (i % 4) {
case 0:
if (binaryString.charAt(i) == '1') {
nibble += 8;
}
break;
case 1:
if (binaryString.charAt(i) == '1') {
nibble += 4;
}
break;
case 2:
if (binaryString.charAt(i) == '1') {
nibble += 2;
}
break;
case 3:
if (binaryString.charAt(i) == '1') {
nibble += 1;
}
encodeInfo += Integer.toHexString(nibble);
nibble = 0;
break;
}
}
if ((binaryString.length() % 4) != 0) {
encodeInfo += Integer.toHexString(nibble);
}
encodeInfo += "\n";
} | [
"Logs binary string as hexadecimal"
] | [
"Use this API to update snmpuser resources.",
"Shuts down a managed domain container. The servers are first stopped, then the host controller is shutdown.\n\n@param client the client used to communicate with the server\n@param timeout the graceful shutdown timeout, a value of {@code -1} will wait indefinitely and a value of\n{@code 0} will not attempt a graceful shutdown\n\n@throws IOException if an error occurs communicating with the server\n@throws OperationExecutionException if the operation used to shutdown the managed domain failed",
"return the ctc costs and gradients, given the probabilities and labels",
"Load an animation for the current avatar.\n@param animResource resource with the animation\n@param boneMap optional bone map to map animation skeleton to avatar",
"Renders the given FreeMarker template to given directory, using given variables.",
"Handles reports by consumers\n\n@param name the name of the reporting consumer\n@param report the number of lines the consumer has written since last report\n@return \"exit\" if maxScenarios has been reached, \"ok\" otherwise",
"Build the context name.\n\n@param objs the objects\n@return the global context name",
"This is the profiles page. this is the 'regular' page when the url is typed in",
"get the last segment at the moment\n\n@return the last segment"
] |
Subsets and Splits