query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
private static Class getClassForClassNode(ClassNode type) {
// todo hamlet - move to a different "InferenceUtil" object
Class primitiveType = getPrimitiveType(type);
if (primitiveType != null) {
return primitiveType;
} else if (classNodeImplementsType(type, String.class)) {
return String.class;
} else if (classNodeImplementsType(type, ReentrantLock.class)) {
return ReentrantLock.class;
} else if (type.getName() != null && type.getName().endsWith("[]")) {
return Object[].class; // better type inference could be done, but oh well
}
return null;
} | [
"This is private. It is a helper function for the utils."
] | [
"Finds a child resource with the given key.\n\n@param key the child resource key\n@return null if no child resource exists with the given name else the child resource",
"Use this API to delete clusterinstance resources.",
"Create all the links possible between the Declaration and all the ImporterService matching the.\nImporterServiceFilter of the Linker.\n\n@param declarationSRef the ServiceReference<Declaration> of the Declaration",
"Scan a network interface to find if it has an address space which matches the device we are trying to reach.\nIf so, return the address specification.\n\n@param aDevice the DJ Link device we are trying to communicate with\n@param networkInterface the network interface we are testing\n@return the address which can be used to communicate with the device on the interface, or null",
"Use this API to add cachecontentgroup.",
"Find all methods on classes under scanBase that are annotated with annotationClass.\n\n@param scanBase Package to scan recursively, in dot notation (ie: org.jrugged...)\n@param annotationClass Class of the annotation to search for\n@return Set<Method> The set of all @{java.lang.reflect.Method}s having the annotation",
"Permanently close the ClientRequestExecutor pool. Resources subsequently\nchecked in will be destroyed.",
"Utility function that checks if store names are valid on a node.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch stores from\n@param storeNames Store names to check",
"Get the seconds difference"
] |
public ResultSetAndStatement executeQuery(Query query, ClassDescriptor cld) throws PersistenceBrokerException
{
if (logger.isDebugEnabled())
{
logger.debug("executeQuery: " + query);
}
/*
* MBAIRD: we should create a scrollable resultset if the start at
* index or end at index is set
*/
boolean scrollable = ((query.getStartAtIndex() > Query.NO_START_AT_INDEX) || (query.getEndAtIndex() > Query.NO_END_AT_INDEX));
/*
* OR if the prefetching of relationships is being used.
*/
if (query != null && query.getPrefetchedRelationships() != null && !query.getPrefetchedRelationships().isEmpty())
{
scrollable = true;
}
final StatementManagerIF sm = broker.serviceStatementManager();
final SelectStatement sql = broker.serviceSqlGenerator().getPreparedSelectStatement(query, cld);
PreparedStatement stmt = null;
ResultSet rs = null;
try
{
final int queryFetchSize = query.getFetchSize();
final boolean isStoredProcedure = isStoredProcedure(sql.getStatement());
stmt = sm.getPreparedStatement(cld, sql.getStatement() ,
scrollable, queryFetchSize, isStoredProcedure);
if (isStoredProcedure)
{
// Query implemented as a stored procedure, which must return a result set.
// Query sytax is: { ?= call PROCEDURE_NAME(?,...,?)}
getPlatform().registerOutResultSet((CallableStatement) stmt, 1);
sm.bindStatement(stmt, query, cld, 2);
if (logger.isDebugEnabled())
logger.debug("executeQuery: " + stmt);
stmt.execute();
rs = (ResultSet) ((CallableStatement) stmt).getObject(1);
}
else
{
sm.bindStatement(stmt, query, cld, 1);
if (logger.isDebugEnabled())
logger.debug("executeQuery: " + stmt);
rs = stmt.executeQuery();
}
return new ResultSetAndStatement(sm, stmt, rs, sql);
}
catch (PersistenceBrokerException e)
{
// release resources on exception
sm.closeResources(stmt, rs);
logger.error("PersistenceBrokerException during the execution of the query: " + e.getMessage(), e);
throw e;
}
catch (SQLException e)
{
// release resources on exception
sm.closeResources(stmt, rs);
throw ExceptionHelper.generateException(e, sql.getStatement(), null, logger, null);
}
} | [
"performs a SELECT operation against RDBMS.\n@param query the query string.\n@param cld ClassDescriptor providing JDBC information."
] | [
"Creates a Span that covers an exact row. String parameters will be encoded as UTF-8",
"Send a beat announcement to all registered master listeners.\n\n@param beat the beat sent by the tempo master",
"Calculate the value of a CMS strike using the Black-Scholes model for the swap rate together with\nthe Hunt-Kennedy convexity adjustment.\n\n@param forwardSwaprate The forward swap rate\n@param volatility Volatility of the log of the swap rate\n@param swapAnnuity The swap annuity\n@param optionMaturity The option maturity\n@param swapMaturity The swap maturity\n@param payoffUnit The payoff unit, e.g., the discount factor corresponding to the payment date\n@param optionStrike The option strike\n@return Value of the CMS strike",
"Disables all the overrides for a specific profile\n\n@param model\n@param profileID\n@param clientUUID\n@return",
"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",
"Get list of Jobs from a queue.\n\n@param jedis\n@param queueName\n@param jobOffset\n@param jobCount\n@return",
"characters callback.",
"Add a '>' clause so the column must be greater-than the value.",
"Read the domain controller's data from an input stream.\n\n@param instream the input stream\n@throws Exception"
] |
protected static BigInteger getRadixPower(BigInteger radix, int power) {
long key = (((long) radix.intValue()) << 32) | power;
BigInteger result = radixPowerMap.get(key);
if(result == null) {
if(power == 1) {
result = radix;
} else if((power & 1) == 0) {
BigInteger halfPower = getRadixPower(radix, power >> 1);
result = halfPower.multiply(halfPower);
} else {
BigInteger halfPower = getRadixPower(radix, (power - 1) >> 1);
result = halfPower.multiply(halfPower).multiply(radix);
}
radixPowerMap.put(key, result);
}
return result;
} | [
"Caches the results of radix to the given power.\n\n@param radix\n@param power\n@return"
] | [
"get all consumers for the group\n\n@param zkClient the zookeeper client\n@param group the group name\n@return topic->(consumerIdStringA-0,consumerIdStringA-1...consumerIdStringB-0,consumerIdStringB-1)",
"use the design parameters to compute the constraint equation to get the value",
"Gets the Square Euclidean distance between two points.\n\n@param x A point in space.\n@param y A point in space.\n@return The Square Euclidean distance between x and y.",
"Sets the right padding for all cells in the row.\n@param paddingRight new padding, ignored if smaller than 0\n@return this to allow chaining",
"Uses current variable assignments and info in an NWiseActionTag to expand on an n wise combinatorial set\n\n@param action an NWiseAction Action\n@param possibleStateList a current list of possible states produced so far from expanding a model state\n@return every input possible state expanded on an n wise combinatorial set defined by that input possible state",
"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.",
"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",
"Helper to read a mandatory String value list.\n@param path The XML path of the element to read.\n@return The String list stored in the XML, or <code>null</code> if the value could not be read.\n@throws Exception thrown if the list of String values can not be read.",
"Convert moneyness given as difference to par swap rate to moneyness in bp.\nUses the fixing times of the fix schedule to determine fractions.\n\n@param moneyness as offset.\n@return Moneyness in bp."
] |
public double totalCount() {
if (depth() == 1) {
return total; // I think this one is always OK. Not very principled here, though.
} else {
double result = 0.0;
for (K o: topLevelKeySet()) {
result += conditionalizeOnce(o).totalCount();
}
return result;
}
} | [
"returns the total count of objects in the GeneralizedCounter."
] | [
"Use this API to fetch appfwlearningsettings resource of given name .",
"Use this API to add nsacl6 resources.",
"Called to reset current sensor data.\n\n@param timeStamp\ncurrent time stamp\n@param rotationW\nQuaternion rotation W\n@param rotationX\nQuaternion rotation X\n@param rotationY\nQuaternion rotation Y\n@param rotationZ\nQuaternion rotation Z\n@param gyroX\nGyro rotation X\n@param gyroY\nGyro rotation Y\n@param gyroZ\nGyro rotation Z",
"capture 3D screenshot",
"Configure all UI elements in the \"ending\"-options panel.",
"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.",
"ChromeCast does not allow you to jump levels too quickly to avoid blowing speakers.\nSetting by increment allows us to easily get the level we want\n\n@param level volume level from 0 to 1 to set\n@throws IOException\n@see <a href=\"https://developers.google.com/cast/docs/design_checklist/sender#sender-control-volume\">sender</a>",
"Get photos from the user's contacts.\n\nThis method requires authentication with 'read' permission.\n\n@param count\nThe number of photos to return\n@param justFriends\nSet to true to only show friends photos\n@param singlePhoto\nSet to true to get a single photo\n@param includeSelf\nSet to true to include self\n@return The Collection of photos\n@throws FlickrException",
"Use this API to add authenticationradiusaction."
] |
@Override
public Map<String, String> values() {
Map<String, String> values = new LinkedHashMap<>();
for (Row each : delegates) {
for (Entry<String, String> entry : each.values().entrySet()) {
String name = entry.getKey();
if (!values.containsKey(name)) {
values.put(name, entry.getValue());
}
}
}
return values;
} | [
"Returns values aggregated from all the delegates, without overriding\nvalues that already exist.\n\n@return The Map of aggregated values"
] | [
"Initializes the mode switcher.\n@param current the current edit mode",
"Map event type enum.\n\n@param eventType the event type\n@return the event type enum",
"Returns a reference definition of the given name if it exists.\n\n@param name The name of the reference\n@return The reference def or <code>null</code> if there is no such reference",
"Gets the bytes for the highest address in the range represented by this address.\n\n@return",
"Checks if the DPI value is already set for GeoServer.",
"Returns status help message.\n\n@param user CmsUser\n@param disabled boolean\n@param newUser boolean\n@return String",
"Use this API to fetch filterpolicy_csvserver_binding resources of given name .",
"Return the path to the parent directory. Should return the root if\nfrom is root.\n\n@param from either a file or directory\n@return the parent directory",
"Read an element which contains only a single boolean attribute.\n@param reader the reader\n@param attributeName the attribute name, usually \"value\"\n@return the boolean value\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."
] |
public String toStringByValue() {
IntArrayList theKeys = new IntArrayList();
keysSortedByValue(theKeys);
StringBuffer buf = new StringBuffer();
buf.append("[");
int maxIndex = theKeys.size() - 1;
for (int i = 0; i <= maxIndex; i++) {
int key = theKeys.get(i);
buf.append(String.valueOf(key));
buf.append("->");
buf.append(String.valueOf(get(key)));
if (i < maxIndex) buf.append(", ");
}
buf.append("]");
return buf.toString();
} | [
"Returns a string representation of the receiver, containing\nthe String representation of each key-value pair, sorted ascending by value."
] | [
"Registers your facet filters, adding them to this InstantSearch's widgets.\n\n@param filters a List of facet filters.",
"Each element of the second array is added to each element of the first.",
"Creates image stream request and returns it in JSON formatted string.\n\n@param name Name of the image stream\n@param insecure If the registry where the image is stored is insecure\n@param image Image name, includes registry information and tag\n@param version Image stream version.\n@return JSON formatted string",
"Time since last time the store was swapped\n\n@return Time in milliseconds since the store was swapped",
"Runs the module import script.\n\n@param cms the CMS context to use\n@param module the module for which to run the script",
"Parses a raw WBS value from the database and breaks it into\ncomponent parts ready for formatting.\n\n@param value raw WBS value",
"Returns an iterable containing the items in this folder sorted by name and direction.\n@param sort the field to sort by, can be set as `name`, `id`, and `date`.\n@param direction the direction to display the item results.\n@param fields the fields to retrieve.\n@return an iterable containing the items in this folder.",
"Add contents to the deployment and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException",
"Returns a color for a given absolute number that is to be shown on the\nmap.\n\n@param value\n@return"
] |
public void sendJsonToUrl(Object data, String url) {
sendToUrl(JSON.toJSONString(data), url);
} | [
"Send JSON representation of given data object to all connections\nconnected to given URL\n\n@param data the data object\n@param url the url"
] | [
"Validates operations against their description providers\n\n@param operations The operations to validate\n@throws IllegalArgumentException if any operation is not valid",
"main class entry point.",
"note that for read from file, this will just load all to memory. not fit\nif need to read a very large file. However for getting the host name.\nnormally it is fine.\n\nfor reading large file, should use iostream.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the content from path\n@throws IOException\nSignals that an I/O exception has occurred.",
"Map content.\n\n@param dh the data handler\n@return the string",
"region Override Methods",
"Set the values of a set of knots.\n@param x the knot positions\n@param y the knot colors\n@param types the knot types\n@param offset the first knot to set\n@param count the number of knots",
"Get a property as a boolean or throw exception.\n\n@param key the property name",
"Get a property as a boolean or throw exception.\n\n@param key the property name",
"Creates a CSS rgb specification from a PDF color\n@param pdcolor\n@return the rgb() string"
] |
public static void main(String[] args) {
Settings settings = new Settings();
new JCommander(settings, args);
if (!settings.isGuiSupressed()) {
OkapiUI okapiUi = new OkapiUI();
okapiUi.setVisible(true);
} else {
int returnValue;
returnValue = commandLine(settings);
if (returnValue != 0) {
System.out.println("An error occurred");
}
}
} | [
"Starts the Okapi Barcode UI.\n\n@param args the command line arguments"
] | [
"Setting the type of Checkbox.",
"Sets the polling status.\n\n@param status the polling status.\n@param statusCode the HTTP status code\n@throws IllegalArgumentException thrown if status is null.",
"Binding view holder with payloads is used to handle partial changes in item.",
"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",
"PUT and POST are identical calls except for the header specifying the method",
"Notifies that multiple header items are changed.\n\n@param positionStart the position.\n@param itemCount the item count.",
"Joins the given parts to recover the original secret.\n\n<p><b>N.B.:</b> There is no way to determine whether or not the returned value is actually the\noriginal secret. If the parts are incorrect, or are under the threshold value used to split the\nsecret, a random value will be returned.\n\n@param parts a map of part IDs to part values\n@return the original secret\n@throws IllegalArgumentException if {@code parts} is empty or contains values of varying\nlengths",
"Handles Multi Channel Encapsulation message. Decapsulates\nan Application Command message and handles it using the right\nendpoint.\n@param serialMessage the serial message to process.\n@param offset the offset at which to start procesing.",
"Read custom property definitions for resources.\n\n@param gpResources GanttProject resources"
] |
void lockSharedInterruptibly(final Integer permit) throws InterruptedException {
if (permit == null) {
throw new IllegalArgumentException();
}
sync.acquireSharedInterruptibly(permit);
} | [
"Acquire the shared lock allowing the acquisition to be interrupted.\n@param permit - the permit Integer for this operation. May not be {@code null}.\n@throws InterruptedException - if the acquiring thread is interrupted.\n@throws IllegalArgumentException if {@code permit} is null."
] | [
"Populate the authenticated user profiles in the Shiro subject.\n\n@param profiles the linked hashmap of profiles",
"The cell String is the string representation of the object.\nIf padLeft is greater than 0, it is padded. Ditto right",
"Create a table model from an object's properties.\n\n@param object target object\n@param excludedMethods method names to exclude\n@return table model",
"Get a property as a double or defaultValue.\n\n@param key the property name\n@param defaultValue the default value",
"Filters a list of rows from the named table. If a column name and a value\nare supplied, then use this to filter the rows. If no column name is\nsupplied, then return all rows.\n\n@param tableName table name\n@param columnName filter column name\n@param id filter column value\n@return filtered list of rows",
"Set the classpath for loading the driver.\n\n@param classpath the classpath",
"It's enough to just set the disabled attribute on the\nelement, but we want to also add a \"disabled\" class so that we can\nstyle it.\n\nAt some point we'll just be able to use .button:disabled,\nbut that doesn't work in IE8-",
"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",
"Removes metadata related to rebalancing.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeIds Node ids to clear metadata after rebalancing"
] |
private static Collection<String> addOtherClasses(Collection<String> feats, List<? extends CoreLabel> info,
int loc, Clique c) {
String addend = null;
String pAnswer = info.get(loc - 1).get(AnswerAnnotation.class);
String p2Answer = info.get(loc - 2).get(AnswerAnnotation.class);
String p3Answer = info.get(loc - 3).get(AnswerAnnotation.class);
String p4Answer = info.get(loc - 4).get(AnswerAnnotation.class);
String p5Answer = info.get(loc - 5).get(AnswerAnnotation.class);
String nAnswer = info.get(loc + 1).get(AnswerAnnotation.class);
// cdm 2009: Is this really right? Do we not need to differentiate names that would collide???
if (c == FeatureFactory.cliqueCpC) {
addend = '|' + pAnswer;
} else if (c == FeatureFactory.cliqueCp2C) {
addend = '|' + p2Answer;
} else if (c == FeatureFactory.cliqueCp3C) {
addend = '|' + p3Answer;
} else if (c == FeatureFactory.cliqueCp4C) {
addend = '|' + p4Answer;
} else if (c == FeatureFactory.cliqueCp5C) {
addend = '|' + p5Answer;
} else if (c == FeatureFactory.cliqueCpCp2C) {
addend = '|' + pAnswer + '-' + p2Answer;
} else if (c == FeatureFactory.cliqueCpCp2Cp3C) {
addend = '|' + pAnswer + '-' + p2Answer + '-' + p3Answer;
} else if (c == FeatureFactory.cliqueCpCp2Cp3Cp4C) {
addend = '|' + pAnswer + '-' + p2Answer + '-' + p3Answer + '-' + p4Answer;
} else if (c == FeatureFactory.cliqueCpCp2Cp3Cp4Cp5C) {
addend = '|' + pAnswer + '-' + p2Answer + '-' + p3Answer + '-' + p4Answer + '-' + p5Answer;
} else if (c == FeatureFactory.cliqueCnC) {
addend = '|' + nAnswer;
} else if (c == FeatureFactory.cliqueCpCnC) {
addend = '|' + pAnswer + '-' + nAnswer;
}
if (addend == null) {
return feats;
}
Collection<String> newFeats = new HashSet<String>();
for (String feat : feats) {
String newFeat = feat + addend;
newFeats.add(newFeat);
}
return newFeats;
} | [
"This adds to the feature name the name of classes that are other than\nthe current class that are involved in the clique. In the CMM, these\nother classes become part of the conditioning feature, and only the\nclass of the current position is being predicted.\n\n@return A collection of features with extra class information put\ninto the feature name."
] | [
"Read general project properties.",
"Gets the file from which boot operations should be parsed.\n@return the file. Will not be {@code null}",
"Sets the necessary height for all bands in the report, to hold their children",
"Allows the closure to be called for NullObject\n\n@param closure the closure to call on the object\n@return result of calling the closure",
"Removes a watermark from the item.\nIf the item did not have a watermark applied to it, a 404 Not Found will be returned by API.\n@param itemUrl url template for the item.",
"Get the Operation metadata for an MBean by name.\n@return the {@link Map} of {@link String} operation names to {@link MBeanOperationInfo} values.",
"Get photos from the user's contacts.\n\nThis method requires authentication with 'read' permission.\n\n@param count\nThe number of photos to return\n@param justFriends\nSet to true to only show friends photos\n@param singlePhoto\nSet to true to get a single photo\n@param includeSelf\nSet to true to include self\n@return The Collection of photos\n@throws FlickrException",
"Attach the given link to the classification, while checking for duplicates.",
"Adds another condition for an element within this annotation."
] |
protected void append(Env env) {
addAllWithFilter(this.envVars, env.envVars, filter.getPatternFilter());
addAllWithFilter(this.sysVars, env.sysVars, filter.getPatternFilter());
} | [
"Append environment variables and system properties from othre PipelineEvn object"
] | [
"Pull docker image using the docker java client.\n\n@param imageTag\n@param username\n@param password\n@param host",
"Bessel function of the second kind, of order n.\n\n@param n Order.\n@param x Value.\n@return Y value.",
"Destroys the current session",
"Returns all visble sets and pools the photo belongs to.\n\nThis method does not require authentication.\n\n@param photoId\nThe photo to return information for.\n@return a list of {@link PhotoContext} objects\n@throws FlickrException",
"Use this API to fetch appfwprofile_excluderescontenttype_binding resources of given name .",
"Returns an iterator over the items in the trash.\n@return an iterator over the items in the trash.",
"List app dynos for an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.",
"This method checks for paging information and returns the appropriate\ndata\n\n@param result\n@param httpResponse\n@param where\n@return a {@link WrappingPagedList} if there is paging, result if not.",
"Attempts to retrieves ResourceReport until maxWaitMs time is reached. Set maxWaitMs to -1 to\nretry forever."
] |
public Map<String, Table> process(File directory, String prefix) throws IOException
{
String filePrefix = prefix.toUpperCase();
Map<String, Table> tables = new HashMap<String, Table>();
File[] files = directory.listFiles();
if (files != null)
{
for (File file : files)
{
String name = file.getName().toUpperCase();
if (!name.startsWith(filePrefix))
{
continue;
}
int typeIndex = name.lastIndexOf('.') - 3;
String type = name.substring(typeIndex, typeIndex + 3);
TableDefinition definition = TABLE_DEFINITIONS.get(type);
if (definition != null)
{
Table table = new Table();
TableReader reader = new TableReader(definition);
reader.read(file, table);
tables.put(type, table);
//dumpCSV(type, definition, table);
}
}
}
return tables;
} | [
"Main entry point. Reads a directory containing a P3 Btrieve database files\nand returns a map of table names and table content.\n\n@param directory directory containing the database\n@param prefix file name prefix used to identify files from the same database\n@return Map of table names to table data"
] | [
"Return a stream of resources from a response\n\n@param response the response\n@param <R> the resource type\n@param <U> the response type\n@return a stream of resources from the response",
"Mapping message info.\n\n@param messageInfo the message info\n@return the message info type",
"Use this API to add authenticationradiusaction.",
"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.",
"Add a '<' clause so the column must be less-than the value.",
"Read the role definitions from a GanttProject project.\n\n@param gpProject GanttProject project",
"Converts a submatrix into an extract matrix operation.\n@param variableTarget The variable in which the submatrix is extracted from",
"Returns true if a List literal that contains only entries that are constants.\n@param expression - any expression",
"Old SOAP client uses new SOAP service with the\nredirection to the new endpoint and transformation\non the server side"
] |
private static void parseSsextensions(JSONObject modelJSON,
Diagram current) throws JSONException {
if (modelJSON.has("ssextensions")) {
JSONArray array = modelJSON.getJSONArray("ssextensions");
for (int i = 0; i < array.length(); i++) {
current.addSsextension(array.getString(i));
}
}
} | [
"adds all json extension to an diagram\n@param modelJSON\n@param current\n@throws org.json.JSONException"
] | [
"Builds the HTML code for a select widget given a bean containing the select options\n\n@param htmlAttributes html attributes for the select widget\n@param options the bean containing the select options\n\n@return the HTML for the select box",
"Use this API to fetch all the configstatus resources that are configured on netscaler.",
"Tries to load the custom error page at the given rootPath.\n@param cms {@link CmsObject} used for reading the resource (site root and uri get adjusted!)\n@param req the current request\n@param res the current response\n@param rootPath the VFS root path to the error page resource\n@return a flag, indicating if the error page could be loaded",
"Read a text stream into a single string.\n\n@param inputStream\nStream containing text. Will be closed on exit.\n@return The contents, or null on error.",
"Use this API to add appfwjsoncontenttype.",
"Parses server section of Zookeeper connection string",
"Add a '>' clause so the column must be greater-than the value.",
"Returns the available module names regarding the filters\n\n@param name String\n@param filters FiltersHolder\n@return List<String>",
"Applies the given codec registry to be used alongside the default codec registry.\n\n@param codecRegistry the codec registry to merge in.\n@return an {@link StitchObjectMapper} with the merged codec registries."
] |
@Inject("struts.json.action.fileProtocols")
public void setFileProtocols(String fileProtocols) {
if (StringUtils.isNotBlank(fileProtocols)) {
this.fileProtocols = TextParseUtil.commaDelimitedStringToSet(fileProtocols);
}
} | [
"File URLs whose protocol are in these list will be processed as jars\ncontaining classes\n\n@param fileProtocols\nComma separated list of file protocols that will be considered\nas jar files and scanned"
] | [
"Use this API to fetch all the vpnsessionaction resources that are configured on netscaler.",
"Performs an implicit double step given the set of two imaginary eigenvalues provided.\nSince one eigenvalue is the complex conjugate of the other only one set of real and imaginary\nnumbers is needed.\n\n@param x1 upper index of submatrix.\n@param x2 lower index of submatrix.\n@param real Real component of each of the eigenvalues.\n@param img Imaginary component of one of the eigenvalues.",
"Use this API to fetch all the bridgetable resources that are configured on netscaler.",
"Handles the response of the Request node request.\n@param incomingMessage the response message to process.",
"Decode the password from the given data. Will decode the data block as well.\n\n@param data encrypted data block\n@param encryptionCode encryption code\n\n@return password",
"Add a greeting to the specified guestbook.",
"If task completed success or failure from response.\n\n@param myResponse\nthe my response\n@return true, if successful",
"Detect new objects.",
"Retrieve a list of the available P3 project names from a directory.\n\n@param directory directory containing P3 files\n@return list of project names"
] |
@PostConstruct
protected void postConstruct() throws GeomajasException {
if (null == baseTmsUrl) {
throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "baseTmsUrl");
}
// Make sure we have a base URL we can work with:
if ((baseTmsUrl.startsWith("http://") || baseTmsUrl.startsWith("https://")) && !baseTmsUrl.endsWith("/")) {
baseTmsUrl += "/";
}
// Make sure there is a correct RasterLayerInfo object:
if (layerInfo == null || layerInfo == UNUSABLE_LAYER_INFO) {
try {
tileMap = configurationService.getCapabilities(this);
version = tileMap.getVersion();
extension = tileMap.getTileFormat().getExtension();
layerInfo = configurationService.asLayerInfo(tileMap);
usable = true;
} catch (TmsLayerException e) {
// a layer needs an info object to keep the DtoConfigurationPostProcessor happy !
layerInfo = UNUSABLE_LAYER_INFO;
usable = false;
log.warn("The layer could not be correctly initialized: " + getId(), e);
}
} else if (extension == null) {
throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "extension");
}
if (layerInfo != null) {
// Finally prepare some often needed values:
state = new TileServiceState(geoService, layerInfo);
// when proxying the real url will be resolved later on, just use a simple one for now
boolean proxying = useCache || useProxy || null != authentication;
if (tileMap != null && !proxying) {
urlBuilder = new TileMapUrlBuilder(tileMap);
} else {
urlBuilder = new SimpleTmsUrlBuilder(extension);
}
}
} | [
"Finish initializing the service."
] | [
"Obtains a local date in Ethiopic 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 Ethiopic local date, not null\n@throws DateTimeException if unable to create the date",
"Given the alias of the entity and the path to the relationship it will return the alias\nof the component.\n\n@param entityAlias the alias of the entity\n@param propertyPathWithoutAlias the path to the property without the alias\n@return the alias the relationship or null",
"Use this API to fetch aaauser_intranetip_binding resources of given name .",
"Use this API to fetch clusterinstance resources of given names .",
"Loads the asset referenced by the file name\nunder the owner of this component.\nIf this component was constructed to replace the scene with\nthe asset, the scene will contain only the owner of this\ncomponent upon return. Otherwise, the loaded asset is a\nchild of this component's owner.\n\nLoading the asset is performed in a separate thread.\nThis function returns before the asset has finished loading.\nIAssetEvents are emitted to the event listener on the context.\n\n@param scene scene to add the model to, null is permissible\n@return always true",
"Build the context name.\n\n@param objs the objects\n@return the global context name",
"Utility function that fetches partitions.\n\n@param adminClient An instance of AdminClient points to given cluster\n@return all partitions on cluster",
"Creates a proxy object which implements a given bean interface.\n\n@param proxyInterface\nthe interface the the proxy will implement\n@param <T>\nthe proxy implementation type\n@return the proxy implementation\n@throws NullPointerException\nif proxyInterface is null",
"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"
] |
public void get( int row , int col , Complex_F64 output ) {
ops.get(mat,row,col,output);
} | [
"Used to get 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 output Storage for the value"
] | [
"URLDecode a string\n@param s\n@return",
"Retrieves the earliest start date for all assigned tasks.\n\n@return start date",
"converts a java.net.URI to a decoded string",
"Internal method that finds the matching enum for a configured field that has the name argument.\n\n@return The matching enum value or null if blank enum name.\n@throws IllegalArgumentException\nIf the enum name is not known.",
"Attaches an arbitrary object to this context only if the object was not already attached. If a value has already\nbeen attached with the key provided, the current value associated with the key is returned.\n\n@param key they attachment key used to ensure uniqueness and used for retrieval of the value.\n@param value the value to store.\n@param <V> the value type of the attachment.\n\n@return the previous value associated with the key or {@code null} if there was no previous value.",
"Rotate list of String. Used for randomize selection of received endpoints\n\n@param strings\nlist of Strings\n@return the same list in random order",
"Retrieve list of resource extended attributes.\n\n@return list of extended attributes",
"Parses the supplied text and converts it to a Long\ncorresponding to that midnight in UTC on the specified date.\n\n@return null if it fails to parsing using the specified\nDateTimeFormat",
"Utility method to read a percentage value.\n\n@param data data block\n@param offset offset into data block\n@return percentage value"
] |
@NonNull
@UiThread
private HashMap<Integer, Boolean> generateExpandedStateMap() {
HashMap<Integer, Boolean> parentHashMap = new HashMap<>();
int childCount = 0;
int listItemCount = mFlatItemList.size();
for (int i = 0; i < listItemCount; i++) {
if (mFlatItemList.get(i) != null) {
ExpandableWrapper<P, C> listItem = mFlatItemList.get(i);
if (listItem.isParent()) {
parentHashMap.put(i - childCount, listItem.isExpanded());
} else {
childCount++;
}
}
}
return parentHashMap;
} | [
"Generates a HashMap used to store expanded state for items in the list\non configuration change or whenever onResume is called.\n\n@return A HashMap containing the expanded state of all parents"
] | [
"Use this API to fetch the statistics of all protocolip_stats resources that are configured on netscaler.",
"Gets a SerialMessage with the BASIC GET command\n@return the serial message",
"Get the account knowing his title\n@param title the title of the account (it can change at runtime!)\n@return the account founded or null if the account not exists",
"Process the response by reporting proper log and feeding failure\ndetectors\n\n@param response\n@param pipeline",
"calculate and set position to menu items",
"checks if there is a writelock for transaction tx on object obj.\nReturns true if so, else false.",
"Notify all WorkerListeners currently registered for the given WorkerEvent.\n@param event the WorkerEvent that occurred\n@param worker the Worker that the event occurred in\n@param queue the queue the Worker is processing\n@param job the Job related to the event (only supply for JOB_PROCESS, JOB_EXECUTE, JOB_SUCCESS, and\nJOB_FAILURE events)\n@param runner the materialized object that the Job specified (only supply for JOB_EXECUTE and\nJOB_SUCCESS events)\n@param result the result of the successful execution of the Job (only set for JOB_SUCCESS and if the Job was\na Callable that returned a value)\n@param t the Throwable that caused the event (only supply for JOB_FAILURE and ERROR events)",
"Queries a Search Index and returns ungrouped results. In case the query\nused grouping, an empty list is returned\n\n@param <T> Object type T\n@param query the Lucene query to be passed to the Search index\n@param classOfT The class of type T\n@return The result of the search query as a {@code List<T> }",
"Do the search, called as a \"page action\""
] |
public synchronized Message simpleRequest(Message.KnownType requestType, Message.KnownType responseType,
Field... arguments)
throws IOException {
final NumberField transaction = assignTransactionNumber();
final Message request = new Message(transaction, new NumberField(requestType.protocolValue, 2), arguments);
sendMessage(request);
final Message response = Message.read(is);
if (response.transaction.getValue() != transaction.getValue()) {
throw new IOException("Received response with wrong transaction ID. Expected: " + transaction.getValue() +
", got: " + response);
}
if (responseType != null && response.knownType != responseType) {
throw new IOException("Received response with wrong type. Expected: " + responseType +
", got: " + response);
}
return response;
} | [
"Send a request that expects a single message as its response, then read and return that response.\n\n@param requestType identifies what kind of request to send\n@param responseType identifies the type of response we expect, or {@code null} if we’ll accept anything\n@param arguments The argument fields to send in the request\n\n@return the response from the player\n\n@throws IOException if there is a communication problem, or if the response does not have the same transaction\nID as the request."
] | [
"Builds the path for a closed arc, returning a PolygonOptions that can be\nfurther customised before use.\n\n@param center\n@param start\n@param end\n@param arcType Pass in either ArcType.CHORD or ArcType.ROUND\n@return PolygonOptions with the paths element populated.",
"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",
"copied and altered from TransactionHelper",
"Convert an Object to a Time, without an Exception",
"Gets the estimated time remaining in milliseconds based upon the total number of work units, the start time, and how many units have been done\nso far.\n\nThis should not be called before any work units have been done.",
"Reads a single schema file.\n\n@param reader The schema reader\n@param schemaFile The schema file\n@return The model",
"Extract calendar data.",
"used for upload progress",
"Use this API to reset Interface resources."
] |
public RandomVariable[] getValues(double[] times) {
RandomVariable[] values = new RandomVariable[times.length];
for(int i=0; i<times.length; i++) {
values[i] = getValue(null, times[i]);
}
return values;
} | [
"Return a vector of values corresponding to a given vector of times.\n@param times A given vector of times.\n@return A vector of values corresponding to the given vector of times."
] | [
"Internal method that adds a metadata provider to the set associated with a particular hash key, creating the\nset if needed.\n\n@param key the hashKey identifying the media for which this provider can offer metadata (or the empty string if\nit can offer metadata for all media)\n@param provider the metadata provider to be added to the active set",
"Joins the individual WBS elements to make the formated value.\n\n@param length number of elements to join\n@return formatted WBS value",
"When all the elements in a sorted set are inserted with the same score, in order to force lexicographical\nordering, this command removes all elements in the sorted set between the lexicographical range specified.\n@param lexRange\n@return the number of elements removed.",
"Map the EventType.\n\n@param eventType the event type\n@return the event",
"Counts a single pair of coordinates in all datasets.\n\n@param xCoord\n@param yCoord\n@param itemDocument",
"Parses all child Shapes recursively and adds them to the correct JSON\nObject\n\n@param childShapes\n@throws org.json.JSONException",
"Return a list of place IDs for a query string.\n\nThe flickr.places.find method is not a geocoder. It will round \"up\" to the nearest place type to which place IDs apply. For example, if you pass it a\nstreet level address it will return the city that contains the address rather than the street, or building, itself.\n\n<p>\nThis method does not require authentication.\n</p>\n\n@param query\n@return PlacesList\n@throws FlickrException",
"Clean wait task queue.",
"Use this API to fetch authenticationvserver_authenticationradiuspolicy_binding resources of given name ."
] |
public static String getDateTimeStrConcise(Date d) {
if (d == null)
return "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSSZ");
return sdf.format(d);
} | [
"Gets the date time str concise.\n\n@param d\nthe d\n@return the date time str concise"
] | [
"Finds a child resource with the given key.\n\n@param key the child resource key\n@return null if no child resource exists with the given name else the child resource",
"Encrypt a string with HMAC-SHA1 using the specified key.\n\n@param message Input string.\n@param key Encryption key.\n@return Encrypted output.",
"Returns the corporate dependencies of a module\n\n@param module Module\n@param corporateFilters List<String>\n@return List<Dependency>",
"Get a subset of the attributes of the provided class. An attribute is each public field in the class\nor super class.\n\n@param classToInspect the class to inspect\n@param filter a predicate that returns true when a attribute should be kept in resulting\ncollection.",
"Prepare a parallel HTTP DELETE Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"URLEncode a string\n@param s\n@return",
"Dump an array of bytes in hexadecimal.\n\n@param displayOffset the display offset (left column)\n@param data the byte array of data\n@param offset the offset to start dumping in the byte array\n@param len the length of data to dump\n@return the dump string",
"Gen error response.\n\n@param t\nthe t\n@return the response on single request",
"Use this API to add inat."
] |
@RequestMapping(value = "/api/backup", method = RequestMethod.POST)
public
@ResponseBody
Backup processBackup(@RequestParam("fileData") MultipartFile fileData) throws Exception {
// Method taken from: http://spring.io/guides/gs/uploading-files/
if (!fileData.isEmpty()) {
try {
byte[] bytes = fileData.getBytes();
BufferedOutputStream stream =
new BufferedOutputStream(new FileOutputStream(new File("backup-uploaded.json")));
stream.write(bytes);
stream.close();
} catch (Exception e) {
}
}
File f = new File("backup-uploaded.json");
BackupService.getInstance().restoreBackupData(new FileInputStream(f));
return BackupService.getInstance().getBackupData();
} | [
"Restore backup data\n\n@param fileData - json file with restore data\n@return\n@throws Exception"
] | [
"Sets the value of a UDF.\n\n@param udf user defined field\n@param dataType MPXJ data type\n@param value field value",
"Use this API to fetch sslvserver_sslcertkey_binding resources of given name .",
"Use this API to create sslfipskey resources.",
"Update all the links of the DeclarationBinder.\n\n@param declarationBinderRef the ServiceReference<DeclarationBinder> of the DeclarationBinder",
"copied and altered from TransactionHelper",
"Performs MAC signing of the SMB. This is done as follows.\nThe signature field of the SMB is overwritted with the sequence number;\nThe MD5 digest of the MAC signing key + the entire SMB is taken;\nThe first 8 bytes of this are placed in the signature field.\n\n@param data The data.\n@param offset The starting offset at which the SMB header begins.\n@param length The length of the SMB data starting at offset.",
"Provide array of String results from inputOutput MFString field named string.\n@return value of string field",
"backing bootstrap method with all parameters",
"Gets the publisher wrapped by the specofoed FlexiblePublisher.\n@param publisher The FlexiblePublisher wrapping the publisher.\n@param type The type of the publisher wrapped by the FlexiblePublisher.\n@return The publisher object wrapped by the FlexiblePublisher.\nNull is returned if the FlexiblePublisher does not wrap a publisher of the specified type.\n@throws IllegalArgumentException In case publisher is not of type\n{@link org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher}"
] |
public static sslcertkey[] get(nitro_service service) throws Exception{
sslcertkey obj = new sslcertkey();
sslcertkey[] response = (sslcertkey[])obj.get_resources(service);
return response;
} | [
"Use this API to fetch all the sslcertkey resources that are configured on netscaler."
] | [
"Use this API to update nspbr6.",
"A henson navigator is a class that helps a consumer to consume the navigation api that it\ndeclares in its dependencies. The henson navigator will wrap the intent builders. Thus, a\nhenson navigator, is driven by consumption of intent builders, whereas the henson classes are\ndriven by the production of an intent builder.\n\n<p>This task is created per android variant:\n\n<ul>\n<li>we scan the variant compile configuration for navigation api dependencies\n<li>we generate a henson navigator class for this variant that wraps the intent builders\n</ul>\n\n@param variant the variant for which to create a builder.\n@param hensonNavigatorPackageName the package name in which we create the class.",
"Disable all overrides for a specified path with overrideType\n\n@param pathID ID of path containing overrides\n@param clientUUID UUID of client\n@param overrideType Override type identifier",
"Update a feature object in the Hibernate session.\n\n@param feature feature object\n@throws LayerException oops",
"Replace HTML entities\n@param content Content\n@param map Map\n@return Replaced content",
"Method to build Integration flow for IMAP Idle configuration.\n@param urlName Mail source URL.\n@return Integration Flow object IMAP IDLE.",
"Registers add operation\n\n@param registration resource on which to register\n@param handler operation handler to register\n@param flags with flags\n@deprecated use {@link #registerAddOperation(org.jboss.as.controller.registry.ManagementResourceRegistration, AbstractAddStepHandler, org.jboss.as.controller.registry.OperationEntry.Flag...)}",
"Sets the Calendar used. 'Standard' if no value is set.\n\n@param calendarName Calendar name",
"Retrieves all file version retentions matching given filters as an Iterable.\n@param api the API connection to be used by the resource.\n@param filter filters for the query stored in QueryFilter object.\n@param fields the fields to retrieve.\n@return an iterable contains information about all file version retentions matching given filter."
] |
public void awaitPodReadinessOrFail(Predicate<Pod> filter) {
await().atMost(5, TimeUnit.MINUTES).until(() -> {
List<Pod> list = client.pods().inNamespace(namespace).list().getItems();
return list.stream()
.filter(filter)
.filter(Readiness::isPodReady)
.collect(Collectors.toList()).size() >= 1;
}
);
} | [
"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."
] | [
"read the file as a list of text lines",
"Add an individual class to the map file.\n\n@param loader jar file class loader\n@param jarEntry jar file entry\n@param writer XML stream writer\n@param mapClassMethods true if we want to produce .Net style class method names\n@throws ClassNotFoundException\n@throws XMLStreamException\n@throws IntrospectionException",
"Set the depth of the cursor.\nThis is the length of the ray from the origin\nto the cursor.\n@param depth default cursor depth",
"Initialize the pattern controllers.",
"Add sub-deployment units to the container\n\n@param bdaMapping",
"2-D Complex Gabor function.\n\n@param x X axis coordinate.\n@param y Y axis coordinate.\n@param wavelength Wavelength.\n@param orientation Orientation.\n@param phaseOffset Phase offset.\n@param gaussVariance Gaussian variance.\n@param aspectRatio Aspect ratio.\n@return Gabor response.",
"Creates metadata on this folder using a specified template.\n\n@param templateName the name of the metadata template.\n@param metadata the new metadata values.\n@return the metadata returned from the server.",
"Modifier method to set the unique ID of this calendar.\n\n@param uniqueID unique identifier",
"Create a field map for enterprise custom fields.\n\n@param props props data\n@param c target class"
] |
public static appfwprofile_stats get(nitro_service service, String name) throws Exception{
appfwprofile_stats obj = new appfwprofile_stats();
obj.set_name(name);
appfwprofile_stats response = (appfwprofile_stats) obj.stat_resource(service);
return response;
} | [
"Use this API to fetch statistics of appfwprofile_stats resource of given name ."
] | [
"Retrieve a duration in the form required by Primavera.\n\n@param duration Duration instance\n@return formatted duration",
"Send a metadata cache update announcement to all registered listeners.\n\n@param slot the media slot whose cache status has changed\n@param cache the cache which has been attached, or, if {@code null}, the previous cache has been detached",
"Returns a new List containing the given objects.",
"Disables all the overrides for a specific profile\n\n@param model\n@param profileID\n@param clientUUID\n@return",
"This method is called to try to catch any invalid tasks that may have sneaked past all our other checks.\nThis is done by validating the tasks by task ID.",
"Use this API to fetch sslvserver_sslcipher_binding resources of given name .",
"Creates a new deployment for the file. If the file is a directory the content will be deployed exploded using\nthe file system location.\n\n@param content the file containing the content\n\n@return the deployment",
"Add a dependency to the graph\n\n@param dependency\n@param graph\n@param depth\n@param parentId",
"Sets the top padding character for all cells in the row.\n@param paddingTopChar new padding character, ignored if null\n@return this to allow chaining"
] |
private int runCommitScript() {
if (m_checkout && !m_fetchAndResetBeforeImport) {
m_logStream.println("Skipping script....");
return 0;
}
try {
m_logStream.flush();
String commandParam;
if (m_resetRemoteHead) {
commandParam = resetRemoteHeadScriptCommand();
} else if (m_resetHead) {
commandParam = resetHeadScriptCommand();
} else if (m_checkout) {
commandParam = checkoutScriptCommand();
} else {
commandParam = checkinScriptCommand();
}
String[] cmd = {"bash", "-c", commandParam};
m_logStream.println("Calling the script as follows:");
m_logStream.println();
m_logStream.println(cmd[0] + " " + cmd[1] + " " + cmd[2]);
ProcessBuilder builder = new ProcessBuilder(cmd);
m_logStream.close();
m_logStream = null;
Redirect redirect = Redirect.appendTo(new File(DEFAULT_LOGFILE_PATH));
builder.redirectOutput(redirect);
builder.redirectError(redirect);
Process scriptProcess = builder.start();
int exitCode = scriptProcess.waitFor();
scriptProcess.getOutputStream().close();
m_logStream = new PrintStream(new FileOutputStream(DEFAULT_LOGFILE_PATH, true));
return exitCode;
} catch (InterruptedException | IOException e) {
e.printStackTrace(m_logStream);
return -1;
}
} | [
"Runs the shell script for committing and optionally pushing the changes in the module.\n@return exit code of the script."
] | [
"Method to build Integration Flow for Mail. Suppress Warnings for\nMailInboundChannelAdapterSpec.\n@return Integration Flow object for Mail Source",
"Arbitrarily resolve the inconsistency by choosing the first object if\nthere is one.\n\n@param values The list of objects\n@return A single value, if one exists, taken from the input list.",
"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.",
"Determine the consistency level of a key\n\n@param versionNodeSetMap A map that maps version to set of PrefixNodes\n@param replicationFactor Total replication factor for the set of clusters\n@return ConsistencyLevel Enum",
"Detect bad xml 1.0 characters\n\n@param c to detect\n@return true if specified character valid, false otherwise",
"Sets an element in at the specified index.",
"Filter unsafe or unnecessary request.\n\n@param nodeDataMapValidSource\nthe node data map valid source\n@param nodeDataMapValidSafe\nthe node data map valid safe",
"private multi-value handlers and helpers",
"Get a collection of methods declared on this object by method name and parameter count.\n\n@param name the name of the method\n@param paramCount the number of parameters\n@return the (possibly empty) collection of methods with the given name and parameter count"
] |
private CoreLabel makeCoreLabel(String line) {
CoreLabel wi = new CoreLabel();
// wi.line = line;
String[] bits = line.split("\\s+");
switch (bits.length) {
case 0:
case 1:
wi.setWord(BOUNDARY);
wi.set(AnswerAnnotation.class, OTHER);
break;
case 2:
wi.setWord(bits[0]);
wi.set(AnswerAnnotation.class, bits[1]);
break;
case 3:
wi.setWord(bits[0]);
wi.setTag(bits[1]);
wi.set(AnswerAnnotation.class, bits[2]);
break;
case 4:
wi.setWord(bits[0]);
wi.setTag(bits[1]);
wi.set(ChunkAnnotation.class, bits[2]);
wi.set(AnswerAnnotation.class, bits[3]);
break;
case 5:
if (flags.useLemmaAsWord) {
wi.setWord(bits[1]);
} else {
wi.setWord(bits[0]);
}
wi.set(LemmaAnnotation.class, bits[1]);
wi.setTag(bits[2]);
wi.set(ChunkAnnotation.class, bits[3]);
wi.set(AnswerAnnotation.class, bits[4]);
break;
default:
throw new RuntimeIOException("Unexpected input (many fields): " + line);
}
wi.set(OriginalAnswerAnnotation.class, wi.get(AnswerAnnotation.class));
return wi;
} | [
"This deals with the CoNLL files for different languages which have\nbetween 2 and 5 columns on non-blank lines.\n\n@param line A line of CoNLL input\n@return The constructed token"
] | [
"Reads color table as 256 RGB integer values.\n\n@param ncolors int number of colors to read.\n@return int array containing 256 colors (packed ARGB with full alpha).",
"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",
"After cluster management operations, i.e. reset quota and recover quota\nenforcement settings",
"Assign FK value to all n-side objects referenced by given object.\n\n@param obj real object with 1:n reference\n@param cod {@link CollectionDescriptor} of referenced 1:n objects\n@param insert flag signal insert operation, false signals update operation",
"Return the max bounds of the layer as envelope.\n\n@param layer the layer to get envelope from\n@return Envelope the envelope",
"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",
"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 delete ntpserver of given name.",
"Returns a new instance of the class with the given qualified name using the constructor with\nthe specified parameter.\n\n@param className The qualified name of 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"
] |
protected static Map<String, String> getHeadersAsMap(ResponseEntity response) {
Map<String, List<String>> headers = new HashMap<>(response.getHeaders());
Map<String, String> map = new HashMap<>();
for ( Map.Entry<String, List<String>> header :headers.entrySet() ) {
String headerValue = Joiner.on(",").join(header.getValue());
map.put(header.getKey(), headerValue);
}
return map;
} | [
"Flat the map of list of string to map of strings, with theoriginal values, seperated by comma"
] | [
"Creates the operation to add a resource.\n\n@param address the address of the operation to add.\n@param properties the properties to set for the resource.\n\n@return the operation.",
"Cleans a multi-value property key.\n\n@param name Name of the property key\n@return The {@link ValidationResult} object containing the key,\nand the error code(if any)\n<p/>\nFirst calls cleanObjectKey\nKnown property keys are reserved for multi-value properties, subsequent validation is done for those",
"Iterates over all the documents, adding each to the given target.\n\n@param target the collection to insert into\n@param <A> the collection type\n@return the target",
"Unloads the sound file for this source, if any.",
"Alternative entry point allowing an MPP file to be read from\na user-supplied POI file stream.\n\n@param fs POI file stream\n@return ProjectFile instance\n@throws MPXJException",
"Obtain the realm used for authentication.\n\nThis realm name applies to both the user and the groups.\n\n@return The name of the realm used for authentication.",
"Plots the MSD curve with the trajectory t and adds the fitted model for directed motion 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 diffusionCoefficient Diffusion coefficient\n@param velocity velocity of the active transport",
"Compares two fields given by their names.\n\n@param objA The name of the first field\n@param objB The name of the second field\n@return\n@see java.util.Comparator#compare(java.lang.Object, java.lang.Object)",
"Retrieves the amount of time between two date time values. Note that\nthese values are converted into canonical values to remove the\ndate component.\n\n@param start start time\n@param end end time\n@return length of time"
] |
public static void main(String[] args) {
TreebankLanguagePack tlp = new PennTreebankLanguagePack();
System.out.println("Start symbol: " + tlp.startSymbol());
String start = tlp.startSymbol();
System.out.println("Should be true: " + (tlp.isStartSymbol(start)));
String[] strs = {"-", "-LLB-", "NP-2", "NP=3", "NP-LGS", "NP-TMP=3"};
for (String str : strs) {
System.out.println("String: " + str + " basic: " + tlp.basicCategory(str) + " basicAndFunc: " + tlp.categoryAndFunction(str));
}
} | [
"Prints a few aspects of the TreebankLanguagePack, just for debugging."
] | [
"Computes the likelihood of the random draw\n\n@return The likelihood.",
"Handle a simple ping request.\n\n@param channel the channel\n@param header the protocol header\n@throws IOException for any error",
"Use this API to fetch a vpnglobal_intranetip_binding resources.",
"Read the calendar data from a Gantt Designer file.\n\n@param gantt Gantt Designer file.",
"Get an image using the specified URL suffix.\n\n@deprecated\n@param suffix\nThe URL suffix, including the .extension\n@return The BufferedImage object\n@throws IOException",
"Rename a key for all languages.\n@param oldKey the key to rename\n@param newKey the new key name\n@return <code>true</code> if renaming was successful, <code>false</code> otherwise.",
"Returns an entry with the given proposal and prefix, or null if the proposal is not valid.\nIf it is valid, the initializer function is applied to it.",
"Generates a set of HTML files that contain data about the outcome of\nthe specified test suites.\n@param suites Data about the test runs.\n@param outputDirectoryName The directory in which to create the report.",
"Send a media details response to all registered listeners.\n\n@param details the response that has just arrived"
] |
private static IndexOptions prepareOptions(MongoDBIndexType indexType, Document options, String indexName, boolean unique) {
IndexOptions indexOptions = new IndexOptions();
indexOptions.name( indexName ).unique( unique ).background( options.getBoolean( "background" , false ) );
if ( unique ) {
// MongoDB only allows one null value per unique index which is not in line with what we usually consider
// as the definition of a unique constraint. Thus, we mark the index as sparse to only index values
// defined and avoid this issue. We do this only if a partialFilterExpression has not been defined
// as partialFilterExpression and sparse are exclusive.
indexOptions.sparse( !options.containsKey( "partialFilterExpression" ) );
}
else if ( options.containsKey( "partialFilterExpression" ) ) {
indexOptions.partialFilterExpression( (Bson) options.get( "partialFilterExpression" ) );
}
if ( options.containsKey( "expireAfterSeconds" ) ) {
//@todo is it correct?
indexOptions.expireAfter( options.getInteger( "expireAfterSeconds" ).longValue() , TimeUnit.SECONDS );
}
if ( MongoDBIndexType.TEXT.equals( indexType ) ) {
// text is an option we take into account to mark an index as a full text index as we cannot put "text" as
// the order like MongoDB as ORM explicitly checks that the order is either asc or desc.
// we remove the option from the Document so that we don't pass it to MongoDB
if ( options.containsKey( "default_language" ) ) {
indexOptions.defaultLanguage( options.getString( "default_language" ) );
}
if ( options.containsKey( "weights" ) ) {
indexOptions.weights( (Bson) options.get( "weights" ) );
}
options.remove( "text" );
}
return indexOptions;
} | [
"Prepare the options by adding additional information to them.\n@see <a href=\"https://docs.mongodb.com/manual/core/index-ttl/\">TTL Indexes</a>"
] | [
"Returns all the retention policies with specified filters.\n@param name a name to filter the retention policies by. A trailing partial match search is performed.\nSet to null if no name filtering is required.\n@param type a policy type to filter the retention policies by. Set to null if no type filtering is required.\n@param userID a user id to filter the retention policies by. Set to null if no type filtering is required.\n@param limit the limit of items per single response. The default value is 100.\n@param api the API connection to be used by the resource.\n@param fields the fields to retrieve.\n@return an iterable with all the retention policies met search conditions.",
"Returns an interval representing the addition of the\ngiven interval with this one.\n@param other interval to add to this one\n@return interval sum",
"Use this API to fetch sslcertkey_crldistribution_binding resources of given name .",
"Ask the specified player for the album art in the specified slot with the specified rekordbox ID,\nusing cached media instead if it is available, and possibly giving up if we are in passive mode.\n\n@param artReference uniquely identifies the desired album art\n@param trackType the kind of track that owns the art\n@param failIfPassive will prevent the request from taking place if we are in passive mode, so that automatic\nartwork updates will use available caches only\n\n@return the album art found, if any",
"this method will be invoked after methodToBeInvoked is invoked",
"Function to perform forward pooling",
"Retrieve a finish date.\n\n@param data byte array\n@param offset offset into byte array\n@return finish date",
"Fills a rectangle in the image.\n\n@param x rect�s start position in x-axis\n@param y rect�s start positioj in y-axis\n@param w rect�s width\n@param h rect�s height\n@param c rect�s color",
"Returns the next object in the table.\n\n@throws IllegalStateException\nIf there was a problem extracting the object from SQL."
] |
private String trim(String line) {
char[] chars = line.toCharArray();
int len = chars.length;
while (len > 0) {
if (!Character.isWhitespace(chars[len - 1])) {
break;
}
len--;
}
return line.substring(0, len);
} | [
"Trim the trailing spaces.\n\n@param line"
] | [
"Use this API to unset the properties of responderparam resource.\nProperties that need to be unset are specified in args array.",
"Convert an Image into a TYPE_INT_ARGB BufferedImage. If the image is already of this type, the original image is returned unchanged.\n@param image the image to convert\n@return the converted image",
"Use this API to fetch the statistics of all nspbr6_stats resources that are configured on netscaler.",
"format with lazy-eval",
"This method extracts project extended attribute data from an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Populate a resource assignment.\n\n@param record MPX record\n@param assignment resource assignment\n@throws MPXJException",
"Returns the default hidden preference for the user.\n\n@return boolean hidden or not\n@throws FlickrException",
"Return the name of the current conf set\n@return the conf set name",
"Attribute name and value are not escaped or modified in any way.\n\n@param name\n@param value\n@return self"
] |
public static base_response change(nitro_service client, appfwsignatures resource) throws Exception {
appfwsignatures updateresource = new appfwsignatures();
updateresource.name = resource.name;
updateresource.mergedefault = resource.mergedefault;
return updateresource.perform_operation(client,"update");
} | [
"Use this API to change appfwsignatures."
] | [
"Converts a Map to an array of objects, adding only those entries whose key is in the nameMapping array.\n\n@param values\nthe Map of values to convert\n@param nameMapping\nthe keys to extract from the Map (elements in the target array will be added in this order)\n@return the array of Objects\n@throws NullPointerException\nif values or nameMapping is null",
"Check if this request is part of the specified request. This is the case if both requests have equal properties\nand the specified request is asking for the same or more paint operations than this one.\n\n@param request another request\n@return true if the current request is contained in the specified request\n@since 1.10.0",
"Attaches a pre-existing set of hours to the correct\nday within the calendar.\n\n@param hours calendar hours instance",
"Return total number of connections created in all partitions.\n\n@return number of created connections",
"Adds a new task to this file. The task can have an optional message to include, and a due date.\n\n@param action the action the task assignee will be prompted to do.\n@param message an optional message to include with the task.\n@param dueAt the day at which this task is due.\n@return information about the newly added task.",
"A regular embedded is an element that it is embedded but it is not a key or a collection.\n\n@param keyColumnNames the column names representing the identifier of the entity\n@param column the column we want to check\n@return {@code true} if the column represent an attribute of a regular embedded element, {@code false} otherwise",
"Gets a SerialMessage with the SENSOR_ALARM_GET command\n@return the serial message",
"Use this API to delete sslcipher of given name.",
"Returns a BoxStoragePolicyAssignment information.\n@param api the API connection to be used by the resource.\n@param resolvedForType the assigned entity type for the storage policy.\n@param resolvedForID the assigned entity id for the storage policy.\n@return information about this {@link BoxStoragePolicyAssignment}."
] |
public PeriodicEvent runEvery(Runnable task, float delay, float period) {
return runEvery(task, delay, period, null);
} | [
"Run a task periodically and indefinitely.\n\n@param task\nTask to run.\n@param delay\nThe first execution will happen in {@code delay} seconds.\n@param period\nSubsequent executions will happen every {@code period} seconds\nafter the first.\n@return An interface that lets you query the status; cancel; or\nreschedule the event."
] | [
"Added in Gerrit 2.11.",
"Generates the body of a toString method that uses a StringBuilder.\n\n<p>Conventionally, we join properties with comma separators. If all of the properties are\noptional, we have no choice but to track the separators at runtime, but if any of them will\nalways be present, we can actually do the hard work at compile time. Specifically, we can pick\nthe first such and output it without a comma; any property before it will have a comma\n<em>appended</em>, and any property after it will have a comma <em>prepended</em>. This gives\nus the right number of commas in the right places in all circumstances.\n\n<p>As well as keeping track of whether we are <b>prepending commas</b> yet (initially false),\nwe also keep track of whether we have just finished an if-then block for an optional property,\nor if we are in the <b>middle of an append chain</b>, and if so, whether we are in the\n<b>middle of a string literal</b>. This lets us output the fewest literals and statements,\nmuch as a mildly compulsive programmer would when writing the same code.",
"Add the given, single header value under the given name.\n@param headerName the header name\n@param headerValue the header value\n@throws UnsupportedOperationException if adding headers is not supported\n@see #put(String, List)\n@see #set(String, String)",
"Checks if the specified latitude is correct.\n\n@param name the name of the latitude field\n@param latitude the value of the latitude field\n@return the latitude",
"Sets no of currency digits.\n\n@param currDigs Available values, 0,1,2",
"Compiles and performs the provided equation.\n\n@param equation String in simple equation format",
"Sets the invalid values for the TextBox\n@param invalidValues\n@param isCaseSensitive\n@param invalidValueErrorMessage",
"Updates the schema of an existing metadata template.\n\n@param api the API connection to be used\n@param scope the scope of the object\n@param template Unique identifier of the template\n@param fieldOperations the fields that needs to be updated / added in the template\n@return the updated metadata template",
"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."
] |
public boolean classifyDocumentStdin(DocumentReaderAndWriter<IN> readerWriter)
throws IOException
{
BufferedReader is = new BufferedReader(new InputStreamReader(System.in, flags.inputEncoding));
String line;
String text = "";
String eol = "\n";
String sentence = "<s>";
int blankLines = 0;
while ((line = is.readLine()) != null) {
if (line.trim().equals("")) {
++blankLines;
if (blankLines > 3) {
return false;
} else if (blankLines > 2) {
ObjectBank<List<IN>> documents = makeObjectBankFromString(text, readerWriter);
classifyAndWriteAnswers(documents, readerWriter);
text = "";
} else {
text += sentence + eol;
}
} else {
text += line + eol;
blankLines = 0;
}
}
// Classify last document before input stream end
if (text.trim() != "") {
ObjectBank<List<IN>> documents = makeObjectBankFromString(text, readerWriter);
classifyAndWriteAnswers(documents, readerWriter);
}
return (line == null); // reached eol
} | [
"Classify stdin by documents seperated by 3 blank line\n@param readerWriter\n@return boolean reached end of IO\n@throws IOException"
] | [
"Creates the graphic element to be shown when the datasource is empty",
"Setter for the file format.\n@param fileFormat File format the configuration file is in.",
"Get history for a specific database ID\n\n@param id ID of history entry\n@return History entry",
"All address strings are comparable. If two address strings are invalid, their strings are compared.\nOtherwise, address strings are compared according to which type or version of string, and then within each type or version\nthey are compared using the comparison rules for addresses.\n\n@param other\n@return",
"Clones the given reference.\n\n@param refDef The reference descriptor\n@param prefix A prefix for the name\n@return The cloned reference",
"Creates a new RDF serializer based on the current configuration of this\nobject.\n\n@return the newly created RDF serializer\n@throws IOException\nif there were problems opening the output files",
"Sets all padding for all cells in the row to the same value.\n@param padding new padding for top, bottom, left, and right, ignored if smaller than 0\n@return this to allow chaining",
"Executes the API action \"wbsearchentity\" for the given parameters.\nSearches for entities using labels and aliases. Returns a label and\ndescription for the entity in the user language if possible. Returns\ndetails of the matched term. The matched term text is also present in the\naliases key if different from the display label.\n\n<p>\nSee the <a href=\n\"https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentity\"\n>online API documentation</a> for further information.\n<p>\n\n@param search\n(required) search for this text\n@param language\n(required) search in this language\n@param strictLanguage\n(optional) whether to disable language fallback\n@param type\n(optional) search for this type of entity\nOne of the following values: item, property\nDefault: item\n@param limit\n(optional) maximal number of results\nno more than 50 (500 for bots) allowed\nDefault: 7\n@param offset\n(optional) offset where to continue a search\nDefault: 0\nthis parameter is called \"continue\" in the API (which is a Java keyword)\n\n@return list of matching entities retrieved via the API URL\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IllegalArgumentException\nif the given combination of parameters does not make sense",
"Join a group as a public member.\n\nNote: if a group has rules - the client must display the rules to the user and the user must accept them prior to joining the group. The acceptRules\nparameter indicates that the user has accepted those rules.\n\n@param groupId\n- the id of the group to join\n@param acceptRules\n- if a group has rules, true indicates the user has accepted the rules\n\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.join.html\">flickr.groups.join</a>"
] |
@Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<AccountingDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<AccountingDate>) super.localDateTime(temporal);
} | [
"Obtains a Accounting local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Accounting local date-time, not null\n@throws DateTimeException if unable to create the date-time"
] | [
"Get a property as a object or throw exception.\n\n@param key the property name",
"Ask the specified player for a Track menu.\n\n@param slotReference the player and slot for which the menu is desired\n@param sortOrder the order in which responses should be sorted, 0 for default, see Section 6.11.1 of the\n<a href=\"https://github.com/Deep-Symmetry/dysentery/blob/master/doc/Analysis.pdf\">Packet Analysis\ndocument</a> for details\n\n@return the entries in the track menu\n\n@throws Exception if there is a problem obtaining the menu",
"Convert the server side feature to a DTO feature that can be sent to the client.\n\n@param feature\nThe server-side feature representation.\n@param featureIncludes\nIndicate which aspects of the should be included see {@link VectorLayerService}\n@return Returns the DTO feature.",
"Set the degrees of rotation. Value will be set to -1, if not available.\n\n@param rotation",
"Whether the given column is part of this key family or not.\n\n@return {@code true} if the given column is part of this key, {@code false} otherwise.",
"Asynchronous call that begins execution of the task\nand returns immediately.",
"Validates the deployment.\n\n@param isDomain {@code true} if this is a domain server, otherwise {@code false}\n\n@throws MojoDeploymentException if the deployment is invalid",
"Set the week days the events should occur.\n@param weekDays the week days to set.",
"Build the Criteria using multiple ORs\n@param ids collection of identities\n@param fields\n@return Criteria"
] |
public static void validateInterimFinalCluster(final Cluster interimCluster,
final Cluster finalCluster) {
validateClusterPartitionCounts(interimCluster, finalCluster);
validateClusterZonesSame(interimCluster, finalCluster);
validateClusterNodeCounts(interimCluster, finalCluster);
validateClusterNodeState(interimCluster, finalCluster);
return;
} | [
"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"
] | [
"Sends a server command continuation request '+' back to the client,\nrequesting more data to be sent.",
"If there is a SubReport on a Group, we do the layout here\n@param columnsGroup\n@param jgroup",
"Filter that's either negated or normal as specified.",
"convenience factory method for the most usual case.",
"SetLoop will either set the GVRNodeAnimation's Repeat Mode to REPEATED if loop is true.\nor it will set the GVRNodeAnimation's Repeat Mode to ONCE if loop is false\nif loop is set to TRUE, when it was previously FALSE, then start the Animation.\n@param doLoop\n@param gvrContext",
"Checks whether the compilation has been canceled and reports the given progress to the compiler progress.",
"Send a get module request\n\n@param name\n@param version\n@return the targeted module\n@throws GrapesCommunicationException",
"find the middle point of two intersect points in circle,only one point will be correct\n\n@param center\n@param a\n@param b\n@param area\n@param radius\n@return",
"Sets allowed values for attribute\n\n@param allowedValues values that are legal as part in this attribute\n@return a builder that can be used to continue building the attribute definition"
] |
public ResourceTransformerEntry resolveResourceTransformer(final PathAddress address, final PlaceholderResolver placeholderResolver) {
return resolveResourceTransformer(address.iterator(), null, placeholderResolver);
} | [
"Resolve a resource transformer for a given address.\n\n@param address the address\n@param placeholderResolver a placeholder resolver used to resolve children of a placeholder registration\n@return the resource transformer"
] | [
"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",
"Inserts the LokenList immediately following the 'before' token",
"Returns the WDTK datatype IRI for the property datatype as represented by\nthe given JSON datatype string.\n\n@param jsonDatatype\nthe JSON datatype string; case-sensitive\n@throws IllegalArgumentException\nif the given datatype string is not known",
"Returns an ArrayList of String URLs of the Carousel Images\n@return ArrayList of Strings",
"Perform a one-off scan during boot to establish deployment tasks to execute during boot",
"Returns an English label for a given datatype.\n\n@param datatype\nthe datatype to label\n@return the label",
"This method extracts assignment data from a Planner file.\n\n@param plannerProject Root node of the Planner file",
"Use this API to delete sslfipskey resources of given names.",
"Clear JobContext of current thread"
] |
public static Shell createConsoleShell(String prompt, String appName, Object... handlers) {
ConsoleIO io = new ConsoleIO();
List<String> path = new ArrayList<String>(1);
path.add(prompt);
MultiMap<String, Object> modifAuxHandlers = new ArrayHashMultiMap<String, Object>();
modifAuxHandlers.put("!", io);
Shell theShell = new Shell(new Shell.Settings(io, io, modifAuxHandlers, false),
new CommandTable(new DashJoinedNamer(true)), path);
theShell.setAppName(appName);
theShell.addMainHandler(theShell, "!");
theShell.addMainHandler(new HelpCommandHandler(), "?");
for (Object h : handlers) {
theShell.addMainHandler(h, "");
}
return theShell;
} | [
"One of facade methods for operating the Shell.\n\nRun the obtained Shell with commandLoop().\n\n@see org.gearvrf.debug.cli.Shell#Shell(org.gearvrf.debug.cli.Shell.Settings, org.gearvrf.debug.cli.CommandTable, java.util.List)\n\n@param prompt Prompt to be displayed\n@param appName The app name string\n@param handlers Command handlers\n@return Shell that can be either further customized or run directly by calling commandLoop()."
] | [
"Converters the diffusion coefficient to hydrodynamic diameter and vice versa\n@param value Diffusion coefficient in [m^2 s^-1] or hydrodynamic diameter in [m]\n@param temperatur Temperatur in [Kelvin]\n@param viscosity Viscosity in [kg m^-1 s^-1]\n@return Hydrodynmaic diameter [m] / diffusion coefficient [m^2 s^-1]",
"Writes assignment baseline data.\n\n@param xml MSPDI assignment\n@param mpxj MPXJ assignment",
"Deserialize a javascript design document file to a DesignDocument object.\n\n@param file the design document javascript file (UTF-8 encoded)\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read",
"Returns a byte array containing a copy of the bytes",
"Walk project references recursively, building up a list of thrift files they provide, starting\nwith an empty file list.",
"Build and return a string version of the query. If you change the where or make other calls you will need to\nre-call this method to re-prepare the query for execution.",
"Check if information model entity referenced by archetype\nhas right name or type",
"Writes a vInt directly to a byte array\n\n@param dest The destination array for the vInt to be written to\n@param offset The location where to write the vInt to\n@param i The Value being written into byte array\n@return Returns the new offset location",
"Close the open stream.\n\nClose the stream if it was opened before"
] |
public void setEnable(boolean flag)
{
if (mEnabled == flag)
{
return;
}
mEnabled = flag;
if (flag)
{
mContext.registerDrawFrameListener(this);
mContext.getApplication().getEventReceiver().addListener(this);
mAudioEngine.resume();
}
else
{
mContext.unregisterDrawFrameListener(this);
mContext.getApplication().getEventReceiver().removeListener(this);
mAudioEngine.pause();
}
} | [
"Enables or disables sound.\nWhen sound is disabled, nothing is played but the\naudio sources remain intact.\n@param flag true to enable sound, false to disable."
] | [
"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",
"Recursively add indirect subclasses to a class record.\n\n@param directSuperClass\nthe superclass to add (together with its own superclasses)\n@param subClassRecord\nthe subclass to add to",
"Reads the next \"word from the request, comprising all characters up to the next SPACE.\nCharacters are tested by the supplied CharacterValidator, and an exception is thrown\nif invalid characters are encountered.",
"The type descriptor for a method node is a string containing the name of the method, its return type,\nand its parameter types in a canonical form. For simplicity, I'm using the format of a Java declaration\nwithout parameter names.\n\n@return the type descriptor",
"Inserts the result of the migration into the migration table\n\n@param migration the migration that was executed\n@param wasSuccessful indicates if the migration was successful or not",
"Read JdbcConnectionDescriptors from this InputStream.\n\n@see #mergeConnectionRepository",
"Read relation data.",
"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",
"Parse request parameters and files.\n@param request\n@param response"
] |
public void setText(String text) {
span.setText(text);
if (!span.isAttached()) {
add(span);
}
} | [
"Set the buttons span text."
] | [
"Determine the size of a field in a fixed data block.\n\n@param type field data type\n@return field size in bytes",
"This method allows a resource assignment to be added to the\ncurrent task.\n\n@param resource the resource to assign\n@return ResourceAssignment object",
"Return the value of field in the data argument if it is not the default value for the class. If it is the default\nthen null is returned.",
"Create a new path\n\n@param pathName friendly name of path\n@param pathValue path value or regex\n@param requestType path request type. \"GET\", \"POST\", etc",
"Makes object obj persistent in the underlying persistence system.\nE.G. by INSERT INTO ... or UPDATE ... in an RDBMS.\nThe ObjectModification parameter can be used to determine whether INSERT or update is to be used.\nThis functionality is typically called from transaction managers, that\ntrack which objects have to be stored. If the object is an unmaterialized\nproxy the method return immediately.",
"Calculate the start variance.\n\n@return start variance",
"This method allows a resource assignment to be added to the\ncurrent task.\n\n@param resource the resource to assign\n@return ResourceAssignment object",
"Saves meta tree, writes database root and flushes the log.\n\n@param metaTree mutable meta tree\n@param env enclosing environment\n@param expired expired loggables (database root to be added)\n@return database root loggable which is read again from the log.",
"Call the Yahoo! PlaceFinder service for a result.\n\n@param q\nsearch string\n@param maxRows\nmax number of rows in result, or 0 for all\n@param locale\nlocale for strings\n@return list of found results\n@throws Exception\noops\n@see <a\nhref=\"http://developer.yahoo.com/boss/geo/docs/free_YQL.html#table_pf\">Yahoo!\nBoss Geo PlaceFinder</a>"
] |
OTMConnection getConnection()
{
if (m_connection == null)
{
OTMConnectionRuntimeException ex = new OTMConnectionRuntimeException("Connection is null.");
sendEvents(ConnectionEvent.CONNECTION_ERROR_OCCURRED, ex, null);
}
return m_connection;
} | [
"get the underlying wrapped connection\n@return OTMConnection raw connection to the OTM."
] | [
"Return all methods for a list of groupIds\n\n@param groupIds array of group IDs\n@param filters array of filters to apply to method selection\n@return collection of Methods found\n@throws Exception exception",
"Get all registration points associated with this registration.\n\n@return all registration points. Will not be {@code null} but may be empty",
"Obtains a International Fixed local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the International Fixed local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Prepare a parallel HTTP DELETE Task.\n\n@param url\nthe UrlPostfix: e.g. in http://localhost:8080/index.html.,the url is \"/index.html\"\n@return the parallel task builder",
"Print currency.\n\n@param value currency value\n@return currency value",
"Calculate a threshold.\n\n@param x first string.\n@param y second string.\n@param p the threshold coefficient.\n@return 2 maxLength(x, y) (1-p)",
"Obtains a Discordian local date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Discordian local date-time, not null\n@throws DateTimeException if unable to create the date-time",
"create logs with given partition number\n\n@param topic the topic name\n@param partitions partition number\n@param forceEnlarge enlarge the partition number of log if smaller than runtime\n@return the partition number of the log after enlarging",
"Send get request.\n\n@param url the url\n@param customHeaders the customHeaders\n@param params the params\n@return the string\n@throws URISyntaxException the uri syntax exception\n@throws IOException the io exception"
] |
private void populateContainer(FieldType field, byte[] values, byte[] descriptions)
{
CustomField config = m_container.getCustomField(field);
CustomFieldLookupTable table = config.getLookupTable();
List<Object> descriptionList = convertType(DataType.STRING, descriptions);
List<Object> valueList = convertType(field.getDataType(), values);
for (int index = 0; index < descriptionList.size(); index++)
{
CustomFieldValueItem item = new CustomFieldValueItem(Integer.valueOf(0));
item.setDescription((String) descriptionList.get(index));
if (index < valueList.size())
{
item.setValue(valueList.get(index));
}
table.add(item);
}
} | [
"Populate the container, converting raw data into Java types.\n\n@param field custom field to which these values belong\n@param values raw value data\n@param descriptions raw description data"
] | [
"Adds an additional alias to the constructed document.\n\n@param text\nthe text of the alias\n@param languageCode\nthe language code of the alias\n@return builder object to continue construction",
"Throws an IllegalStateException when the given value is not true.",
"Returns the default safety level preference for the user.\n\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_MODERATE\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_RESTRICTED\n@see com.flickr4java.flickr.Flickr#SAFETYLEVEL_SAFE\n@return The current users safety-level\n@throws FlickrException",
"Print a constraint type.\n\n@param value ConstraintType instance\n@return constraint type value",
"Copies just the upper or lower triangular portion of a matrix.\n\n@param src Matrix being copied. Not modified.\n@param dst Where just a triangle from src is copied. If null a new one will be created. Modified.\n@param upper If the upper or lower triangle should be copied.\n@return The copied matrix.",
"Create a clone of the Renderer. This method is the base of the prototype mechanism implemented\nto avoid create new objects from RendererBuilder. Pay an special attention implementing clone\nmethod in Renderer subtypes.\n\n@return a copy of the current renderer.",
"Are we running in Jetty with JMX enabled?",
"Return all valid tenors for a given moneyness and maturity.\nUses the payment times of the fix schedule to determine fractions.\n\n@param moneyness The moneyness as actual offset from par swap rate for which to get the maturities.\n@param maturity The maturities as year fraction from the reference date.\n@return The tenors as year fraction from reference date.",
"Gets the progress.\n\n@return the progress"
] |
public static String get(MessageKey key) {
return data.getProperty(key.toString(), key.toString());
} | [
"Retrieves the configured message by property key\n@param key The key in the file\n@return The associated value in case the key is found in the message bundle file. If\nno such key is defined, the returned value would be the key itself."
] | [
"Reads the entity hosting the association from the datastore and applies any property changes from the server\nside.",
"Turns a series of strings into their corresponding license entities\nby using regular expressions\n\n@param licStrings The list of license strings\n@return A set of license entities",
"Send a device lost announcement to all registered listeners.\n\n@param announcement the last message received from the vanished device",
"Process the layers.conf file.\n\n@param repoRoot the root\n@return the layers conf\n@throws java.io.IOException",
"calculate and set position to menu items",
"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",
"Removes elements from begin to end from the list, inclusive. Returns a new list which\nis composed of the removed elements",
"Filter everything until we found the first NL character.",
"Retrieve a table by name.\n\n@param name table name\n@return Table instance"
] |
@PrefMetadata(type = CmsElementViewPreference.class)
public String getElementView() {
return m_settings.getAdditionalPreference(CmsElementViewPreference.PREFERENCE_NAME, false);
} | [
"Gets the element view.\n\n@return the element view"
] | [
"Obtains a local date in Coptic 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 Coptic local date, not null\n@throws DateTimeException if unable to create the date",
"Pass a model object and return a SoyMapData if a model object happens\nto be a SoyMapData.\n\nAn implementation will also check if a passed in object is a Map and return\na SoyMapData wrapping that map",
"Analyzes the source code of an interface. The specified interface must not contain methods, that changes the\nstate of the corresponding object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@return analysis result",
"Resolve all files from a given path and simplify its definition.",
"Append the text at the end of the Path.\n\n@param self a Path\n@param text the text to append at the end of the Path\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0",
"Use this API to update nspbr6.",
"Schedule at most one task.\n\nThe scheduled task *must* invoke 'doneTask()' upon\ncompletion/termination.\n\n@param executeService flag to control execution of the service, some tests pass\nin value 'false'\n@return The task scheduled or null if not possible to schedule a task at\nthis time.",
"Helper method that encapsulates the minimum logic for publishing a job to\na channel.\n\n@param jedis\nthe connection to Redis\n@param namespace\nthe Resque namespace\n@param channel\nthe channel name\n@param jobJson\nthe job serialized as JSON",
"Adds columns for the specified properties.\n@param _properties the array of <code>PropertyDescriptor</code>s to be added.\n@throws ColumnBuilderException if an error occurs.\n@throws ClassNotFoundException if an error occurs."
] |
public void remove(RowKey key) {
currentState.put( key, new AssociationOperation( key, null, REMOVE ) );
} | [
"Removes the row with the specified key from this association.\n\n@param key the key of the association row to remove"
] | [
"Returns the Set of entities recognized by this Classifier.\n\n@return The Set of entities recognized by this Classifier.",
"Return the list of module dependencies\n\n@param moduleName\n@param moduleVersion\n@param fullRecursive\n@param corporate\n@param thirdParty\n@return List<Dependency>\n@throws GrapesCommunicationException",
"Parse a version String and add the components to a properties object.\n\n@param version the version to parse",
"Helper for reading a mandatory String value list - throwing an Exception if parsing fails.\n@param json The JSON object where the list should be read from.\n@param key The key of the value to read.\n@return The value from the JSON.\n@throws JSONException thrown when parsing fails.",
"Return the number of ignored or assumption-ignored tests.",
"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",
"Return collection of path Ids in priority order\n\n@param profileId ID of profile\n@return collection of path Ids in priority order",
"This static method calculated the vega of a call option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The vega of the option",
"Set new point coordinates somewhere on screen and apply new direction\n\n@param position the point position to apply new values to"
] |
public boolean assertValidPkForDelete(ClassDescriptor cld, Object obj)
{
if(!ProxyHelper.isProxy(obj))
{
FieldDescriptor fieldDescriptors[] = cld.getPkFields();
int fieldDescriptorSize = fieldDescriptors.length;
for(int i = 0; i < fieldDescriptorSize; i++)
{
FieldDescriptor fd = fieldDescriptors[i];
Object pkValue = fd.getPersistentField().get(obj);
if (representsNull(fd, pkValue))
{
return false;
}
}
}
return true;
} | [
"returns true if the primary key fields are valid for delete, else false.\nPK fields are valid if each of them contains a valid non-null value\n@param cld the ClassDescriptor\n@param obj the object\n@return boolean"
] | [
"Mojos perform different dependency resolution, so we add dependencies for each mojo.",
"Get the value of the specified column.\n\n@param columnName the name of the column\n@return the corresponding value of the column, {@code null} if the column does not exist in the row key",
"Retrieve the relative path to the pom of the module",
"Destroy the proxy & update the map containing the registration ref.\n\n@param importDeclaration",
"Used by TracedParallelBatch where its used to wrap a TraceContext and puts it in the\nregistry for the forked execution. This is marked deprecated as we prefer not to\nexpose details of the RatpackCurrentTraceContext implementation.\n\n@param traceContext a trace context.\n@return a holder for the trace context, which can be put into the registry.",
"End building the prepared script, adding a return value statement\n@param value the value to return\n@param config the configuration for the script to build\n@return the new {@link LuaPreparedScript} instance",
"Mark for creation all objects that were included into dependent collections.\nMark for deletion all objects that were excluded from dependent collections.",
"if you have a default, it's automatically optional",
"Deletes an individual alias\n\n@param alias\nthe alias to delete"
] |
private void processKeyValue(Map<ConfigurationKey, Object> properties, ConfigurationKey key, Object value) {
if (value instanceof String) {
value = key.convertValue((String) value);
}
if (key.isValidValue(value)) {
Object previous = properties.put(key, value);
if (previous != null && !previous.equals(value)) {
throw ConfigurationLogger.LOG.configurationKeyHasDifferentValues(key.get(), previous, value);
}
} else {
throw ConfigurationLogger.LOG.invalidConfigurationPropertyValue(value, key.get());
}
} | [
"Process the given key and value. First validate the value and check if there's no different value for the same key in the same source - invalid and\ndifferent values are treated as a deployment problem.\n\n@param properties\n@param key\n@param value"
] | [
"Sets the working directory.\n\n@param dir The directory\n@throws IOException If the directory does not exist or cannot be written/read",
"Searches for a declared method with a given name. If the class declares multiple methods with the given name,\nthere is no guarantee as of which methods is returned. Null is returned if the class does not declare a method\nwith the given name.\n@param clazz the given class\n@param methodName the given method name\n@return method method with the given name declared by the given class or null if no such method exists",
"Handle unbind service event.\n@param service Service instance\n@param props Service reference properties",
"Creates an operation to deploy existing deployment content to the runtime.\n\n@param deployment the deployment to deploy\n\n@return the deploy operation",
"Get the URI for the given statement.\n\n@param statement\nthe statement for which to create a URI\n@return the URI",
"It's enough to just set the disabled attribute on the\nelement, but we want to also add a \"disabled\" class so that we can\nstyle it.\n\nAt some point we'll just be able to use .button:disabled,\nbut that doesn't work in IE8-",
"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.",
"Writes the body of this request to an HttpURLConnection.\n\n<p>Subclasses overriding this method must remember to close the connection's OutputStream after writing.</p>\n\n@param connection the connection to which the body should be written.\n@param listener an optional listener for monitoring the write progress.\n@throws BoxAPIException if an error occurs while writing to the connection.",
"Unlink the specified reference object.\nMore info see OJB doc.\n@param source The source object with the specified reference field.\n@param attributeName The field name of the reference to unlink.\n@param target The referenced object to unlink."
] |
protected void beforeLoading()
{
if (_listeners != null)
{
CollectionProxyListener listener;
if (_perThreadDescriptorsEnabled) {
loadProfileIfNeeded();
}
for (int idx = _listeners.size() - 1; idx >= 0; idx--)
{
listener = (CollectionProxyListener)_listeners.get(idx);
listener.beforeLoading(this);
}
}
} | [
"Notifies all listeners that the data is about to be loaded."
] | [
"Evaluates an EL.\n\n@param vars the variables to be available for the evaluation.\n@param el the EL string to evaluate.\n@param returnType the class the EL evaluates to.\n@return the evaluated EL as an instance of the specified return type.\n@throws ELEvalException if the EL could not be evaluated.",
"Scales the brightness of a pixel.",
"returns position of xpath element which match the expression xpath in the String dom.\n\n@param dom the Document to search in\n@param xpath the xpath query\n@return position of xpath element, if fails returns -1",
"Sets the file-pointer offset, measured from the beginning of this file,\nat which the next read or write occurs.",
"Use this API to unset the properties of sslparameter resource.\nProperties that need to be unset are specified in args array.",
"generate a message for loglevel FATAL\n\n@param pObject the message Object",
"Processes the template for all procedures of the current class definition.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"",
"Retrieve the default aliases to be applied to MPXJ task and resource fields.\n\n@return map of aliases",
"Provides a reverse view on the given list which is especially useful to traverse a list backwards in a for-each\nloop. The list itself is not modified by calling this method.\n\n@param list\nthe list whose elements should be traversed in reverse. May not be <code>null</code>.\n@return a list with the same elements as the given list, in reverse"
] |
public static String addFolderSlashIfNeeded(String folderName) {
if (!"".equals(folderName) && !folderName.endsWith("/")) {
return folderName + "/";
} else {
return folderName;
}
} | [
"Adds a slash to a path if it doesn't end with a slash.\n\n@param folderName The path to append a possible slash.\n@return The new, correct path."
] | [
"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",
"Parse a version String and add the components to a properties object.\n\n@param version the version to parse",
"Use this API to enable clusterinstance resources of given names.",
"Enables a custom response\n\n@param model\n@param custom\n@param path_id\n@param clientUUID\n@return\n@throws Exception",
"This takes into account scrolling and will be in absolute\ncoordinates where the top left corner of the page is 0,0 but\nthe viewport may be scrolled to something else.",
"Extracts value from map if given value is null.\n@param value current value\n@param props properties to extract value from\n@param key property name to extract\n@return initial value or value extracted from map",
"Add the currentSceneObject to an active Level-of-Detail",
"Copies all available data from in to out without closing any stream.\n\n@return number of bytes copied",
"Attempts to return the token from cache. If this is not possible because it is expired or was\nnever assigned, a new token is requested and parallel requests will block on retrieving a new\ntoken. As such no guarantee of maximum latency is provided.\n\nTo avoid blocking the token is refreshed before it's expiration, while parallel requests\ncontinue to use the old token."
] |
public static Function<String, String> createStringTemplateSource(
I_CmsFormatterBean formatter,
Supplier<CmsXmlContent> contentSupplier) {
return key -> {
String result = null;
if (formatter != null) {
result = formatter.getAttributes().get(key);
}
if (result == null) {
CmsXmlContent content = contentSupplier.get();
if (content != null) {
result = content.getHandler().getParameter(key);
}
}
return result;
};
} | [
"Helper method to create a string template source for a given formatter and content.\n\n@param formatter the formatter\n@param contentSupplier the content supplier\n\n@return the string template provider"
] | [
"Generate a placeholder for an unknown type.\n\n@param type expected type\n@param fieldID field ID\n@return placeholder",
"Add a list of enums to the options map\n@param key The key for the options map (ex: \"include[]\")\n@param list A list of enums",
"Write a message to the console.\n\n@param pattern\nA {@link String#format(String, Object...)} pattern\n@param parameters\nOptional parameters to plug into the pattern",
"Returns the value associated with the given key, if any.\n\n@return the value associated with the given key, or <Code>null</Code>\nif the key maps to no value",
"Converts the given string to a clob object\n\n@param stringName string name to clob\n@param sqlConnection Connection object\n@return Clob object or NULL",
"Explode the deployment contents and attach a \"transformed\" slave operation to the operation context.\n\n@param context the operation context\n@param operation the original operation\n@param contentRepository the content repository\n@return the hash of the uploaded deployment content\n@throws IOException\n@throws OperationFailedException",
"Returns the compact representations of all of the dependencies of a task.\n\n@param task The task to get dependencies on.\n@return Request object",
"A recursive getAttribute method. In case a one-to-many is passed, an array will be returned.\n\n@param feature The feature wherein to search for the attribute\n@param name The attribute's full name. (can be attr1.attr2)\n@return Returns the value. In case a one-to-many is passed along the way, an array will be returned.\n@throws LayerException oops",
"Stop finding waveforms for all active players."
] |
private void populateTask(Row row, Task task)
{
//"PROJID"
task.setUniqueID(row.getInteger("TASKID"));
//GIVEN_DURATIONTYPF
//GIVEN_DURATIONELA_MONTHS
task.setDuration(row.getDuration("GIVEN_DURATIONHOURS"));
task.setResume(row.getDate("RESUME"));
//task.setStart(row.getDate("GIVEN_START"));
//LATEST_PROGRESS_PERIOD
//TASK_WORK_RATE_TIME_UNIT
//TASK_WORK_RATE
//PLACEMENT
//BEEN_SPLIT
//INTERRUPTIBLE
//HOLDING_PIN
///ACTUAL_DURATIONTYPF
//ACTUAL_DURATIONELA_MONTHS
task.setActualDuration(row.getDuration("ACTUAL_DURATIONHOURS"));
task.setEarlyStart(row.getDate("EARLY_START_DATE"));
task.setLateStart(row.getDate("LATE_START_DATE"));
//FREE_START_DATE
//START_CONSTRAINT_DATE
//END_CONSTRAINT_DATE
//task.setBaselineWork(row.getDuration("EFFORT_BUDGET"));
//NATURAO_ORDER
//LOGICAL_PRECEDENCE
//SPAVE_INTEGER
//SWIM_LANE
//USER_PERCENT_COMPLETE
task.setPercentageComplete(row.getDouble("OVERALL_PERCENV_COMPLETE"));
//OVERALL_PERCENT_COMPL_WEIGHT
task.setName(row.getString("NARE"));
task.setNotes(getNotes(row));
task.setText(1, row.getString("UNIQUE_TASK_ID"));
task.setCalendar(m_project.getCalendarByUniqueID(row.getInteger("CALENDAU")));
//EFFORT_TIMI_UNIT
//WORL_UNIT
//LATEST_ALLOC_PROGRESS_PERIOD
//WORN
//BAR
//CONSTRAINU
//PRIORITB
//CRITICAM
//USE_PARENU_CALENDAR
//BUFFER_TASK
//MARK_FOS_HIDING
//OWNED_BY_TIMESHEEV_X
//START_ON_NEX_DAY
//LONGEST_PATH
//DURATIOTTYPF
//DURATIOTELA_MONTHS
//DURATIOTHOURS
task.setStart(row.getDate("STARZ"));
task.setFinish(row.getDate("ENJ"));
//DURATION_TIMJ_UNIT
//UNSCHEDULABLG
//SUBPROJECT_ID
//ALT_ID
//LAST_EDITED_DATE
//LAST_EDITED_BY
processConstraints(row, task);
if (NumberHelper.getInt(task.getPercentageComplete()) != 0)
{
task.setActualStart(task.getStart());
if (task.getPercentageComplete().intValue() == 100)
{
task.setActualFinish(task.getFinish());
task.setDuration(task.getActualDuration());
}
}
} | [
"Populate a task from a Row instance.\n\n@param row Row instance\n@param task Task instance"
] | [
"Returns a description String based on the defined command and options.\nUseful when printing \"help\" info etc.",
"Process encoded payload.\n\n@throws IOException Signals that an I/O exception has occurred.",
"Converts Observable of page to Observable of Inner.\n@param <InnerT> type of inner.\n@param innerPage Page to be converted.\n@return Observable for list of inner.",
"Excludes Vertices that are of the provided type.",
"to do with XmlId value being strictly of type 'String'",
"Unmarshals the XML content and adds the file to the bundle files.\n@throws CmsException thrown if reading the file or unmarshaling fails.",
"Set HTTP headers to allow caching for the given number of seconds.\n\n@param response where to set the caching settings\n@param seconds number of seconds into the future that the response should be cacheable for",
"Use this API to fetch filtered set of sslcipher_individualcipher_binding resources.\nset the filter parameter values in filtervalue object.",
"Gets any previous versions of this file. Note that only users with premium accounts will be able to retrieve\nprevious versions of their files.\n\n@return a list of previous file versions."
] |
public void setProperty(Object object, Object newValue) {
MetaMethod setter = getSetter();
if (setter == null) {
if (field != null && !Modifier.isFinal(field.getModifiers())) {
field.setProperty(object, newValue);
return;
}
throw new GroovyRuntimeException("Cannot set read-only property: " + name);
}
newValue = DefaultTypeTransformation.castToType(newValue, getType());
setter.invoke(object, new Object[]{newValue});
} | [
"Set the property on the given object to the new value.\n\n@param object on which to set the property\n@param newValue the new value of the property\n@throws RuntimeException if the property could not be set"
] | [
"Validate that the configuration is valid.\n\n@return any validation errors.",
"This method log given exception in specified listener",
"Return as a string the tagged values associated with c\n@param opt the Options used to guess font names\n@param c the Doc entry to look for @tagvalue\n@param prevterm the termination string for the previous element\n@param term the termination character for each tagged value",
"Write the domain controller data to a byte buffer.\n\n@param data the domain controller data\n@return the byte buffer\n@throws Exception",
"Use this API to delete sslfipskey resources of given names.",
"Adds an additional interface that the proxy should implement. The default\nimplementation will be to forward invocations to the bean instance.\n\n@param newInterface an interface",
"Extracts baseline cost from the MPP file for a specific baseline.\nReturns null if no baseline cost is present, otherwise returns\na list of timephased work items.\n\n@param calendar baseline calendar\n@param normaliser normaliser associated with this data\n@param data timephased baseline work data block\n@param raw flag indicating if this data is to be treated as raw\n@return timephased work",
"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",
"Ensures that the given collection descriptor has a valid element-class-ref property.\n\n@param collDef The collection descriptor\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If element-class-ref could not be determined or is invalid"
] |
private void reportException(Exception e) {
logger.error("Failed to write JSON export: " + e.toString());
throw new RuntimeException(e.toString(), e);
} | [
"Reports a given exception as a RuntimeException, since the interface does\nnot allow us to throw checked exceptions directly.\n\n@param e\nthe exception to report\n@throws RuntimeException\nin all cases"
] | [
"Set a proxy with authentication for REST-requests.\n\n@param proxyHost\n@param proxyPort\n@param username\n@param password",
"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",
"Closes the transactor node by removing its node in Zookeeper",
"Retrieves the class object for the given qualified class name.\n\n@param className The qualified name of the class\n@param initialize Whether the class shall be initialized\n@return The class object",
"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.",
"Checks the foreignkeys of all collections in the model.\n\n@param modelDef The model\n@param checkLevel The current check level (this constraint is checked in basic and strict)\n@exception ConstraintException If the value for foreignkey is invalid",
"Validates bic.\n\n@param bic to be validated.\n@throws BicFormatException if bic is invalid.\nUnsupportedCountryException if bic's country is not supported.",
"Get all the names of inputs that are required to be in the Values object when this graph is executed.",
"Calls the httpHandler method."
] |
public List<ModelNode> getAllowedValues() {
if (allowedValues == null) {
return Collections.emptyList();
}
return Arrays.asList(this.allowedValues);
} | [
"returns array with all allowed values\n@return allowed values"
] | [
"Use this API to fetch all the snmpalarm resources that are configured on netscaler.",
"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",
"Reads baseline values for the current resource.\n\n@param xmlResource MSPDI resource instance\n@param mpxjResource MPXJ resource instance",
"Runs a Story with the given configuration and steps.\n\n@param configuration the Configuration used to run story\n@param candidateSteps the List of CandidateSteps containing the candidate\nsteps methods\n@param story the Story to run\n@throws Throwable if failures occurred and FailureStrategy dictates it to\nbe re-thrown.",
"Add utility routes the router\n\n@param router",
"add a foreign key field",
"Returns a new color with a new value of the specified HSL\ncomponent.",
"Formats a double value.\n\n@param number numeric value\n@return Double instance",
"Gets the value of the task property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the task property.\n\n<p>\nFor example, to add a new item, do as follows:\n<pre>\ngetTask().add(newItem);\n</pre>\n\n\n<p>\nObjects of the following type(s) are allowed in the list\n{@link GanttDesignerRemark.Task }"
] |
@Override
public T next() {
SQLException sqlException = null;
try {
T result = nextThrow();
if (result != null) {
return result;
}
} catch (SQLException e) {
sqlException = e;
}
// we have to throw if there is no next or on a SQLException
last = null;
closeQuietly();
throw new IllegalStateException("Could not get next result for " + dataClass, sqlException);
} | [
"Returns the next object in the table.\n\n@throws IllegalStateException\nIf there was a problem extracting the object from SQL."
] | [
"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.",
"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",
"Finishes the process of attaching a metadata cache file once it has been opened and validated.\n\n@param slot the slot to which the cache should be attached\n@param cache the opened, validated metadata cache file",
"Sets the category of the notification for iOS8 notification\nactions. See 13 minutes into \"What's new in iOS Notifications\"\n\nPassing {@code null} removes the category.\n\n@param category the name of the category supplied to the app\nwhen receiving the notification\n@return this",
"Remove a variable in the top variables layer.",
"Find the user by their email address.\n\nThis method does not require authentication.\n\n@param email\nThe email address\n@return The User\n@throws FlickrException",
"Queries database meta data to check for the existence of\nspecific tables.",
"Reads the NTriples file from the reader, pushing statements into\nthe handler.",
"Use this API to fetch all the cachepolicylabel resources that are configured on netscaler."
] |
public static Variable deserialize(String s,
VariableType variableType,
List<String> dataTypes) {
Variable var = new Variable(variableType);
String[] varParts = s.split(":");
if (varParts.length > 0) {
String name = varParts[0];
if (!name.isEmpty()) {
var.setName(name);
if (varParts.length == 2) {
String dataType = varParts[1];
if (!dataType.isEmpty()) {
if (dataTypes != null && dataTypes.contains(dataType)) {
var.setDataType(dataType);
} else {
var.setCustomDataType(dataType);
}
}
}
}
}
return var;
} | [
"Deserializes a variable, checking whether the datatype is custom or not\n@param s\n@param variableType\n@param dataTypes\n@return"
] | [
"Returns the configured sort options, or the empty list if no such options are configured.\n@return The configured sort options, or the empty list if no such options are configured.",
"Loads a classifier from the file specified by loadPath. If loadPath ends in\n.gz, uses a GZIPInputStream, else uses a regular FileInputStream.",
"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.",
"Use this API to fetch all the dnstxtrec resources that are configured on netscaler.\nThis uses dnstxtrec_args which is a way to provide additional arguments while fetching the resources.",
"Compress a directory into a zip file\n\n@param dir Directory\n@param zipFile ZIP file to create\n@throws IOException I/O Error",
"Calculates the delta of a digital option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The delta of the digital option",
"Set the default host running the Odo instance to configure. Allows default profile methods and PathValueClient to\noperate on remote hosts\n\n@param hostName name of host",
"create a path structure representing the object graph",
"Gets the progress.\n\n@return the progress"
] |
protected synchronized StealerBasedRebalanceTask scheduleNextTask(boolean executeService) {
// Make sure there is work left to do.
if(doneSignal.getCount() == 0) {
logger.info("All tasks completion signaled... returning");
return null;
}
// Limit number of tasks outstanding.
if(this.numTasksExecuting >= maxParallelRebalancing) {
logger.info("Executing more tasks than [" + this.numTasksExecuting
+ "] the parallel allowed " + maxParallelRebalancing);
return null;
}
// Shuffle list of stealer IDs each time a new task to schedule needs to
// be found. Randomizing the order should avoid prioritizing one
// specific stealer's work ahead of all others.
List<Integer> stealerIds = new ArrayList<Integer>(tasksByStealer.keySet());
Collections.shuffle(stealerIds);
for(int stealerId: stealerIds) {
if(nodeIdsWithWork.contains(stealerId)) {
logger.info("Stealer " + stealerId + " is already working... continuing");
continue;
}
for(StealerBasedRebalanceTask sbTask: tasksByStealer.get(stealerId)) {
int donorId = sbTask.getStealInfos().get(0).getDonorId();
if(nodeIdsWithWork.contains(donorId)) {
logger.info("Stealer " + stealerId + " Donor " + donorId
+ " is already working... continuing");
continue;
}
// Book keeping
addNodesToWorkerList(Arrays.asList(stealerId, donorId));
numTasksExecuting++;
// Remove this task from list thus destroying list being
// iterated over. This is safe because returning directly out of
// this branch.
tasksByStealer.get(stealerId).remove(sbTask);
try {
if(executeService) {
logger.info("Stealer " + stealerId + " Donor " + donorId
+ " going to schedule work");
service.execute(sbTask);
}
} catch(RejectedExecutionException ree) {
logger.error("Stealer " + stealerId
+ "Rebalancing task rejected by executor service.", ree);
throw new VoldemortRebalancingException("Stealer "
+ stealerId
+ "Rebalancing task rejected by executor service.");
}
return sbTask;
}
}
printRemainingTasks(stealerIds);
return null;
} | [
"Schedule at most one task.\n\nThe scheduled task *must* invoke 'doneTask()' upon\ncompletion/termination.\n\n@param executeService flag to control execution of the service, some tests pass\nin value 'false'\n@return The task scheduled or null if not possible to schedule a task at\nthis time."
] | [
"Use this API to fetch all the nssimpleacl resources that are configured on netscaler.",
"Creates a new section in a project.\n\nReturns the full record of the newly created section.\n\n@param project The project to create the section in\n@return Request object",
"Returns if a request should be retried based on the retry count, current response,\nand the current strategy.\n\n@param retryCount The current retry attempt count.\n@param response The exception that caused the retry conditions to occur.\n@return true if the request should be retried; false otherwise.",
"This method retrieves an integer of the specified type,\nbelonging to the item with the specified unique ID.\n\n@param id unique ID of entity to which this data belongs\n@param type data type identifier\n@return required integer data",
"Adds a free connection.\n\n@param connectionHandle\n@throws SQLException on error",
"If a given x is into an interval of the partition, this method returns the reference point of the corresponding interval.\nIf the given x is not contained in any interval of the partition, this method returns x.\n\n@param x The point of interest.\n@return The discretized value.",
"Print a duration represented by an arbitrary fraction of minutes.\n\n@param duration Duration instance\n@param factor required factor\n@return duration represented as an arbitrary fraction of minutes",
"Get the OAuth request token - this is step one of authorization.\n\n@param callbackUrl\noptional callback URL - required for web auth flow, will be set to \"oob\" if not specified.\n@return the {@link OAuth1RequestToken}, store this for when the user returns from the Flickr website.",
"Use this API to fetch sslfipskey resource of given name ."
] |
public static <E> ServiceFuture<List<E>> fromPageResponse(Observable<ServiceResponse<Page<E>>> first, final Func1<String, Observable<ServiceResponse<Page<E>>>> next, final ListOperationCallback<E> callback) {
final AzureServiceFuture<List<E>> serviceCall = new AzureServiceFuture<>();
final PagingSubscriber<E> subscriber = new PagingSubscriber<>(serviceCall, next, callback);
serviceCall.setSubscription(first
.single()
.subscribe(subscriber));
return serviceCall;
} | [
"Creates a ServiceCall from a paging operation.\n\n@param first the observable to the first page\n@param next the observable to poll subsequent pages\n@param callback the client-side callback\n@param <E> the element type\n@return the future based ServiceCall"
] | [
"Set the amount of offset between child objects and parent.\n@param axis {@link Axis}\n@param offset",
"Pauses the file upload. This is a blocking function that would try to wait till the assembly file uploads\nhave actually been paused if possible.\n\n@throws LocalOperationException if the method is called while no upload is going on.",
"Creates a new broker instance.\n\n@param jcdAlias The jdbc connection descriptor name as defined in the repository\n@param user The user name to be used for connecting to the database\n@param password The password to be used for connecting to the database\n@return The persistence broker\n@see org.apache.ojb.broker.core.PersistenceBrokerFactoryIF#createPersistenceBroker(java.lang.String, java.lang.String, java.lang.String)",
"Gets the JVM memory usage.\n\n@return the JVM memory usage",
"Roll the years forward or backward.\n\n@param startDate - The start date\n@param years - Negative to rollbackwards.",
"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.",
"Invokes the setter on the bean with the supplied value.\n\n@param bean\nthe bean\n@param setMethod\nthe setter method for the field\n@param fieldValue\nthe field value to set\n@throws SuperCsvException\nif there was an exception invoking the setter",
"Use this API to fetch dnspolicy_dnspolicylabel_binding resources of given name .",
"Sets the origin and direction of the pick ray.\n\n@param ox X coordinate of origin.\n@param oy Y coordinate of origin.\n@param oz Z coordinate of origin.\n@param dx X coordinate of ray direction.\n@param dy Y coordinate of ray direction.\n@param dz Z coordinate of ray direction.\n\nThe coordinate system of the ray depends on the whether the\npicker is attached to a scene object or not. When attached\nto a scene object, the ray is in the coordinate system of\nthat object where (0, 0, 0) is the center of the scene object\nand (0, 0, 1) is it's positive Z axis. If not attached to an\nobject, the ray is in the coordinate system of the scene's\nmain camera with (0, 0, 0) at the viewer and (0, 0, -1)\nwhere the viewer is looking.\n@see #doPick()\n@see #getPickRay()\n@see #getWorldPickRay(Vector3f, Vector3f)"
] |
public static Map<String, StoreDefinition> getUserStoreDefMapOnNode(AdminClient adminClient,
Integer nodeId) {
List<StoreDefinition> storeDefinitionList = adminClient.metadataMgmtOps.getRemoteStoreDefList(nodeId)
.getValue();
Map<String, StoreDefinition> storeDefinitionMap = Maps.newHashMap();
for(StoreDefinition storeDefinition: storeDefinitionList) {
storeDefinitionMap.put(storeDefinition.getName(), storeDefinition);
}
return storeDefinitionMap;
} | [
"Utility function that fetches user defined store definitions\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch store definitions from\n@return The map container that maps store names to store definitions"
] | [
"Start the chain of execution running.\n\n@throws IllegalStateException\nif the chain of execution has already been started.",
"Add a new profile with the profileName given.\n\n@param profileName name of new profile\n@return newly created profile\n@throws Exception exception",
"Iterates through the given InputStream line by line using the specified\nencoding, splitting each line using the given separator. The list of tokens\nfor each line is then passed to the given closure. Finally, the stream\nis closed.\n\n@param stream an InputStream\n@param regex the delimiting regular expression\n@param charset opens the stream with a specified charset\n@param closure a closure\n@return the last value returned by the closure\n@throws IOException if an IOException occurs.\n@throws java.util.regex.PatternSyntaxException\nif the regular expression's syntax is invalid\n@see #splitEachLine(java.io.Reader, java.lang.String, groovy.lang.Closure)\n@since 1.5.5",
"Obtains a Pax zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Pax zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Produces all tuples of size n chosen from a list of variable names\n\n@param variables the list of variable names to make tuples of\n@param nWise the size of the desired tuples\n@return all tuples of size nWise",
"Read the domain controller's data from an input stream.\n\n@param instream the input stream\n@throws Exception",
"Gets all data set values.\n\n@param dataSet\nIIM record and dataset code (See constants in {@link IIM})\n@return data set value\n@throws SerializationException\nif value can't be deserialized from binary representation",
"submit the adminClient after usage is completed.\nBehavior is undefined, if checkin is called with objects not retrieved\nfrom checkout.\n\n@param client AdminClient retrieved from checkout",
"This method returns the value of the product under the specified model and other information in a key-value map.\n\n@param evaluationTime The time on which this products value should be observed.\n@param model A model used to evaluate the product.\n@return The values of the product.\n@throws net.finmath.exception.CalculationException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method."
] |
public static JsonPatch generate(final JsonNode source, final JsonNode target, ReplaceMode replaceMode) {
requireNonNull(source, "source");
requireNonNull(target, "target");
final DiffProcessor processor = new DiffProcessor(replaceMode, () -> unchangedValues(source, target));
generateDiffs(processor, EMPTY_JSON_POINTER, source, target);
return processor.getPatch();
} | [
"Generates a JSON patch for transforming the source node into the target node.\n\n@param source the node to be patched\n@param target the expected result after applying the patch\n@param replaceMode the replace mode to be used\n@return the patch as a {@link JsonPatch}"
] | [
"This is the code that needs to be executed before either eye is drawn.\n\n@return Current time, from {@link GVRTime#getCurrentTime()}",
"Returns a BoxStoragePolicyAssignment information.\n@param api the API connection to be used by the resource.\n@param resolvedForType the assigned entity type for the storage policy.\n@param resolvedForID the assigned entity id for the storage policy.\n@return information about this {@link BoxStoragePolicyAssignment}.",
"Create a ModelNode representing the CPU the instance is running on.\n\n@return a ModelNode representing the CPU the instance is running on.\n@throws OperationFailedException",
"Calculate start dates for a weekly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Extracts the value of this bit flag from the supplied byte array\nand sets the value in the supplied container.\n\n@param container container\n@param data byte array",
"Only converts the B matrix and passes that onto solve. Te result is then copied into\nthe input 'X' matrix.\n\n@param B A matrix ℜ <sup>m × p</sup>. Not modified.\n@param X A matrix ℜ <sup>n × p</sup>, where the solution is written to. Modified.",
"Creates a new CRFDatum from the preprocessed allData format, given the\ndocument number, position number, and a List of Object labels.\n\n@return A new CRFDatum",
"Retrieve the start slack.\n\n@return start slack",
"Creates a favorite widget for a favorite entry.\n\n@param entry the favorite entry\n@return the favorite widget\n\n@throws CmsException if something goes wrong"
] |
@SuppressWarnings("deprecation")
protected ModelNode executeReadOnlyOperation(final ModelNode operation, final OperationMessageHandler handler, final OperationTransactionControl control, final OperationStepHandler prepareStep, final int operationId) {
final AbstractOperationContext delegateContext = getDelegateContext(operationId);
CurrentOperationIdHolder.setCurrentOperationID(operationId);
try {
return executeReadOnlyOperation(operation, delegateContext.getManagementModel(), control, prepareStep, delegateContext);
} finally {
CurrentOperationIdHolder.setCurrentOperationID(null);
}
} | [
"Executes an operation on the controller latching onto an existing transaction\n\n@param operation the operation\n@param handler the handler\n@param control the transaction control\n@param prepareStep the prepare step to be executed before any other steps\n@param operationId the id of the current transaction\n@return the result of the operation"
] | [
"Renders the given FreeMarker template to given directory, using given variables.",
"Add a content modification.\n\n@param modification the content modification",
"Puts the cached security context in the thread local.\n\n@param context the cache context",
"Closes a Closeable and swallows any exceptions that might occur in the\nprocess.\n\n@param closeable",
"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)}",
"caching is not supported for this method",
"Returns a string that should be used as a label for the given property.\n\n@param propertyIdValue\nthe property to label\n@return the label",
"Load a list of entities using the information in the context\n\n@param session The session\n@param lockOptions The locking details\n@param ogmContext The context with the information to load the entities\n@return the list of entities corresponding to the given context",
"Returns a factory that vends DelimitRegExIterators that reads the contents of the\ngiven Reader, splits on the specified delimiter, applies op, then returns the result."
] |
public Object[] getForeignKeyValues(Object obj, ClassDescriptor mif)
throws PersistenceBrokerException
{
FieldDescriptor[] fks = getForeignKeyFieldDescriptors(mif);
// materialize object only if FK fields are declared
if(fks.length > 0) obj = ProxyHelper.getRealObject(obj);
Object[] result = new Object[fks.length];
for (int i = 0; i < result.length; i++)
{
FieldDescriptor fmd = fks[i];
PersistentField f = fmd.getPersistentField();
// BRJ: do NOT convert.
// conversion is done when binding the sql-statement
//
// FieldConversion fc = fmd.getFieldConversion();
// Object val = fc.javaToSql(f.get(obj));
result[i] = f.get(obj);
}
return result;
} | [
"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"
] | [
"Close the Closeable. Logging a warning if any problems occur.\n\n@param c the thing to close",
"Splits data into blocks, adds error correction and then interleaves the blocks and error correction data.",
"Creates a new DMatrixRMaj around the provided data. The data must encode\na row-major matrix. Any modification to the returned matrix will modify the\nprovided data.\n\n@param numRows Number of rows in the matrix.\n@param numCols Number of columns in the matrix.\n@param data Data that is being wrapped. Referenced Saved.\n@return A matrix which references the provided data internally.",
"Check whether the given is is matched by one of the include expressions.\n\n@param id id to check\n@param includes list of include regular expressions\n@return true when id is included",
"Print the class's constructors m",
"Set the value for a floating point vector of length 4.\n@param key name of uniform to set.\n@param x new X value\n@param y new Y value\n@param z new Z value\n@param w new W value\n@see #getVec4\n@see #getFloatVec(String)",
"Builds a instance of the class for a map containing the values\n\n@param clazz Class to build\n@param values Values map\n@param differenceHandler The difference handler\n@return The created instance\n@throws InstantiationException Error instantiating\n@throws IllegalAccessException Access error\n@throws IntrospectionException Introspection error\n@throws IllegalArgumentException Argument invalid\n@throws InvocationTargetException Invalid target",
"Build all combinations of graph structures for generic event stubs of a maximum length\n@param length Maximum number of nodes in each to generate\n@return All graph combinations of specified length or less",
"Writes the content of an input stream to an output stream\n\n@throws IOException"
] |
public String getStatement() throws SQLException {
StringBuilder sb = new StringBuilder();
appendSql(null, sb, new ArrayList<ArgumentHolder>());
return sb.toString();
} | [
"Returns the associated SQL WHERE statement."
] | [
"Responsible for executing file rolls as and when required, in addition to\ndelegating to the super class to perform the actual append operation.\nSynchronized for safety during enforced file roll.\n\n@see org.apache.log4j.WriterAppender#subAppend(org.apache.log4j.spi.LoggingEvent)",
"Deletes and publishes resources with ID conflicts.\n\n@param cms the CMS context to use\n@param module the module\n@param conflictingIds the conflicting ids\n@throws CmsException if something goes wrong\n@throws Exception if something goes wrong",
"Read a task from a ConceptDraw PROJECT file.\n\n@param projectIdentifier parent project identifier\n@param map outline number to task map\n@param task ConceptDraw PROJECT task",
"Checks the second, hour, month, day, month and year are equal.",
"This method will be intercepted by the proxy if it is enabled to return the internal target.\n@return the target.",
"Gets an iterator to the EJB descriptors for an EJB implementation class\n\n@param beanClass The EJB class\n@return An iterator",
"Sets the value for the API's \"props\" parameter based on the current\nsettings.\n\n@param properties\ncurrent setting of parameters",
"Set a friendly name for a client\n\n@param profileId profileId of the client\n@param clientUUID UUID of the client\n@param friendlyName friendly name of the client\n@return return Client object or null\n@throws Exception exception",
"Returns the supplied string with any trailing '\\n' removed."
] |
@Deprecated
public static OptionMap create(final ExpressionResolver resolver, final ModelNode model, final OptionMap defaults) throws OperationFailedException {
final OptionMap map = OptionMap.builder()
.addAll(defaults)
.set(Options.WORKER_READ_THREADS, RemotingSubsystemRootResource.WORKER_READ_THREADS.resolveModelAttribute(resolver, model).asInt())
.set(Options.WORKER_TASK_CORE_THREADS, RemotingSubsystemRootResource.WORKER_TASK_CORE_THREADS.resolveModelAttribute(resolver, model).asInt())
.set(Options.WORKER_TASK_KEEPALIVE, RemotingSubsystemRootResource.WORKER_TASK_KEEPALIVE.resolveModelAttribute(resolver, model).asInt())
.set(Options.WORKER_TASK_LIMIT, RemotingSubsystemRootResource.WORKER_TASK_LIMIT.resolveModelAttribute(resolver, model).asInt())
.set(Options.WORKER_TASK_MAX_THREADS, RemotingSubsystemRootResource.WORKER_TASK_MAX_THREADS.resolveModelAttribute(resolver, model).asInt())
.set(Options.WORKER_WRITE_THREADS, RemotingSubsystemRootResource.WORKER_WRITE_THREADS.resolveModelAttribute(resolver, model).asInt())
.set(Options.WORKER_READ_THREADS, RemotingSubsystemRootResource.WORKER_READ_THREADS.resolveModelAttribute(resolver, model).asInt())
.getMap();
return map;
} | [
"creates option map for remoting connections\n@param resolver\n@param model\n@param defaults\n@return\n@throws OperationFailedException\n@deprecated configuring xnio worker options is no longer supported and should be replaced for referencing IO subsystem"
] | [
"Returns an immutable view of a given map.",
"Use this API to add clusterinstance resources.",
"set custom response or request for a profile's default client, ensures profile and path are enabled\n\n@param profileName profileName to modift, default client is used\n@param pathName friendly name of path\n@param isResponse true if response, false for request\n@param customData custom response/request data\n@return true if success, false otherwise",
"Establish a new tempo master, and if it is a change from the existing one, report it to the listeners.\n\n@param newMaster the packet which caused the change of masters, or {@code null} if there is now no master.",
"Tests an observer method to see if it is transactional.\n\n@param observer The observer method\n@return true if the observer method is annotated as transactional",
"get the TypeArgSignature corresponding to given type\n\n@param type\n@return",
"Deploys application reading resources from specified InputStream\n\n@param inputStream where resources are read\n@throws IOException",
"checkpoint the ObjectModification",
"Copies just the upper or lower triangular portion of a matrix.\n\n@param src Matrix being copied. Not modified.\n@param dst Where just a triangle from src is copied. If null a new one will be created. Modified.\n@param upper If the upper or lower triangle should be copied.\n@return The copied matrix."
] |
public ItemDocument updateStatements(ItemIdValue itemIdValue,
List<Statement> addStatements, List<Statement> deleteStatements,
String summary) throws MediaWikiApiErrorException, IOException {
ItemDocument currentDocument = (ItemDocument) this.wikibaseDataFetcher
.getEntityDocument(itemIdValue.getId());
return updateStatements(currentDocument, addStatements,
deleteStatements, summary);
} | [
"Updates the statements of the item document identified by the given item\nid. The updates are computed with respect to the current data found\nonline, making sure that no redundant deletions or duplicate insertions\nhappen. The references of duplicate statements will be merged.\n\n@param itemIdValue\nid of the document to be updated\n@param addStatements\nthe list of statements to be added or updated; statements with\nempty statement id will be added; statements with non-empty\nstatement id will be updated (if such a statement exists)\n@param deleteStatements\nthe list of statements to be deleted; statements will only be\ndeleted if they are present in the current document (in\nexactly the same form, with the same id)\n@param summary\nshort edit summary\n@return the updated document\n@throws MediaWikiApiErrorException\nif the API returns errors\n@throws IOException\nif there are IO problems, such as missing network connection"
] | [
"Format a date that is parseable from JavaScript, according to ISO-8601.\n\n@param date the date to format to a JSON string\n@return a formatted date in the form of a string",
"Start unmarshalling using the parser.\n@param parser\n@param preProcessingData\n@return the root element of a bpmn2 document.\n@throws java.io.IOException",
"Checks the given collection descriptor.\n\n@param collDef The collection descriptor\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"Attaches the menu drawer to the window.",
"Use this API to fetch vlan_nsip_binding resources of given name .",
"Returns new instance of OptionalValue with given key and value\n@param key resource key of the created value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue with given key",
"Tries to return the single table to which all classes in the hierarchy with the given\nclass as the root map.\n\n@param classDef The root class of the hierarchy\n@return The table name or <code>null</code> if the classes map to more than one table\nor no class in the hierarchy maps to a table",
"Increases the maximum size of the data array so that it can store sparse data up to 'length'. The class\nparameter nz_length is not modified by this function call.\n\n@param arrayLength Desired maximum length of sparse data\n@param preserveValue If true the old values will be copied into the new arrays. If false that step will be skipped.",
"Retrieves the yearly absolute date.\n\n@param data recurrence data\n@return yearly absolute date"
] |
public Weld property(String key, Object value) {
properties.put(key, value);
return this;
} | [
"Set the configuration property.\n\n@param key\n@param value\n@return self\n@see #ARCHIVE_ISOLATION_SYSTEM_PROPERTY\n@see #SHUTDOWN_HOOK_SYSTEM_PROPERTY\n@see #DEV_MODE_SYSTEM_PROPERTY\n@see ConfigurationKey"
] | [
"Decorates a node with the affected operator, if any.\n\n@param context\n@param tree\n@param operations\n@return",
"Main method for testing fetching",
"Read the file header data.\n\n@param is input stream",
"Set the model used by the left table.\n\n@param model table model",
"Execute blocking for a prepared result.\n\n@param operation the operation to execute\n@param client the protocol client\n@return the prepared operation\n@throws IOException\n@throws InterruptedException",
"Saves a matrix to disk using Java binary serialization.\n\n@param A The matrix being saved.\n@param fileName Name of the file its being saved at.\n@throws java.io.IOException",
"Get a unique reference to a media slot on the network from which tracks can be loaded.\n\n@param player the player in which the slot is found\n@param slot the specific type of the slot\n\n@return the instance that will always represent the specified slot\n\n@throws NullPointerException if {@code slot} is {@code null}",
"Wrap CallableStatement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a Callablestatement.",
"Sort by time bucket, then backup count, and by compression state."
] |
public static long bytesToNumber(byte[] buffer, int start, int length) {
long result = 0;
for (int index = start; index < start + length; index++) {
result = (result << 8) + unsign(buffer[index]);
}
return result;
} | [
"Reconstructs a number that is represented by more than one byte in a network packet in 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"
] | [
"Adds a class to the unit.",
"Parse the given file to obtains a Properties object.\n\n@param file\n@return a properties object containing all the properties present in the file.\n@throws InvalidDeclarationFileException",
"Helper to read an optional Integer value.\n@param path The XML path of the element to read.\n@return The Integer value stored in the XML, or <code>null</code> if the value could not be read.",
"This method prints goal information of an agent through its external\naccess. It can be used to check the correct behaviour of the agent.\n\n@param agent_name\nThe name of the agent\n@param connector\nThe connector to get the external access\n@return goals the IGoal[] with all the information, so the tester can\nlook for information",
"Reads entries from transforms.xml.\n\n@param file the XML file\n@return the transform entries read from the file\n\n@throws Exception if something goes wrong",
"Runs Crawljax with the given configuration.\n\n@return The {@link CrawlSession} once the Crawl is done.",
"mark a node as blacklisted\n\n@param nodeId Integer node id of the node to be blacklisted",
"Build a request URL.\n\n@param host\nThe host\n@param port\nThe port\n@param path\nThe path\n@param parameters\nThe parameters\n@return The URL\n@throws MalformedURLException\n@deprecated use {@link #buildSecureUrl(java.lang.String, int, java.lang.String, java.util.Map) }",
"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"
] |
public LuaPreparedScript endPreparedScript(LuaScriptConfig config) {
if (!endsWithReturnStatement()) {
add(new LuaAstReturnStatement());
}
String scriptText = buildScriptText();
ArrayList<LuaKeyArgument> keyList = new ArrayList<>(keyArg2AstArg.keySet());
ArrayList<LuaValueArgument> argvList = new ArrayList<>(valueArg2AstArg.keySet());
if (config.isThreadSafe()) {
return new ThreadSafeLuaPreparedScript(scriptText, keyList, argvList, config);
} else {
return new BasicLuaPreparedScript(scriptText, keyList, argvList, config);
}
} | [
"End building the prepared script\n@param config the configuration for the script to build\n@return the new {@link LuaPreparedScript} instance"
] | [
"Check if this request is part of the specified request. This is the case if both requests have equal properties\nand the specified request is asking for the same or more paint operations than this one.\n\n@param request another request\n@return true if the current request is contained in the specified request\n@since 1.10.0",
"Transposes an individual block inside a block matrix.",
"Creates a solver for symmetric positive definite matrices.\n\n@return A new solver for symmetric positive definite matrices.",
"Split input text into sentences.\n\n@param text Input text.\n@return List of Sentence objects.",
"Encodes the given URI path with the given encoding.\n@param path the path to be encoded\n@param encoding the character encoding to encode to\n@return the encoded path\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"retrieve a single reference- or collection attribute\nof a persistent instance.\n@param pInstance the persistent instance\n@param pAttributeName the name of the Attribute to load",
"Use this API to fetch crvserver_binding resource of given name .",
"Restores a BoxAPIConnection from a saved state.\n\n@see #save\n@param clientID the client ID to use with the connection.\n@param clientSecret the client secret to use with the connection.\n@param state the saved state that was created with {@link #save}.\n@return a restored API connection.",
"B tensor is ignored for CUDNN_OP_TENSOR_SQRT, CUDNN_OP_TENSOR_NOT."
] |
@SuppressWarnings("unchecked")
protected static void visitSubreports(DynamicReport dr, Map _parameters) {
for (DJGroup group : dr.getColumnsGroups()) {
//Header Subreports
for (Subreport subreport : group.getHeaderSubreports()) {
if (subreport.getDynamicReport() != null) {
visitSubreport(dr, subreport);
visitSubreports(subreport.getDynamicReport(), _parameters);
}
}
//Footer Subreports
for (Subreport subreport : group.getFooterSubreports()) {
if (subreport.getDynamicReport() != null) {
visitSubreport(dr, subreport);
visitSubreports(subreport.getDynamicReport(), _parameters);
}
}
}
} | [
"Performs any needed operation on subreports after they are built like ensuring proper subreport with\nif \"fitToParentPrintableArea\" flag is set to true\n\n@param dr\n@param _parameters\n@throws JRException"
] | [
"Should be called after all columns have been created\n@param headerStyle\n@param totalStyle\n@param totalHeaderStyle\n@return",
"Normalizes the name so it can be used as Maven artifactId or groupId.",
"Get viewport size along the axis\n@param axis {@link Axis}\n@return size",
"Obtains a local date in Julian calendar system from the\nera, year-of-era and day-of-year fields.\n\n@param era the Julian era, not null\n@param yearOfEra the year-of-era\n@param dayOfYear the day-of-year\n@return the Julian local date, not null\n@throws DateTimeException if unable to create the date\n@throws ClassCastException if the {@code era} is not a {@code JulianEra}",
"Attaches an arbitrary object to this context.\n\n@param key they attachment key used to ensure uniqueness and used for retrieval of the value.\n@param value the value to store.\n@param <V> the value type of the attachment.\n\n@return the previous value associated with the key or {@code null} if there was no previous value.",
"Extract resource group from a resource ID string.\n@param id the resource ID string\n@return the resource group name",
"Use this API to add autoscaleaction.",
"This method allows us to peek into the OLE compound document to extract the file format.\nThis allows the UniversalProjectReader to determine if this is an MPP file, or if\nit is another type of OLE compound document.\n\n@param fs POIFSFileSystem instance\n@return file format name\n@throws IOException",
"package scope in order to test the method"
] |
private void notifyIfStopped() {
if (isAcceptingNewJobs() || !this.runningTasksFutures.isEmpty()) {
return;
}
final File stoppedFile = new File(this.workingDirectories.getWorking(), "stopped");
try {
LOGGER.info("The print has finished processing jobs and can now stop");
stoppedFile.createNewFile();
} catch (IOException e) {
LOGGER.warn("Cannot create the {} file", stoppedFile, e);
}
} | [
"Add a file to notify the script that asked to stop the print that it is now done processing the remain\njobs."
] | [
"Returns the specified range of elements in the sorted set.\nThe elements are considered to be ordered from the highest to the lowest score.\nDescending lexicographical order is used for elements with equal score.\nBoth start and stop are zero-based inclusive indexes. They can also be negative numbers indicating offsets from\nthe end of the sorted set, with -1 being the last element of the sorted set.\n@param start\n@param end\n@return the range of elements",
"Send a master changed announcement to all registered master listeners.\n\n@param update the message announcing the new tempo master",
"Obtains a local date in Accounting 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 Accounting local date, not null\n@throws DateTimeException if unable to create the date",
"Tries to load the custom error page at the given rootPath.\n@param cms {@link CmsObject} used for reading the resource (site root and uri get adjusted!)\n@param req the current request\n@param res the current response\n@param rootPath the VFS root path to the error page resource\n@return a flag, indicating if the error page could be loaded",
"Scale all widgets in Main Scene hierarchy\n@param scale",
"Determine which unit to use when creating grid labels.\n\n@param mapCrs the crs of the map, used if the {@link #labelProjection} is not defined.",
"Stores the gathered usage statistics about term uses by language to a CSV\nfile.\n\n@param usageStatistics\nthe statistics to store\n@param fileName\nthe name of the file to use",
"Gets the addresses of the child resources under the given resource.\n\n@param context the operation context\n@param registry registry entry representing the resource\n@param resource the current resource\n@param validChildType a single child type to which the results should be limited. If {@code null} the result\nshould include all child types\n@return map where the keys are the child types and the values are a set of child names associated with a type",
"In the 3.0 xsd the vault configuration and its options are part of the vault xsd.\n\n@param reader the reader at the vault element\n@param expectedNs the namespace\n@return the vault configuration"
] |
@ArgumentsChecked
@Throws(IllegalNullArgumentException.class)
public static byte checkByte(@Nonnull final Number number) {
Check.notNull(number, "number");
if (!isInByteRange(number)) {
throw new IllegalNumberRangeException(number.toString(), BYTE_MIN, BYTE_MAX);
}
return number.byteValue();
} | [
"Checks if a given number is in the range of a byte.\n\n@param number\na number which should be in the range of a byte (positive or negative)\n\n@see java.lang.Byte#MIN_VALUE\n@see java.lang.Byte#MAX_VALUE\n\n@return number as a byte (rounding might occur)"
] | [
"Write a message to the console.\n\n@param pattern\nA {@link String#format(String, Object...)} pattern\n@param parameters\nOptional parameters to plug into the pattern",
"Print an accrue type.\n\n@param value AccrueType instance\n@return accrue type value",
"A convenience method for creating an immutable sorted set.\n\n@param self a SortedSet\n@return an immutable SortedSet\n@see java.util.Collections#unmodifiableSortedSet(java.util.SortedSet)\n@since 1.0",
"Retrieve the most recent storepoint.\n\n@param phoenixProject project data\n@return Storepoint instance",
"Returns the string in the buffer minus an leading or trailing whitespace or quotes",
"Validate that the overlay exists. If it doesn't exist, throws an\nexception if not in batch mode or if failInBatch is true. In batch mode,\nwe could be in the case that the overlay doesn't exist yet.",
"This static method calculated the vega of a call option under a Black-Scholes model\n\n@param initialStockValue The initial value of the underlying, i.e., the spot.\n@param riskFreeRate The risk free rate of the bank account numerarie.\n@param volatility The Black-Scholes volatility.\n@param optionMaturity The option maturity T.\n@param optionStrike The option strike.\n@return The vega of the option",
"Convert MPX day index to Day instance.\n\n@param day day index\n@return Day instance",
"A smoothed step function. A cubic function is used to smooth the step between two thresholds.\n@param a the lower threshold position\n@param b the upper threshold position\n@param x the input parameter\n@return the output value"
] |
public String getHiveExecutionEngine() {
String executionEngine = hiveConfSystemOverride.get(HiveConf.ConfVars.HIVE_EXECUTION_ENGINE.varname);
return executionEngine == null ? HiveConf.ConfVars.HIVE_EXECUTION_ENGINE.getDefaultValue() : executionEngine;
} | [
"Get the configured hive.execution.engine. If not set it will default to the default value of HiveConf"
] | [
"Takes a matrix and splits it into a set of row or column vectors.\n\n@param A original matrix.\n@param column If true then column vectors will be created.\n@return Set of vectors.",
"Log original incoming request\n\n@param requestType\n@param request\n@param history",
"this class requires that the supplied enum is not fitting a\nCollection case for casting",
"create logs with given partition number\n\n@param topic the topic name\n@param partitions partition number\n@param forceEnlarge enlarge the partition number of log if smaller than runtime\n@return the partition number of the log after enlarging",
"Restores a trashed folder back to its original location.\n@param folderID the ID of the trashed folder.\n@return info about the restored folder.",
"Populate the container, converting raw data into Java types.\n\n@param field custom field to which these values belong\n@param values raw value data\n@param descriptions raw description data",
"Scales the weights of this crfclassifier by the specified weight\n\n@param scale",
"Replace known tags in the current data values with actual values as appropriate\n\n@param cr a reference to DataPipe from which to read the current map",
"Helper method to remove invalid children that don't have a corresponding CmsSitemapClientEntry."
] |
public static Boolean compareMultipleClientConfigAvro(String configAvro1, String configAvro2) {
Map<String, Properties> mapStoreToProps1 = readMultipleClientConfigAvro(configAvro1);
Map<String, Properties> mapStoreToProps2 = readMultipleClientConfigAvro(configAvro2);
Set<String> keySet1 = mapStoreToProps1.keySet();
Set<String> keySet2 = mapStoreToProps2.keySet();
if(!keySet1.equals(keySet2)) {
return false;
}
for(String storeName: keySet1) {
Properties props1 = mapStoreToProps1.get(storeName);
Properties props2 = mapStoreToProps2.get(storeName);
if(!props1.equals(props2)) {
return false;
}
}
return true;
} | [
"Compares two avro strings which contains multiple store configs\n\n@param configAvro1\n@param configAvro2\n@return true if two config avro strings have same content"
] | [
"Determine if a key version is invalid by comparing the version's\nexistence and required writes configuration\n\n@param keyVersionNodeSetMap A map that contains keys mapping to a map\nthat maps versions to set of PrefixNodes\n@param requiredWrite Required Write configuration",
"Adds an additional interface that the proxy should implement. The default\nimplementation will be to forward invocations to the bean instance.\n\n@param newInterface an interface",
"Internal method used to retrieve a integer from an\nembedded data block.\n\n@param blocks list of data blocks\n@return int value",
"Closes the server socket.",
"Expects a height mat as input\n\n@param input - A grayscale height map\n@return edges",
"Register opened database via the PBKey.",
"Handle a start time change.\n\n@param event the change event",
"Remove a collaborator from an app.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param collaborator See {@link #listCollaborators} for collaborators that can be removed from the app.",
"Use this API to fetch all the dnssuffix resources that are configured on netscaler."
] |
public void afterLoading(CollectionProxyDefaultImpl colProxy)
{
if (log.isDebugEnabled()) log.debug("loading a proxied collection a collection: " + colProxy);
Collection data = colProxy.getData();
for (Iterator iterator = data.iterator(); iterator.hasNext();)
{
Object o = iterator.next();
if(!isOpen())
{
log.error("Collection proxy materialization outside of a running tx, obj=" + o);
try{throw new Exception("Collection proxy materialization outside of a running tx, obj=" + o);}
catch(Exception e)
{e.printStackTrace();}
}
else
{
Identity oid = getBroker().serviceIdentity().buildIdentity(o);
ClassDescriptor cld = getBroker().getClassDescriptor(ProxyHelper.getRealClass(o));
RuntimeObject rt = new RuntimeObject(o, oid, cld, false, ProxyHelper.isProxy(o));
lockAndRegister(rt, Transaction.READ, isImplicitLocking(), getRegistrationList());
}
}
unregisterFromCollectionProxy(colProxy);
} | [
"Remove colProxy from list of pending collections and\nregister its contents with the transaction."
] | [
"Retrieves the pro-rata work carried out on a given day.\n\n@param calendar current calendar\n@param assignment current assignment.\n@return assignment work duration",
"Checks the given class descriptor for correct row-reader 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",
"Returns the configured body or the default value.",
"Add a EXISTS clause with a sub-query inside of parenthesis.\n\n<p>\n<b>NOTE:</b> The sub-query will be prepared at the same time that the outside query is.\n</p>",
"Register a data type with the manager.",
"Use this API to add gslbsite.",
"Recovers the state of synchronization for a namespace in case a system failure happened.\nThe goal is to revert the namespace to a known, good state. This method itself is resilient\nto failures, since it doesn't delete any documents from the undo collection until the\ncollection is in the desired state with respect to those documents.",
"Returns whether this address contains the non-zero host addresses in other.\n@param other\n@return",
"Use this API to fetch responderpolicylabel_binding resource of given name ."
] |
public boolean add(long key) {
final int index = ((((int) (key >>> 32)) ^ ((int) (key))) & 0x7fffffff) % capacity;
final Entry entryOriginal = table[index];
for (Entry entry = entryOriginal; entry != null; entry = entry.next) {
if (entry.key == key) {
return false;
}
}
table[index] = new Entry(key, entryOriginal);
size++;
if (size > threshold) {
setCapacity(2 * capacity);
}
return true;
} | [
"Adds the given value to the set.\n\n@return true if the value was actually new"
] | [
"Get the TagsInterface for working with Flickr Tags.\n\n@return The TagsInterface",
"Possibly coalesces the newest change event to match the user's original intent. For example,\nan unsynchronized insert and update is still an insert.\n\n@param lastUncommittedChangeEvent the last change event known about for a document.\n@param newestChangeEvent the newest change event known about for a document.\n@return the possibly coalesced change event.",
"Extract task data.",
"Gets the registration point that been associated with the registration for the longest period.\n\n@return the initial registration point, or {@code null} if there are no longer any registration points",
"Delete a comment as the currently authenticated user.\n\nThis method requires authentication with 'write' permission.\n\n@param commentId\nThe id of the comment to delete.\n@throws FlickrException",
"Use this API to update nsrpcnode.",
"moves to the next row of the underlying ResultSet and returns the\ncorresponding Object materialized from this row.",
"Method used to create missing timephased data.\n\n@param file project file\n@param assignment resource assignment\n@param timephasedPlanned planned timephased data\n@param timephasedComplete complete timephased data",
"Remove a path from a profile\n\n@param path_id path ID to remove\n@param profileId profile ID to remove path from"
] |
public static boolean isPartOfRegularEmbedded(String[] keyColumnNames, String column) {
return isPartOfEmbedded( column ) && !ArrayHelper.contains( keyColumnNames, column );
} | [
"A regular embedded is an element that it is embedded but it is not a key or a collection.\n\n@param keyColumnNames the column names representing the identifier of the entity\n@param column the column we want to check\n@return {@code true} if the column represent an attribute of a regular embedded element, {@code false} otherwise"
] | [
"Add a date with a certain check state.\n@param date the date to add.\n@param checkState the check state.",
"Set HTTP headers to allow caching for the given number of seconds.\n\n@param response where to set the caching settings\n@param seconds number of seconds into the future that the response should be cacheable for",
"Modify a bundle.\n\n@param moduleName the module name\n@param slot the module slot\n@param existingHash the existing hash\n@param newHash the new hash of the modified content\n@return the builder",
"Specify the output format of the image.\n\n@see ImageFormat",
"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",
"Enable or disable the default blank validator.",
"Log a info message with a throwable.",
"Puts value at given column\n\n@param value Will be encoded using UTF-8",
"Store the data of a print job in the registry.\n\n@param printJobStatus the print job status"
] |
private static int[] getMode3PrimaryCodewords(String postcode, int country, int service) {
int[] postcodeNums = new int[postcode.length()];
postcode = postcode.toUpperCase();
for (int i = 0; i < postcodeNums.length; i++) {
postcodeNums[i] = postcode.charAt(i);
if (postcode.charAt(i) >= 'A' && postcode.charAt(i) <= 'Z') {
// (Capital) letters shifted to Code Set A values
postcodeNums[i] -= 64;
}
if (postcodeNums[i] == 27 || postcodeNums[i] == 31 || postcodeNums[i] == 33 || postcodeNums[i] >= 59) {
// Not a valid postal code character, use space instead
postcodeNums[i] = 32;
}
// Input characters lower than 27 (NUL - SUB) in postal code are interpreted as capital
// letters in Code Set A (e.g. LF becomes 'J')
}
int[] primary = new int[10];
primary[0] = ((postcodeNums[5] & 0x03) << 4) | 3;
primary[1] = ((postcodeNums[4] & 0x03) << 4) | ((postcodeNums[5] & 0x3c) >> 2);
primary[2] = ((postcodeNums[3] & 0x03) << 4) | ((postcodeNums[4] & 0x3c) >> 2);
primary[3] = ((postcodeNums[2] & 0x03) << 4) | ((postcodeNums[3] & 0x3c) >> 2);
primary[4] = ((postcodeNums[1] & 0x03) << 4) | ((postcodeNums[2] & 0x3c) >> 2);
primary[5] = ((postcodeNums[0] & 0x03) << 4) | ((postcodeNums[1] & 0x3c) >> 2);
primary[6] = ((postcodeNums[0] & 0x3c) >> 2) | ((country & 0x3) << 4);
primary[7] = (country & 0xfc) >> 2;
primary[8] = ((country & 0x300) >> 8) | ((service & 0xf) << 2);
primary[9] = ((service & 0x3f0) >> 4);
return primary;
} | [
"Returns the primary message codewords for mode 3.\n\n@param postcode the postal code\n@param country the country code\n@param service the service code\n@return the primary message, as codewords"
] | [
"Fluent API builder.\n\n@param cronExpression\n@return",
"Cancel old waiting jobs.\n\n@param starttimeThreshold threshold for start time\n@param checkTimeThreshold threshold for last check time\n@param message the error message",
"Use this API to delete nsacl6 of given name.",
"Builds the path for an open arc based on a PolylineOptions.\n\n@param center\n@param start\n@param end\n@return PolylineOptions with the paths element populated.",
"Label accessor provided for JSON serialization only.",
"Shortcut for mapping an arbitrary observable to void, using the IO scheduler.\n@param fromObservable the source observable\n@return a void-emitting observable",
"Creates the final artifact name.\n\n@return the artifact name",
"Destroys all resource requests in requestQueue.\n\n@param requestQueue The queue for which all resource requests are to be\ndestroyed.",
"Prints dependencies recovered from the methods of a class. A\ndependency is inferred only if another relation between the two\nclasses is not already in the graph.\n@param classes"
] |
public static Integer convertPathIdentifier(String identifier, Integer profileId) throws Exception {
Integer pathId = -1;
try {
pathId = Integer.parseInt(identifier);
} catch (NumberFormatException ne) {
// this is OK.. just means it's not a #
if (profileId == null)
throw new Exception("A profileId must be specified");
pathId = PathOverrideService.getInstance().getPathId(identifier, profileId);
}
return pathId;
} | [
"Obtain the path ID for a profile\n\n@param identifier Can be the path ID, or friendly name\n@param profileId\n@return\n@throws Exception"
] | [
"Read custom fields for a GanttProject resource.\n\n@param gpResource GanttProject resource\n@param mpxjResource MPXJ Resource instance",
"Set the content type of a photo.\n\nThis method requires authentication with 'write' permission.\n\n@see com.flickr4java.flickr.Flickr#CONTENTTYPE_PHOTO\n@see com.flickr4java.flickr.Flickr#CONTENTTYPE_SCREENSHOT\n@see com.flickr4java.flickr.Flickr#CONTENTTYPE_OTHER\n@param photoId\nThe photo ID\n@param contentType\nThe contentType to set\n@throws FlickrException",
"Performs a matrix inversion operations that takes advantage of the special\nproperties of a covariance matrix.\n\n@param cov A covariance matrix. Not modified.\n@param cov_inv The inverse of cov. Modified.\n@return true if it could invert the matrix false if it could not.",
"Use this API to unset the properties of csparameter resource.\nProperties that need to be unset are specified in args array.",
"Change the currentState to the nextState if possible. The next state should already be\npresent in the graph.\n\n@param nextState the next state.\n@return true if currentState is successfully changed.",
"Throws an exception or logs a message\n\n@param message The message for the exception or the log message. Must be internationalized",
"Add the string representation of the given object to this sequence at the given index. The given indentation will\nbe prepended to each line except the first one if the object has a multi-line string representation.\n\n@param object\nthe to-be-appended object.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.\n@param index\nthe index in the list of segments.",
"Parses the field facet configurations.\n@param fieldFacetObject The JSON sub-node with the field facet configurations.\n@return The field facet configurations.",
"Logic for timestamp\n@param time Epoch date of creation\n@return String timestamp"
] |
public static sslservice get(nitro_service service, String servicename) throws Exception{
sslservice obj = new sslservice();
obj.set_servicename(servicename);
sslservice response = (sslservice) obj.get_resource(service);
return response;
} | [
"Use this API to fetch sslservice resource of given name ."
] | [
"Used to retrieve the watermark for the item.\nIf the item does not have a watermark applied to it, a 404 Not Found will be returned by API.\n@param itemUrl url template for the item.\n@param fields the fields to retrieve.\n@return the watermark associated with the item.",
"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",
"Creates a new child folder inside this folder.\n\n@param name the new folder's name.\n@return the created folder's info.",
"Execute all recorded tasks.\n\n@param context the patch context\n@param callback the finalization callback\n@throws Exception",
"Update the repeat number for a client path\n\n@param newNum new repeat number of the path\n@param path_id ID of the path\n@param client_uuid UUID of the client\n@throws Exception exception",
"Returns the value stored for the given key at the point of call.\n@param key a non null key\n@return the value stored in the map for the given key",
"Called when the layout is applied to the data\n@param container WidgetContainer to access the org.gearvrf.org.gearvrf.widgetlib in the layout\n@param viewPortSize View port for data set",
"Verify that the given channels are all valid.\n\n@param channels\nthe given channels",
"Returns the value of the identified field as a Float.\n@param fieldName the name of the field\n@return the value of the field as a Float\n@throws FqlException if the field cannot be expressed as an Float"
] |
private static boolean isDisabledHandler(final LogContext logContext, final String handlerName) {
final Map<String, String> disableHandlers = logContext.getAttachment(CommonAttributes.ROOT_LOGGER_NAME, DISABLED_HANDLERS_KEY);
return disableHandlers != null && disableHandlers.containsKey(handlerName);
} | [
"Checks to see if a handler is disabled\n\n@param handlerName the name of the handler to enable."
] | [
"Checks the preconditions for creating a new LMinMax processor.\n\n@param min\nthe minimum value (inclusive)\n@param max\nthe maximum value (inclusive)\n@throws IllegalArgumentException\nif {@code max < min}",
"Used to ensure that the general footer label will be at the same Y position as the variables in the band.\n@param band\n@return",
"Processes the template for all indices of the current table.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException if an error occurs\[email protected] type=\"block\"\[email protected] name=\"unique\" optional=\"true\" description=\"Whether to process the unique indices or not\"\nvalues=\"true,false\"",
"Returns the number of rows within this association.\n\n@return the number of rows within this association",
"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",
"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.",
"Add assignments to the tree.\n\n@param parentNode parent tree node\n@param file assignments container",
"Create the log if it does not exist or return back exist log\n\n@param topic the topic name\n@param partition the partition id\n@return read or create a log\n@throws IOException any IOException",
"Bulk delete clients from a profile.\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@return returns the table of the remaining clients or an exception if deletion failed for some reason\n@throws Exception"
] |
public void writeOutput(DataPipe cr) {
String[] nextLine = new String[cr.getDataMap().entrySet().size()];
int count = 0;
for (Map.Entry<String, String> entry : cr.getDataMap().entrySet()) {
nextLine[count] = entry.getValue();
count++;
}
csvFile.writeNext(nextLine);
} | [
"Prints one line to the csv file\n\n@param cr data pipe with search results"
] | [
"Calculate delta with another vector\n@param v another vector\n@return delta vector",
"Return the version string of this instance of finmath-lib.\n\n@return The version string of this instance of finmath-lib.",
"Calculated the numeraire relative value of an underlying swap leg.\n\n@param model The Monte Carlo model.\n@param legSchedule The schedule of the leg.\n@param paysFloat If true a floating rate is payed.\n@param swaprate The swaprate. May be 0.0 for pure floating leg.\n@param notional The notional.\n@return The sum of the numeraire relative cash flows.\n@throws CalculationException Thrown if underlying model failed to calculate stochastic process.",
"Attempt to resolve the given expression string, recursing if resolution of one string produces\nanother expression.\n\n@param expressionString the expression string from a node of {@link ModelType#EXPRESSION}\n@param ignoreDMRResolutionFailure {@code false} if {@link org.jboss.dmr.ModelNode#resolve() basic DMR resolution}\nfailures should be ignored, and {@code new ModelNode(expressionType.asString())} returned\n@param initial {@code true} if this call originated outside this method; {@code false} if it is a recursive call\n\n@return a node of {@link ModelType#STRING} where the encapsulated string is the resolved expression, or a node\nof {@link ModelType#EXPRESSION} if {@code ignoreDMRResolutionFailure} and {@code initial} are\n{@code true} and the string could not be resolved.\n\n@throws OperationFailedException if the expression cannot be resolved",
"Calculated the numeraire relative value of an underlying swap leg.\n\n@param model The Monte Carlo model.\n@param legSchedule The schedule of the leg.\n@param paysFloat If true a floating rate is payed.\n@param swaprate The swaprate. May be 0.0 for pure floating leg.\n@param notional The notional.\n@return The sum of the numeraire relative cash flows.\n@throws CalculationException Thrown if underlying model failed to calculate stochastic process.",
"Find and unmarshal all test suite files in given directories.\n\n@throws IOException if any occurs.\n@see #unmarshal(File)",
"Shut down the input manager.\n\nAfter this call, GearVRf will not be able to access IO devices.",
"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",
"Sets the value of a UDF.\n\n@param udf user defined field\n@param dataType MPXJ data type\n@param value field value"
] |
public static List<String> splitAsList(String text, String delimiter) {
List<String> answer = new ArrayList<String>();
if (text != null && text.length() > 0) {
answer.addAll(Arrays.asList(text.split(delimiter)));
}
return answer;
} | [
"splits a string into a list of strings, ignoring the empty string"
] | [
"Retrieves a vertex attribute as an integer 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>int</i>\n@see #setIntArray(String, int[])\n@see #getIntVec(String)",
"Sets the values of this vector to those of v1.\n\n@param v1\nvector whose values are copied",
"Create a MfClientHttpRequestFactory for adding the specified headers.\n\n@param requestFactory the basic request factory. It should be unmodified and just wrapped with\na proxy class.\n@param matchers The matchers.\n@param headers The headers.\n@return",
"The MapReduce framework should operate sequentially, so thread safety shouldn't be a problem.",
"Converts a submatrix into an extract matrix operation.\n@param variableTarget The variable in which the submatrix is extracted from",
"Reads the bundle descriptor, sets m_desc and m_descContent.\n@throws CmsXmlException thrown when unmarshalling fails.\n@throws CmsException thrown when reading the resource fails or several bundle descriptors for the bundle exist.",
"Returns a single item from the Iterator.\nIf there's none, returns null.\nIf there are more, throws an IllegalStateException.\n\n@throws IllegalStateException",
"Returns the result of a stored procedure executed on the backend.\n\n@param embeddedCacheManager embedded cache manager\n@param storedProcedureName name of stored procedure\n@param queryParameters parameters passed for this query\n@param classLoaderService the class loader service\n\n@return a {@link ClosableIterator} with the result of the query",
"Picks out a File from `thriftFiles` corresponding to a given artifact ID\nand file name. Returns null if `artifactId` and `fileName` do not map to a\nthrift file path.\n\n@parameter artifactId The artifact ID of which to look up the path\n@parameter fileName the name of the thrift file for which to extract a path\n@parameter thriftFiles The set of Thrift files in which to lookup the\nartifact ID.\n@return The path of the directory containing Thrift files for the given\nartifact ID. null if artifact ID not found."
] |
public void setColorInterpolated(int index, int firstIndex, int lastIndex, int color) {
int firstColor = map[firstIndex];
int lastColor = map[lastIndex];
for (int i = firstIndex; i <= index; i++)
map[i] = ImageMath.mixColors((float)(i-firstIndex)/(index-firstIndex), firstColor, color);
for (int i = index; i < lastIndex; i++)
map[i] = ImageMath.mixColors((float)(i-index)/(lastIndex-index), color, lastColor);
} | [
"Set the color at \"index\" to \"color\". Entries are interpolated linearly from\nthe existing entries at \"firstIndex\" and \"lastIndex\" to the new entry.\nfirstIndex < index < lastIndex must hold.\n@param index the position to set\n@param firstIndex the position of the first color from which to interpolate\n@param lastIndex the position of the second color from which to interpolate\n@param color the color to set"
] | [
"Use this API to fetch sslciphersuite resource of given name .",
"Read resource baseline values.\n\n@param row result set row",
"Determines run length for each 'initial' partition ID. Note that a\ncontiguous run may \"wrap around\" the end of the ring.\n\n@param cluster\n@param zoneId\n@return map of initial partition Id to length of contiguous run of\npartition IDs within the same zone..",
"Read a single weekday from the provided JSON value.\n@param val the value to read the week day from.\n@return the week day read\n@throws IllegalArgumentException thrown if the provided JSON value is not the representation of a week day.",
"Creates a window visually showing the matrix's state. Block means an element is zero.\nRed positive and blue negative. More intense the color larger the element's absolute value\nis.\n\n@param A A matrix.\n@param title Name of the window.",
"replaces the old with the new item. The new item will not be added when the old one is not\nfound.\n\n@param oldObject will be removed\n@param newObject is added only when hte old item is removed",
"Creates an immutable list that consists of the elements in the given array. A copy of the given array is used which means\nthat any modifications to the given array will not affect the immutable list.\n\n@param elements the given array of elements\n@return an immutable list",
"Returns an entry of kind snippet with the given proposal and label and the prefix from the context, or null if the proposal is not valid.\n@since 2.16",
"Deserialize a javascript design document file to a DesignDocument object.\n\n@param file the design document javascript file (UTF-8 encoded)\n@return {@link DesignDocument}\n@throws FileNotFoundException if the file does not exist or cannot be read"
] |
private static boolean isAssignableFrom(WildcardType type1, Type type2) {
if (!isAssignableFrom(type1.getUpperBounds()[0], type2)) {
return false;
}
if (type1.getLowerBounds().length > 0 && !isAssignableFrom(type2, type1.getLowerBounds()[0])) {
return false;
}
return true;
} | [
"This logic is shared for all actual types i.e. raw types, parameterized types and generic array types."
] | [
"Append the given item to the end of the list\n@param segment segment to append",
"Reads entries from transforms.xml.\n\n@param file the XML file\n@return the transform entries read from the file\n\n@throws Exception if something goes wrong",
"Compute Cholesky decomposition of A\n\n@param A symmetric, positive definite matrix (only upper half is used)\n@return upper triangular matrix U such that A = U' * U",
"Creates builder for passed path element\n\n@param elementName name of xml element that is used as decorator\n@return PersistentResourceXMLBuilder\n@deprecated decorator element support is currently considered as preview\n@since 4.0",
"Specify a specific index to run the query against\n\n@param designDocument set the design document to use\n@param indexName set the index name to use\n@return this to set additional options",
"Utility function that checks if store names are valid on a node.\n\n@param adminClient An instance of AdminClient points to given cluster\n@param nodeId Node id to fetch stores from\n@param storeNames Store names to check",
"Creates an appropriate HSGE for a domain-wide resource of a type that is mappable to server groups",
"Use this API to fetch appfwjsoncontenttype resources of given names .",
"Carry out any post-processing required to tidy up\nthe data read from the database."
] |
private List<Entity> runQuery(Query query) throws DatastoreException {
RunQueryRequest.Builder request = RunQueryRequest.newBuilder();
request.setQuery(query);
RunQueryResponse response = datastore.runQuery(request.build());
if (response.getBatch().getMoreResults() == QueryResultBatch.MoreResultsType.NOT_FINISHED) {
System.err.println("WARNING: partial results\n");
}
List<EntityResult> results = response.getBatch().getEntityResultsList();
List<Entity> entities = new ArrayList<Entity>(results.size());
for (EntityResult result : results) {
entities.add(result.getEntity());
}
return entities;
} | [
"Run a query on the datastore.\n\n@return The entities returned by the query.\n@throws DatastoreException on error"
] | [
"2-D Forward Discrete Hartley Transform.\n\n@param data Data.",
"Returns true if the query result has at least one row.",
"Returns a File object whose path is the expected user directory.\nDoes not create or check for existence.\n@param prefix\n@param suffix\n@param parent\n@return",
"Build the query to perform a batched read get orderBy settings from CollectionDescriptor\n\n@param ids Collection containing all identities of objects of the ONE side",
"Returns the collection definition of the given name if it exists.\n\n@param name The name of the collection\n@return The collection definition or <code>null</code> if there is no such collection",
"Remove pairs with the given keys from the map.\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 keysToRemove the keys of the pairs to remove.\n@since 2.15",
"Returns the context the view is running in, through which it can\naccess the current theme, resources, etc.\n\n@return The view's Context.",
"Initializes custom prefix for all junit4 properties. This must be consistent\nacross all junit4 invocations if done from the same classpath. Use only when REALLY needed.",
"Use this API to fetch all the route6 resources that are configured on netscaler."
] |
public static Color cueColor(CueList.Entry entry) {
if (entry.hotCueNumber > 0) {
return Color.GREEN;
}
if (entry.isLoop) {
return Color.ORANGE;
}
return Color.RED;
} | [
"Determine the color to use to draw a cue list entry. Hot cues are green, ordinary memory points are red,\nand loops are orange.\n\n@param entry the entry being drawn\n\n@return the color with which it should be represented."
] | [
"Converts a vector from eigen space into sample space.\n\n@param eigenData Eigen space data.\n@return Sample space projection.",
"The file we are working with has a byte order mark. Skip this and try again to read the file.\n\n@param stream schedule data\n@param length length of the byte order mark\n@param charset charset indicated by byte order mark\n@return ProjectFile instance",
"Use this API to add ntpserver resources.",
"Access an attribute, hereby using the class name as key.\n\n@param type the type, not {@code null}\n@return the type attribute value, or {@code null}.",
"Parses an RgbaColor from a hexadecimal, rgb, rgba, hsl, or hsla\nvalue.\n\n@return returns the parsed color",
"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",
"Launch Navigation Service residing in the navigation module",
"returns a dynamic Proxy that implements all interfaces of the\nclass described by this ClassDescriptor.\n\n@return Class the dynamically created proxy class",
"Perform a post-boot scan to remove any deployments added during boot that failed to deploy properly.\nThis method isn't private solely to allow a unit test in the same package to call it."
] |
public void addGroupBy(String[] fieldNames)
{
for (int i = 0; i < fieldNames.length; i++)
{
addGroupBy(fieldNames[i]);
}
} | [
"Adds an array of groupby fieldNames for ReportQueries.\n@param fieldNames The groupby to set\n@deprecated use QueryByCriteria#addGroupBy"
] | [
"Adds a string reference, a class reference, a method type, a module\nor a package to the constant pool of the class being build.\nDoes nothing if the constant pool already contains a similar item.\n\n@param type\na type among STR, CLASS, MTYPE, MODULE or PACKAGE\n@param value\nstring value of the reference.\n@return a new or already existing reference item.",
"Use this API to fetch netbridge_vlan_binding resources of given name .",
"This is a temporary measure until we have a type-safe solution for\nretrieving serializers from a SerializerFactory. It avoids warnings all\nover the codebase while making it easy to verify who calls it.",
"This method is called to format a units value.\n\n@param value numeric value\n@return currency value",
"Find any standard methods the user has 'underridden' in their type.",
"Return the profileId for a path\n\n@param path_id ID of path\n@return ID of profile\n@throws Exception exception",
"Configure column aliases.",
"Evalutes AND and OR operators.\n\n@param container data context\n@param promptValues responses to prompts\n@return operator result",
"Add a Comparator to the end of the chain using the provided sort order.\n@param comparator the Comparator to add to the end of the chain\n@param ascending the sort order: ascending (true) or descending (false)"
] |
public static void validate(final Organization organization) {
if(organization.getName() == null ||
organization.getName().isEmpty()){
throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
.entity("Organization name cannot be null or empty!")
.build());
}
} | [
"Checks if the provided organization is valid and could be stored into the database\n\n@param organization Organization\n@throws WebApplicationException if the data is corrupted"
] | [
"High-accuracy Normal cumulative distribution function.\n\n@param x Value.\n@return Result.",
"Sends the collected dependencies over to the master and record them.",
"Extract site path, base name and locale from the resource opened with the editor.",
"Converts a vector into a quaternion.\nUsed for the direction of spot and directional lights\nCalled upon initialization and updates to those vectors\n\n@param d",
"Gets a tokenizer from a reader.",
"Post a module to the server\n\n@param module\n@param user\n@param password\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Return the filesystem path needed to mount the NFS filesystem associated with a particular media slot.\n\n@param slot the slot whose filesystem is desired\n\n@return the path to use in the NFS mount request to access the files mounted in that slot\n\n@throws IllegalArgumentException if it is a slot that we don't know how to handle",
"Lift a Java Func3 to a Scala Function3\n\n@param f the function to lift\n\n@returns the Scala function",
"Use this API to fetch all the systemuser resources that are configured on netscaler."
] |
@SuppressWarnings("unchecked")
public <T> T getOptionValue(String name)
{
return (T) configurationOptions.get(name);
} | [
"Returns the configuration value with the specified name."
] | [
"Method to be implemented by the RendererBuilder subtypes. In this method the library user will\ndefine the mapping between content and renderer class.\n\n@param content used to map object to Renderers.\n@return the class associated to the renderer.",
"Retrieve and validate vector clock value from the REST request.\n\"X_VOLD_VECTOR_CLOCK\" is the vector clock header.\n\n@return true if present, false if missing",
"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.",
"read broker info for watching topics\n\n@param zkClient the zookeeper client\n@param topics topic names\n@return topic->(brokerid-0,brokerid-1...brokerid2-0,brokerid2-1...)",
"Gets the progress from response.\n\n@param myResponse\nthe my response\n@return the progress from response",
"Use this API to unset the properties of nslimitselector resources.\nProperties that need to be unset are specified in args array.",
"Add the given string to this sequence. The given indentation will be prepended to\neach line except the first one if the object has a multi-line string representation.\n\n@param str\nthe appended string.\n@param indentation\nthe indentation string that should be prepended. May not be <code>null</code>.\n@since 2.11",
"A tie-in for subclasses such as AdaGrad.",
"Gets an element of the matrix.\n\n@param row\nthe row\n@param col\nthe column\n@return the element at the given position"
] |
private Map<Integer, Integer> getNodeIdToPrimaryCount(Cluster cluster) {
Map<Integer, Integer> nodeIdToPrimaryCount = Maps.newHashMap();
for(Node node: cluster.getNodes()) {
nodeIdToPrimaryCount.put(node.getId(), node.getPartitionIds().size());
}
return nodeIdToPrimaryCount;
} | [
"Go through all nodes and determine how many partition Ids each node\nhosts.\n\n@param cluster\n@return map of nodeId to number of primary partitions hosted on node."
] | [
"Add a calendar node.\n\n@param parentNode parent node\n@param calendar calendar",
"Write the patch.xml\n\n@param rollbackPatch the patch\n@param file the target file\n@throws IOException",
"Create and get actor system.\n\n@return the actor system",
"Add a calendar day node.\n\n@param parentNode parent node\n@param calendar ProjectCalendar instance\n@param day calendar day",
"Print a resource UID.\n\n@param value resource UID value\n@return resource UID string",
"Joins the given ranges into the fewest number of ranges.\nIf no joining can take place, the original array is returned.\n\n@param ranges\n@return",
"Adjust submatrices and helper data structures for the input matrix. Must be called\nbefore the decomposition can be computed.\n\n@param orig",
"Creates a new Box Developer Edition connection with enterprise token leveraging an access token cache.\n@param enterpriseId the enterprise ID to use for requesting access token.\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.",
"Sets the path name for this ID\n\n@param pathId ID of path\n@param pathName Name of path"
] |
public static <E> void registerTypeConverter(Class<E> cls, TypeConverter<E> converter) {
TYPE_CONVERTERS.put(cls, converter);
} | [
"Register a new TypeConverter for parsing and serialization.\n\n@param cls The class for which the TypeConverter should be used.\n@param converter The TypeConverter"
] | [
"This method extracts task data from an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Removes a node meta data entry.\n\n@param key - the meta data key\n@throws GroovyBugError if the key is null",
"A static method that provides an easy way to create a list of a\ncertain parametric type.\nThis static constructor works better with generics.\n\n@param list The list to pad\n@param padding The padding element (may be null)\n@return The padded list",
"Use this API to delete sslfipskey resources of given names.",
"Returns the user records for all users in the specified workspace or\norganization.\n\n@param workspace The workspace in which to get users.\n@return Request object",
"Get all categories\nGet all tags marked as categories\n@return ApiResponse<TagsEnvelope>\n@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body",
"Returns details of a previously-requested Organization export.\n\n@param organizationExport Globally unique identifier for the Organization export.\n@return Request object",
"Use this API to fetch lbmonitor_binding resources of given names .",
"Handles the response of the getVersion request.\n@param incomingMessage the response message to process."
] |
public static void ensureXPathNotNull(Node node, String expression) {
if (node == null) {
throw LOG.unableToFindXPathExpression(expression);
}
} | [
"Ensure that the node is not null.\n\n@param node the node to ensure to be not null\n@param expression the expression was used to find the node\n@throws SpinXPathException if the node is null"
] | [
"Returns the filename of the resource with extension.\n\n@return Filename of the GVRAndroidResource. May return null if the\nresource is not associated with any file",
"Updates the database. Never call this during normal operations, upgrade is a user-controlled operation.",
"Compares the two comma-separated lists.\n\n@param list1 The first list\n@param list2 The second list\n@return <code>true</code> if the lists are equal",
"Return a product descriptor for a specific strike.\n\n@param referenceDate The reference date (translating the maturity floating point date to dates.\n@param index The index corresponding to the strike grid.\n@return a product descriptor for a specific strike.\n@throws ArrayIndexOutOfBoundsException Thrown if index is out of bound.",
"Enter information into the hidden input field.\n\n@param input The input to enter into the hidden field.",
"Converts from partitionId to nodeId. The list of partition IDs,\npartitionIds, is expected to be a \"replicating partition list\", i.e., the\nmapping from partition ID to node ID should be one to one.\n\n@param partitionIds List of partition IDs for which to find the Node ID\nfor the Node that owns the partition.\n@return List of node ids, one for each partition ID in partitionIds\n@throws VoldemortException If multiple partition IDs in partitionIds map\nto the same Node ID.",
"Shut down the input manager.\n\nAfter this call, GearVRf will not be able to access IO devices.",
"Returns new instance of OptionalValue with given value\n@param value wrapped object\n@param <T> type of the wrapped object\n@return given object wrapped in OptionalValue",
"Get a property as a json array or throw exception.\n\n@param key the property name"
] |
public static int getPrecedence( int type, boolean throwIfInvalid ) {
switch( type ) {
case LEFT_PARENTHESIS:
return 0;
case EQUAL:
case PLUS_EQUAL:
case MINUS_EQUAL:
case MULTIPLY_EQUAL:
case DIVIDE_EQUAL:
case INTDIV_EQUAL:
case MOD_EQUAL:
case POWER_EQUAL:
case LOGICAL_OR_EQUAL:
case LOGICAL_AND_EQUAL:
case LEFT_SHIFT_EQUAL:
case RIGHT_SHIFT_EQUAL:
case RIGHT_SHIFT_UNSIGNED_EQUAL:
case BITWISE_OR_EQUAL:
case BITWISE_AND_EQUAL:
case BITWISE_XOR_EQUAL:
return 5;
case QUESTION:
return 10;
case LOGICAL_OR:
return 15;
case LOGICAL_AND:
return 20;
case BITWISE_OR:
case BITWISE_AND:
case BITWISE_XOR:
return 22;
case COMPARE_IDENTICAL:
case COMPARE_NOT_IDENTICAL:
return 24;
case COMPARE_NOT_EQUAL:
case COMPARE_EQUAL:
case COMPARE_LESS_THAN:
case COMPARE_LESS_THAN_EQUAL:
case COMPARE_GREATER_THAN:
case COMPARE_GREATER_THAN_EQUAL:
case COMPARE_TO:
case FIND_REGEX:
case MATCH_REGEX:
case KEYWORD_INSTANCEOF:
return 25;
case DOT_DOT:
case DOT_DOT_DOT:
return 30;
case LEFT_SHIFT:
case RIGHT_SHIFT:
case RIGHT_SHIFT_UNSIGNED:
return 35;
case PLUS:
case MINUS:
return 40;
case MULTIPLY:
case DIVIDE:
case INTDIV:
case MOD:
return 45;
case NOT:
case REGEX_PATTERN:
return 50;
case SYNTH_CAST:
return 55;
case PLUS_PLUS:
case MINUS_MINUS:
case PREFIX_PLUS_PLUS:
case PREFIX_MINUS_MINUS:
case POSTFIX_PLUS_PLUS:
case POSTFIX_MINUS_MINUS:
return 65;
case PREFIX_PLUS:
case PREFIX_MINUS:
return 70;
case POWER:
return 72;
case SYNTH_METHOD:
case LEFT_SQUARE_BRACKET:
return 75;
case DOT:
case NAVIGATE:
return 80;
case KEYWORD_NEW:
return 85;
}
if( throwIfInvalid ) {
throw new GroovyBugError( "precedence requested for non-operator" );
}
return -1;
} | [
"Returns the precedence of the specified operator. Non-operator's will\nreceive -1 or a GroovyBugError, depending on your preference."
] | [
"Adopts an xml dom element to the owner document of this element if necessary.\n\n@param elementToAdopt the element to adopt",
"Process calendar hours and exception data from the database.\n\n@param calendars all calendars for the project",
"Converts a sequence of unicode code points to a sequence of Java characters.\n\n@return the number of chars written to the destination buffer",
"Set a custom response for this path\n\n@param pathName name of path\n@param customResponse value of custom response\n@return true if success, false otherwise\n@throws Exception exception",
"Creates a non-binary text media type with the given subtype and a specified encoding",
"Create a new GP entry in the database. No commit performed.",
"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",
"Load model from file\n\n@param gvrContext Valid {@link GVRContext} instance\n@param modelFile Path to the model's file, relative to the {@code assets} directory\n@return root object The root {@link GVRSceneObject} of the model\n@throws IOException If reading the model file fails",
"Adds a tag to a task. Returns an empty data block.\n\n@param task The task to add a tag to.\n@return Request object"
] |
public String getOuterMostNullEmbeddableIfAny(String column) {
String[] path = column.split( "\\." );
if ( !isEmbeddableColumn( path ) ) {
return null;
}
// the cached value may be null hence the explicit key lookup
if ( columnToOuterMostNullEmbeddableCache.containsKey( column ) ) {
return columnToOuterMostNullEmbeddableCache.get( column );
}
return determineAndCacheOuterMostNullEmbeddable( column, path );
} | [
"Should only called on a column that is being set to null.\n\nReturns the most outer embeddable containing {@code column} that is entirely null.\nReturn null otherwise i.e. not embeddable.\n\nThe implementation lazily compute the embeddable state and caches it.\nThe idea behind the lazy computation is that only some columns will be set to null\nand only in some situations.\nThe idea behind caching is that an embeddable contains several columns, no need to recompute its state."
] | [
"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.",
"Answer a List of InCriteria based on values, each InCriteria\ncontains only inLimit values\n@param attribute\n@param values\n@param negative\n@param inLimit the maximum number of values for IN (-1 for no limit)\n@return List of InCriteria",
"Sets the action label to be displayed, if any. Note that if this is not set, the action\nbutton will not be displayed\n\n@param actionButtonLabel\n@return",
"Send a device found announcement to all registered listeners.\n\n@param announcement the message announcing the new device",
"Creates a solver for symmetric positive definite matrices.\n\n@return A new solver for symmetric positive definite matrices.",
"Removes all commas from the token list",
"Creates a new GridLines instance.\n\n@param data data block\n@param offset offset into data block\n@return new GridLines instance",
"Initializes OJB for the purposes of this task.\n\n@return The metadata manager used by OJB",
"Prepare the options by adding additional information to them.\n@see <a href=\"https://docs.mongodb.com/manual/core/index-ttl/\">TTL Indexes</a>"
] |
@Deprecated
private BufferedImage getImage(String suffix) throws IOException {
StringBuffer buffer = getBaseImageUrl();
buffer.append(suffix);
return _getImage(buffer.toString());
} | [
"Get an image using the specified URL suffix.\n\n@deprecated\n@param suffix\nThe URL suffix, including the .extension\n@return The BufferedImage object\n@throws IOException"
] | [
"Closes the connection to the Z-Wave controller.",
"Function to go through all the store definitions contained in the STORES\ndirectory and\n\n1. Update metadata cache.\n\n2. Update STORES_KEY by stitching together all these keys.\n\n3. Update 'storeNames' list.\n\nThis method is not thread safe. It is expected that the caller of this\nmethod will correctly handle concurrency issues. Currently this is not an\nissue since its invoked by init, put, add and delete store all of which\nuse locks to deal with any concurrency related issues.",
"Reads a single day for a calendar.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day ConceptDraw PROJECT week day",
"Generates the Base64 encoded SHA-1 hash for content available in the stream.\nIt can be used to calculate the hash of a file.\n@param stream the input stream of the file or data.\n@return the Base64 encoded hash string.",
"Creates the node mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param parentLevel\nthe parent level",
"Returns a string representation of the receiver, containing\nthe String representation of each key-value pair, sorted ascending by value.",
"Stores the output from a Frontier into the queue, pausing and waiting if the given queue is too large\n\n@param resultsMap map of String and String representing the output of a Frontier's DFS",
"Use this API to unset the properties of inatparam resource.\nProperties that need to be unset are specified in args array.",
"Clones the cluster by constructing a new one with same name, partition\nlayout, and nodes.\n\n@param cluster\n@return clone of Cluster cluster."
] |
protected void printFeatures(IN wi, Collection<String> features) {
if (flags.printFeatures == null || writtenNum > flags.printFeaturesUpto) {
return;
}
try {
if (cliqueWriter == null) {
cliqueWriter = new PrintWriter(new FileOutputStream("feats" + flags.printFeatures + ".txt"), true);
writtenNum = 0;
}
} catch (Exception ioe) {
throw new RuntimeException(ioe);
}
if (writtenNum >= flags.printFeaturesUpto) {
return;
}
if (wi instanceof CoreLabel) {
cliqueWriter.print(wi.get(TextAnnotation.class) + ' ' + wi.get(PartOfSpeechAnnotation.class) + ' '
+ wi.get(CoreAnnotations.GoldAnswerAnnotation.class) + '\t');
} else {
cliqueWriter.print(wi.get(CoreAnnotations.TextAnnotation.class)
+ wi.get(CoreAnnotations.GoldAnswerAnnotation.class) + '\t');
}
boolean first = true;
for (Object feat : features) {
if (first) {
first = false;
} else {
cliqueWriter.print(" ");
}
cliqueWriter.print(feat);
}
cliqueWriter.println();
writtenNum++;
} | [
"Print the String features generated from a IN"
] | [
"Notifies that multiple content items are inserted.\n\n@param positionStart the position.\n@param itemCount the item count.",
"Performs an inline lower Cholesky decomposition on an inner row-major matrix. Only\nthe lower triangular portion of the matrix is read or written to.\n\n@param T Array containing an inner row-major matrix. Modified.\n@param indexT First index of the inner row-major matrix.\n@param n Number of rows and columns of the matrix.\n@return If the decomposition succeeded.",
"Provides a type-specific Meta class for the given TinyType.\n\n@param <T> the TinyType class type\n@param candidate the TinyType class to obtain a Meta for\n@return a Meta implementation suitable for the candidate\n@throws IllegalArgumentException for null or a non-TinyType",
"Pre API 11, this does an alpha animation.\n\n@param progress",
"Send an error to the client with a message.\n\n@param httpServletResponse the response to send the error to.\n@param message the message to send\n@param code the error code",
"Set the value for a floating point vector of length 4.\n@param key name of uniform to set.\n@param x new X value\n@param y new Y value\n@param z new Z value\n@param w new W value\n@see #getVec4\n@see #getFloatVec(String)",
"Adds a string reference, a class reference, a method type, a module\nor a package to the constant pool of the class being build.\nDoes nothing if the constant pool already contains a similar item.\n\n@param type\na type among STR, CLASS, MTYPE, MODULE or PACKAGE\n@param value\nstring value of the reference.\n@return a new or already existing reference item.",
"make it public for CLI interaction to reuse JobContext",
"Executes the sequence of operations"
] |
public static base_response save(nitro_service client, cacheobject resource) throws Exception {
cacheobject saveresource = new cacheobject();
saveresource.locator = resource.locator;
return saveresource.perform_operation(client,"save");
} | [
"Use this API to save cacheobject."
] | [
"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.",
"Compares two annotated parameters and returns true if they are equal",
"Checks whether this notification is from CleverTap.\n\n@param extras The payload from the GCM intent\n@return See {@link NotificationInfo}",
"Sorts the row indices in ascending order.\n@param sorter (Optional) Used to sort rows. If null a new instance will be declared internally.",
"Builds a batch-fetch capable loader based on the given persister, lock-mode, etc.\n\n@param persister The entity persister\n@param batchSize The maximum number of ids to batch-fetch at once\n@param lockMode The lock mode\n@param factory The SessionFactory\n@param influencers Any influencers that should affect the built query\n@param innerEntityLoaderBuilder Builder of the entity loader receiving the subset of batches\n\n@return The loader.",
"note, this just logs an error and doesn't throw as its only used to remove old configuration files, and shouldn't stop boot",
"Reads, stems, and prints the trees in the file.\n\n@param args Usage: WordStemmer file",
"Creates a resource key for given enumeration value. By convention,\nresource bundle for enumerations has the name of enumeration class\nand value identifier is the same as enumeration value name.\n@param value the enumeration value\n@return the resource key",
"Create a discount curve from given times and given discount factors using default interpolation and extrapolation methods.\n\n@param name The name of this discount curve.\n@param times Array of times as doubles.\n@param givenDiscountFactors Array of corresponding discount factors.\n@return A new discount factor object."
] |
public void initialize(FragmentManager fragmentManager) {
AirMapInterface mapInterface = (AirMapInterface)
fragmentManager.findFragmentById(R.id.map_frame);
if (mapInterface != null) {
initialize(fragmentManager, mapInterface);
} else {
initialize(fragmentManager, new DefaultAirMapViewBuilder(getContext()).builder().build());
}
} | [
"Used for initialization of the underlying map provider.\n\n@param fragmentManager required for initialization"
] | [
"This returns all profiles associated with a server name\n\n@param serverName server Name\n@return profile UUID\n@throws Exception exception",
"Extract name of the resource from a resource ID.\n@param id the resource ID\n@return the name of the resource",
"Convert this lattice to store data in the given convention.\nConversion involving receiver premium assumes zero wide collar.\n\n@param targetConvention The convention to store the data in.\n@param displacement The displacement to use, if applicable.\n@param model The model for context.\n\n@return The converted lattice.",
"Close the ClientRequestExecutor.",
"Constructs the path from FQCN, validates writability, and creates a writer.",
"Set the String-representation of size.\n\nLike: Square, Thumbnail, Small, Medium, Large, Original.\n\n@param label",
"Remove an existing Corporate GroupId from an organization.\n\n@return Response",
"Deserializes a variable, NOT checking whether the datatype is custom\n@param s\n@param variableType\n@return",
"Use this API to update dospolicy resources."
] |
private List<File> getConfigFiles() {
String[] filenames = {
"opencms-modules.xml",
"opencms-system.xml",
"opencms-vfs.xml",
"opencms-importexport.xml",
"opencms-sites.xml",
"opencms-variables.xml",
"opencms-scheduler.xml",
"opencms-workplace.xml",
"opencms-search.xml"};
List<File> result = new ArrayList<>();
for (String fn : filenames) {
File file = new File(m_configDir, fn);
if (file.exists()) {
result.add(file);
}
}
return result;
} | [
"Gets existing config files.\n\n@return the existing config files"
] | [
"Print duration in thousandths of minutes.\n\n@param duration Duration instance\n@return duration in thousandths of minutes",
"Returns the compact task records for all tasks within the given project,\nordered by their priority within the project. Tasks can exist in more than one project at a time.\n\n@param project The project in which to search for tasks.\n@return Request object",
"Retrieve the number of minutes per day for this calendar.\n\n@return minutes per day",
"Build list of style filters from style definitions.\n\n@param styleDefinitions\nlist of style definitions\n@return list of style filters\n@throws GeomajasException",
"called periodically to check that the heartbeat has been received\n\n@return {@code true} if we have received a heartbeat recently",
"Appends a line separator node that will only be effective if the current line contains non-whitespace text.\n\n@return the given parent node",
"Use this API to update callhome.",
"Validates bic.\n\n@param bic to be validated.\n@throws BicFormatException if bic is invalid.\nUnsupportedCountryException if bic's country is not supported.",
"Clears all properties of specified entity.\n\n@param entity to clear."
] |
public int getHistoryCount(int profileId, String clientUUID, HashMap<String, String[]> searchFilter) {
int count = 0;
Statement query = null;
ResultSet results = null;
try (Connection sqlConnection = sqlService.getConnection()) {
String sqlQuery = "SELECT COUNT(" + Constants.GENERIC_ID + ") FROM " + Constants.DB_TABLE_HISTORY + " ";
// see if profileId is set or not (-1)
if (profileId != -1) {
sqlQuery += "WHERE " + Constants.GENERIC_PROFILE_ID + "=" + profileId + " ";
}
if (clientUUID != null && clientUUID.compareTo("") != 0) {
sqlQuery += "AND " + Constants.GENERIC_CLIENT_UUID + "='" + clientUUID + "' ";
}
sqlQuery += ";";
logger.info("Query: {}", sqlQuery);
query = sqlConnection.createStatement();
results = query.executeQuery(sqlQuery);
if (results.next()) {
count = results.getInt(1);
}
query.close();
} catch (Exception e) {
} finally {
try {
if (results != null) {
results.close();
}
} catch (Exception e) {
}
try {
if (query != null) {
query.close();
}
} catch (Exception e) {
}
}
return count;
} | [
"Returns the number of history entries for a client\n\n@param profileId ID of profile\n@param clientUUID UUID of client\n@param searchFilter unused\n@return number of history entries"
] | [
"Fetch flag resource by Country\n\n@param country Country\n@return int of resource | 0 value if not exists",
"compare between two points.",
"Append the text at the end of the File, using a specified encoding.\n\n@param file a File\n@param text the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0",
"Returns the u component of a coordinate from a texture coordinate set.\n\n@param vertex the vertex index\n@param coords the texture coordinate set\n@return the u component",
"Read relation data.",
"Use this API to update nsrpcnode.",
"Merges this with the list of sections to produce the smallest array of sequential block subnets, going from smallest to largest\n\n@param sections the sections to merge with this\n@return",
"Extracts the list of columns from the given field list.\n\n@param fields The fields\n@return The corresponding columns",
"Record the checkout queue length\n\n@param dest Destination of the socket to checkout. Will actually record\nif null. Otherwise will call this on self and corresponding child\nwith this param null.\n@param queueLength The number of entries in the \"synchronous\" checkout\nqueue."
] |
private boolean isEqual(FieldDescriptorDef first, FieldDescriptorDef second)
{
return first.getName().equals(second.getName()) &&
first.getProperty(PropertyHelper.OJB_PROPERTY_COLUMN).equals(second.getProperty(PropertyHelper.OJB_PROPERTY_COLUMN)) &&
first.getProperty(PropertyHelper.OJB_PROPERTY_JDBC_TYPE).equals(second.getProperty(PropertyHelper.OJB_PROPERTY_JDBC_TYPE));
} | [
"Tests whether the two field descriptors are equal, i.e. have same name, same column\nand same jdbc-type.\n\n@param first The first field\n@param second The second field\n@return <code>true</code> if they are equal"
] | [
"Compare an array of bytes with a subsection of a larger array of bytes.\n\n@param lhs small array of bytes\n@param rhs large array of bytes\n@param rhsOffset offset into larger array of bytes\n@return true if a match is found",
"Replace error msg.\n\n@param origMsg\nthe orig msg\n@return the string",
"Performs a get all operation with the specified composite request object\n\n@param requestWrapper Composite request object containing a reference to\nthe Iterable keys\n\n@return Map of the keys to the corresponding versioned values",
"Tests whether a Row name occurs more than once in the list of rows\n@param name\n@return",
"Checks if two claims are equivalent in the sense that they have the same\nmain snak and the same qualifiers, but possibly in a different order.\n\n@param claim1\n@param claim2\n@return true if claims are equivalent",
"Stores a public key mapping.\n@param original\n@param substitute",
"Convenience extension, to generate traced code.",
"Create a temporary directory under a given workspace",
"Unlink the specified reference from this object.\nMore info see OJB doc.\n\n@param obj Object with reference\n@param ord the ObjectReferenceDescriptor of the reference\n@param insert flag signals insert operation"
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.