query
stringlengths 74
6.1k
| positive
sequencelengths 1
1
| negative
sequencelengths 9
9
|
---|---|---|
public Query getPKQuery(Identity oid)
{
Object[] values = oid.getPrimaryKeyValues();
ClassDescriptor cld = pb.getClassDescriptor(oid.getObjectsTopLevelClass());
FieldDescriptor[] fields = cld.getPkFields();
Criteria criteria = new Criteria();
for (int i = 0; i < fields.length; i++)
{
FieldDescriptor fld = fields[i];
criteria.addEqualTo(fld.getAttributeName(), values[i]);
}
return QueryFactory.newQuery(cld.getClassOfObject(), criteria);
} | [
"Answer the primary key query to retrieve an Object\n\n@param oid the Identity of the Object to retrieve\n@return The resulting query"
] | [
"read data from channel to buffer\n\n@param channel readable channel\n@param buffer bytebuffer\n@return read size\n@throws IOException any io exception",
"Adds the given some-value restriction to the list of restrictions that\nshould still be serialized. The given resource will be used as a subject.\n\n@param subject\n@param propertyUri\n@param rangeUri",
"Processes the template for all index descriptors 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\"",
"Calculate the child size along the axis and measure the offset inside the\nlayout container\n@param dataIndex of child in Container\n@return true item fits the container, false - otherwise",
"generate a message for loglevel FATAL\n\n@param pObject the message Object",
"Called when is removed the parent of the scene object.\n\n@param parent Old parent of this scene object.",
"High-accuracy Normal cumulative distribution function.\n\n@param x Value.\n@return Result.",
"Fetches the contents of a file representation with asset path and writes them to the provided output stream.\n@see <a href=https://developer.box.com/reference#section-x-rep-hints-header>X-Rep-Hints Header</a>\n@param representationHint the X-Rep-Hints query for the representation to fetch.\n@param assetPath the path of the asset for representations containing multiple files.\n@param output the output stream to write the contents to.",
"Tells you if the expression is a predefined constant like TRUE or FALSE.\n@param expression\nany expression\n@return\nas described"
] |
public static service_stats get(nitro_service service, String name) throws Exception{
service_stats obj = new service_stats();
obj.set_name(name);
service_stats response = (service_stats) obj.stat_resource(service);
return response;
} | [
"Use this API to fetch statistics of service_stats resource of given name ."
] | [
"Check if a module can be promoted in the Grapes server\n\n@param name\n@param version\n@return a boolean which is true only if the module can be promoted\n@throws GrapesCommunicationException",
"A Maven stub is a Maven Project for which we have found information, but the project has not yet been located\nwithin the input application. If we have found an application of the same GAV within the input app, we should\nfill out this stub instead of creating a new one.",
"Sets the segment reject as a string. This method is for convenience\nto be able to set percent reject type just by calling with '3%' and\notherwise it uses rows. All this assuming that parsing finds '%' characher\nand is able to parse a raw reject number.\n\n@param reject the new segment reject",
"Creates a new fixed size ThreadPoolExecutor\n\n@param threads\nthe number of threads\n@param groupname\na label to identify the threadpool; useful for profiling.\n@param queueSize\nthe size of the queue to store Runnables when all threads are busy\n@return the new ExecutorService",
"Generates timephased costs from the assignment's cost value. Used for Cost type Resources.\n\n@return timephased cost",
"Calculate the value of a swaption assuming the Black'76 model.\n\n@param forwardSwaprate The forward (spot)\n@param volatility The Black'76 volatility.\n@param optionMaturity The option maturity.\n@param optionStrike The option strike.\n@param swapAnnuity The swap annuity corresponding to the underlying swap.\n@return Returns the value of a Swaption under the Black'76 model",
"Visits a dependence of the current module.\n\n@param module the qualified name of the dependence.\n@param access the access flag of the dependence among\nACC_TRANSITIVE, ACC_STATIC_PHASE, ACC_SYNTHETIC\nand ACC_MANDATED.\n@param version the module version at compile time or null.",
"Create an object of the given type using a constructor that matches the\nsupplied arguments and invoke the setters with the supplied variables.\n\n@param <T> the object type\n@param clazz\nthe type to create\n@param args\nthe arguments to the constructor\n@param vars\nthe named arguments for setters\n@return a new object of the given type, initialized with the given\narguments\n@throws NoSuchConstructorException\nif there is not a constructor that matches the given\narguments\n@throws AmbiguousConstructorException\nif there is more than one constructor that matches the given\narguments\n@throws ReflectiveOperationException\nif any of the reflective operations throw an exception",
"Webkit based browsers require that we set the webkit-user-drag style\nattribute to make an element draggable."
] |
private void addTraceForFrame(WebSocketFrame frame, String type) {
Map<String, Object> trace = new LinkedHashMap<>();
trace.put("type", type);
trace.put("direction", "in");
if (frame instanceof TextWebSocketFrame) {
trace.put("payload", ((TextWebSocketFrame) frame).text());
}
if (traceEnabled) {
websocketTraceRepository.add(trace);
}
} | [
"add trace information for received frame"
] | [
"Write an int to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The int to write\n@param offset The offset to begin writing at",
"Set the groups assigned to a path\n\n@param groups group IDs to set\n@param pathId ID of path",
"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.",
"Throws an IllegalStateException when the given value is not false.",
"Use this API to fetch vlan resource of given name .",
"Return true if the processor of the node has previously been executed.\n\n@param processorGraphNode the node to test.",
"Get the metadata of all tracks currently loaded in any player, either on the play deck, or in a hot cue.\n\n@return the track information reported by all current players, including any tracks loaded in their hot cue slots\n\n@throws IllegalStateException if the MetadataFinder is not running",
"Start the timer.",
"Sets the Base Calendar field indicates which calendar is the base calendar\nfor a resource calendar. The list includes the three built-in calendars,\nas well as any new base calendars you have created in the Change Working\nTime dialog box.\n\n@param val calendar name"
] |
private AssignmentField selectField(AssignmentField[] fields, int index)
{
if (index < 1 || index > fields.length)
{
throw new IllegalArgumentException(index + " is not a valid field index");
}
return (fields[index - 1]);
} | [
"Maps a field index to an AssignmentField instance.\n\n@param fields array of fields used as the basis for the mapping.\n@param index required field index\n@return AssignmnetField instance"
] | [
"Write the table configuration to a buffered writer.",
"Updates an existing enum option. Enum custom fields require at least one enabled enum option.\n\nReturns the full record of the updated enum option.\n\n@param enumOption Globally unique identifier for the enum option.\n@return Request object",
"Logout the current session. After calling this method,\nthe session will be cleared",
"Utility function that copies a string array and add another string to\nfirst\n\n@param arr Original array of strings\n@param add\n@return Copied array of strings",
"Whether the specified JavaBeans property exists on the given type or not.\n\n@param clazz the type of interest\n@param property the JavaBeans property name\n@param elementType the element type to check, must be either {@link ElementType#FIELD} or\n{@link ElementType#METHOD}.\n@return {@code true} if the specified property exists, {@code false} otherwise",
"Parse a string representation of a Boolean value.\n\n@param value string representation\n@return Boolean value",
"Verifies a provided signature.\n\n@param key\nfor which signature key\n@param actualAlgorithm\ncurrent signature algorithm\n@param actualSignature\ncurrent signature\n@param webHookPayload\nfor signing\n@param deliveryTimestamp\nfor signing\n@return true if verification passed",
"Get container for principal.\n\n@param cms cmsobject\n@param list of principals\n@param captionID caption id\n@param descID description id\n@param iconID icon id\n@param ouID ou id\n@param icon icon\n@param iconList iconlist\n@return indexedcontainer",
"Write back to hints file."
] |
public Number getCostVariance()
{
Number variance = (Number) getCachedValue(TaskField.COST_VARIANCE);
if (variance == null)
{
Number cost = getCost();
Number baselineCost = getBaselineCost();
if (cost != null && baselineCost != null)
{
variance = NumberHelper.getDouble(cost.doubleValue() - baselineCost.doubleValue());
set(TaskField.COST_VARIANCE, variance);
}
}
return (variance);
} | [
"The Cost Variance field shows the difference between the baseline cost\nand total cost for a task. The total cost is the current estimate of costs\nbased on actual costs and remaining costs.\n\n@return amount"
] | [
"See if a simple sequence can be used to extract the array. A simple extent is a continuous block from\na min to max index\n\n@return true if it is a simple range or false if not",
"Use this API to unset the properties of clusterinstance resources.\nProperties that need to be unset are specified in args array.",
"Adds tags to the If-Match header.\n\n@param tag the tag to add, may be null. This means the same as adding {@link Tag#ALL}\n@throws IllegalArgumentException if ALL is supplied more than once, or you add a null tag more than once.\n@return a new Conditionals object with the If-Match tag added.",
"Returns the current download state for a download request.\n\n@param downloadId\n@return",
"Utility function that fetches system store definitions\n\n@return The map container that maps store names to store definitions",
"Process this deployment for annotations. This will use an annotation indexer to create an index of all annotations\nfound in this deployment and attach it to the deployment unit context.\n\n@param phaseContext the deployment unit context\n@throws DeploymentUnitProcessingException",
"Gets the end.\n\n@return the end",
"Use this API to change appfwsignatures.",
"Use this API to fetch all the ci resources that are configured on netscaler."
] |
public static <T> Set<T> asSet(T[] o) {
return new HashSet<T>(Arrays.asList(o));
} | [
"Returns a new Set containing all the objects in the specified array."
] | [
"Loops over cluster and repeatedly tries to break up contiguous runs of\npartitions. After each phase of breaking up contiguous partitions, random\npartitions are selected to move between zones to balance the number of\npartitions in each zone. The second phase may re-introduce contiguous\npartition runs in another zone. Therefore, this overall process is\nrepeated multiple times.\n\n@param nextCandidateCluster\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return updated cluster",
"Writes an activity to a PM XML file.\n\n@param mpxj MPXJ Task instance",
"Returns the class of datatype URI that best characterizes the range of\nthe given property based on its datatype.\n\n@param propertyIdValue\nthe property for which to get a range\n@return the range URI or null if the datatype could not be identified.",
"Truncated power function.\n\n@param value Value.\n@param degree Degree.\n@return Result.",
"Use this API to delete systementitydata.",
"An extension point so we can control how the query gets executed.\nThis exists for testing purposes, not because we believe it will\nactually be used for real.",
"If X == null then the solution is written into B. Otherwise the solution is copied\nfrom B into X.",
"Populate the expanded exceptions list based on the main exceptions list.\nWhere we find recurring exception definitions, we generate individual\nexceptions for each recurrence to ensure that we account for them correctly.",
"Main method for testing fetching"
] |
public void setSelectionType(MaterialDatePickerType selectionType) {
this.selectionType = selectionType;
switch (selectionType) {
case MONTH_DAY:
options.selectMonths = true;
break;
case YEAR_MONTH_DAY:
options.selectYears = yearsToDisplay;
options.selectMonths = true;
break;
case YEAR:
options.selectYears = yearsToDisplay;
options.selectMonths = false;
break;
}
} | [
"Set the pickers selection type."
] | [
"Returns true if required properties for FluoAdmin are set",
"Retrieve the frequency of an exception.\n\n@param exception XML calendar exception\n@return frequency",
"Creates the JSON serialized form of the accessory for use over the Homekit Accessory Protocol.\n\n@param instanceId the static id of the accessory.\n@return a future that will complete with the JSON builder for the object.",
"Extracts the column of A and copies it into u while computing the magnitude of the\nlargest element and returning it.\n\n<pre>\nu[ (offsetU+row0+i)*2 ] = A.getReal(row0+i,col)\nu[ (offsetU+row0+i)*2 + 1] = A.getImag(row0+i,col)\n</pre>\n\n@param A Complex matrix\n@param row0 First row in A to be copied\n@param row1 Last row in A + 1 to be copied\n@param col Column in A\n@param u Output array storage\n@param offsetU first index in U\n@return magnitude of largest element",
"Creates and returns a temporary directory for a printing task.",
"Add BoxMetaDataFilter to the JsonArray boxMetadataFilterRequestArray.\n@param @param bmf accepts a filter that has templateKey, scope, and filters populated.\n@return JsonArray that is formated Json request",
"Use this API to enable snmpalarm resources of given names.",
"Convert Day instance to MPX day index.\n\n@param day Day instance\n@return day index",
"Use this API to fetch all the lbvserver resources that are configured on netscaler."
] |
public Collection<HazeltaskTask<GROUP>> call() throws Exception {
try {
if(isShutdownNow)
return this.getDistributedExecutorService().shutdownNowWithHazeltask();
else
this.getDistributedExecutorService().shutdown();
} catch(IllegalStateException e) {}
return Collections.emptyList();
} | [
"I promise that this is always a collection of HazeltaskTasks"
] | [
"Sets the country for which currencies should be requested.\n\n@param countries The ISO countries.\n@return the query for chaining.",
"Iterates through this file line by line, splitting each line using\nthe given regex separator. For each line, the given closure is called with\na single parameter being the list of strings computed by splitting the line\naround matches of the given regular expression.\nFinally the resources used for processing the file are closed.\n\n@param self a File\n@param regex the delimiting regular expression\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 IOGroovyMethods#splitEachLine(java.io.Reader, java.lang.String, groovy.lang.Closure)\n@since 1.5.5",
"First close the connection. Then reply.\n\n@param response\nthe response\n@param error\nthe error\n@param errorMessage\nthe error message\n@param stackTrace\nthe stack trace\n@param statusCode\nthe status code\n@param statusCodeInt\nthe status code int",
"convenience method for setting working or non-working days.\n\n@param day required day\n@param working flag indicating if the day is a working day",
"Given a directory, determine if it contains a multi-file database whose format\nwe can process.\n\n@param directory directory to process\n@return ProjectFile instance if we can process anything, or null",
"Creates a random Hermitian matrix with elements from min to max value.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symmetric matrix.",
"Marks a given list of statements for insertion into the current document.\nInserted statements can have an id if they should update an existing\nstatement, or use an empty string as id if they should be added. The\nmethod removes duplicates and avoids unnecessary modifications by\nchecking the current content of the given document before marking\nstatements for being written.\n\n@param currentDocument\nthe document with the current statements\n@param addStatements\nthe list of new statements to be added",
"Calculate the actual bit length of the proposed binary string.",
"Use this API to fetch statistics of cmppolicylabel_stats resource of given name ."
] |
public ConnectionRepository readConnectionRepository(String fileName)
{
try
{
RepositoryPersistor persistor = new RepositoryPersistor();
return persistor.readConnectionRepository(fileName);
}
catch (Exception e)
{
throw new MetadataException("Can not read repository " + fileName, e);
}
} | [
"Read JdbcConnectionDescriptors from the given repository file.\n\n@see #mergeConnectionRepository"
] | [
"Deletes a story. A user can only delete stories they have created. Returns an empty data record.\n\n@param story Globally unique identifier for the story.\n@return Request object",
"Merge this ExecutionStatistics with all the statistics created within the child threads. All the child threads had to be created using Windup-specific\nThreadFactory in order to contain a reference to the parent thread.",
"Sets the target translator for all cells in the row.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator\n@return this to allow chaining",
"returns a collection of Reader LockEntries for object obj.\nIf no LockEntries could be found an empty Vector is returned.",
"Check the version to assure it is allowed.\n\n@param pluginName plugin name which needs the dependency\n@param dependency dependency which needs to be verified\n@param requestedVersion requested/minimum version\n@param availableVersion available version\n@return version check problem or empty string when all is fine",
"Pause between cluster change in metadata and starting server rebalancing\nwork.",
"Reads a PEP file from the input stream.\n\n@param is input stream representing a PEP file",
"Uses an IdentityMap to make sure we don't recurse infinitely on the same object in a cyclic object model.\nProxies\n@param obj\n@return",
"Can be overridden if you want to replace or supplement the debug handling for responses.\n\n@param responseCode\n@param inputStream"
] |
public static String getParentId(String digest, String host) throws IOException {
DockerClient dockerClient = null;
try {
dockerClient = getDockerClient(host);
return dockerClient.inspectImageCmd(digest).exec().getParent();
} finally {
closeQuietly(dockerClient);
}
} | [
"Get parent digest of an image.\n\n@param digest\n@param host\n@return"
] | [
"Use this API to fetch sslcipher_individualcipher_binding resources of given name .",
"Returns a TypeConverter for a given class.\n\n@param cls The class for which the TypeConverter should be fetched.",
"Counts additional occurrences of a property as the main property of\nstatements.\n\n@param usageStatistics\nstatistics object where count is stored\n@param property\nthe property to count\n@param count\nthe number of times to count the property",
"Renames this folder.\n\n@param newName the new name of the folder.",
"Register the given object under the package name of the object's class\nwith the given type name.\n\nthis method using the platform mbean server as returned by\nManagementFactory.getPlatformMBeanServer()\n\n@param typeName The name of the type to register\n@param obj The object to register as an mbean",
"Returns list of files matches specified regex in specified directories\n\n@param regex to match file names\n@param directories to find\n@return list of files matches specified regex in specified directories",
"Gets the node list from string line seperate or space seperate.\n\n@param listStr\nthe list str\n@param removeDuplicate\nthe remove duplicate\n@return the node list from string line seperate or space seperate",
"Given a BSON document, remove any forbidden fields and return the document. If no changes are\nmade, the original document reference is returned. If changes are made, a cloned copy of the\ndocument with the changes will be returned.\n\n@param document the document from which to remove forbidden fields\n\n@return a BsonDocument without any forbidden fields.",
"Sets the proxy class to be used.\n@param newProxyClass java.lang.Class"
] |
static <T> List<Template> getTemplates(T objectType) {
try {
List<Template> templates = new ArrayList<>();
TEMP_FINDER.findAnnotations(templates, objectType);
return templates;
} catch (Exception e) {
throw new IllegalStateException(e);
}
} | [
"Aggregates a list of templates specified by @Template"
] | [
"Attach a component to this scene object.\n\nEach scene object has a list of components that may\nbe attached to it. Only one component of a particular type\ncan be attached. Components are retrieved based on their type.\n\n@return true if component is attached, false if a component of that class is already attached.\n@param component component to attach.\n@see GVRSceneObject#detachComponent(long)\n@see GVRSceneObject#getComponent(long)",
"Recursively scan the provided path and return a list of all Java packages contained therein.",
"Remove a list of stores from the session\n\nFirst commit all entries for these stores and then cleanup resources\n\n@param storeNameToRemove List of stores to be removed from the current\nstreaming session",
"Map from an activity code value UUID to the actual value itself, and its\nsequence number.\n\n@param storepoint storepoint containing current project data",
"Create the voldemort key and value from the input Avro record by\nextracting the key and value and map it out for each of the responsible\nvoldemort nodes\n\n\nThe output value is the node_id & partition_id of the responsible node\nfollowed by serialized value",
"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}",
"Sets the HTML entity translator for all cells in the table.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param htmlElementTranslator translator\n@return this to allow chaining",
"Ensures that the start and end dates for ranges fit within the\nworking times for a given day.\n\n@param calendar current calendar\n@param list assignment data",
"Create an executable jar to generate the report. Created jar contains only\nallure configuration file."
] |
public static String wordShape(String inStr, int wordShaper, Collection<String> knownLCWords) {
// this first bit is for backwards compatibility with how things were first
// implemented, where the word shaper name encodes whether to useLC.
// If the shaper is in the old compatibility list, then a specified
// list of knownLCwords is ignored
if (knownLCWords != null && dontUseLC(wordShaper)) {
knownLCWords = null;
}
switch (wordShaper) {
case NOWORDSHAPE:
return inStr;
case WORDSHAPEDAN1:
return wordShapeDan1(inStr);
case WORDSHAPECHRIS1:
return wordShapeChris1(inStr);
case WORDSHAPEDAN2:
return wordShapeDan2(inStr, knownLCWords);
case WORDSHAPEDAN2USELC:
return wordShapeDan2(inStr, knownLCWords);
case WORDSHAPEDAN2BIO:
return wordShapeDan2Bio(inStr, knownLCWords);
case WORDSHAPEDAN2BIOUSELC:
return wordShapeDan2Bio(inStr, knownLCWords);
case WORDSHAPEJENNY1:
return wordShapeJenny1(inStr, knownLCWords);
case WORDSHAPEJENNY1USELC:
return wordShapeJenny1(inStr, knownLCWords);
case WORDSHAPECHRIS2:
return wordShapeChris2(inStr, false, knownLCWords);
case WORDSHAPECHRIS2USELC:
return wordShapeChris2(inStr, false, knownLCWords);
case WORDSHAPECHRIS3:
return wordShapeChris2(inStr, true, knownLCWords);
case WORDSHAPECHRIS3USELC:
return wordShapeChris2(inStr, true, knownLCWords);
case WORDSHAPECHRIS4:
return wordShapeChris4(inStr, false, knownLCWords);
case WORDSHAPEDIGITS:
return wordShapeDigits(inStr);
default:
throw new IllegalStateException("Bad WordShapeClassifier");
}
} | [
"Specify the string and the int identifying which word shaper to\nuse and this returns the result of using that wordshaper on the String.\n\n@param inStr String to calculate word shape of\n@param wordShaper Constant for which shaping formula to use\n@param knownLCWords A Collection of known lowercase words, which some shapers use\nto decide the class of capitalized words.\n<i>Note: while this code works with any Collection, you should\nprovide a Set for decent performance.</i> If this parameter is\nnull or empty, then this option is not used (capitalized words\nare treated the same, regardless of whether the lowercased\nversion of the String has been seen).\n@return The wordshape String"
] | [
"Parses all child Shapes recursively and adds them to the correct JSON\nObject\n\n@param childShapes\n@throws org.json.JSONException",
"Replaces the model used to depict the controller in the scene.\n\n@param controllerModel root of hierarchy to use for controller model\n@see #getControllerModel()\n@see #showControllerModel(boolean)",
"Roll the java.util.Date forward or backward.\n\n@param startDate - The start date\n@param period Calendar.YEAR etc\n@param amount - Negative to rollbackwards.",
"Get the QNames of the port components to be declared\nin the namespaces\n\n@return collection of QNames",
"This method is called when the locale of the parent file is updated.\nIt resets the locale specific date attributes to the default values\nfor the new locale.\n\n@param locale new locale",
"Returns all values that can be selected in the widget.\n@param cms the current CMS object\n@param rootPath the root path to the currently edited xml file (sitemap config)\n@param allRemoved flag, indicating if all inheritedly available formatters should be disabled\n@return all values that can be selected in the widget.",
"Use this API to fetch cacheselector resource of given name .",
"Entry point for this example\nUses HDFS ToolRunner to wrap processing of\n\n@param args Command-line arguments for HDFS example",
"Creates the code mappings.\n\n@param mtasTokenIdFactory\nthe mtas token id factory\n@param level\nthe level\n@param stringValue\nthe string value\n@param offsetStart\nthe offset start\n@param offsetEnd\nthe offset end\n@param realOffsetStart\nthe real offset start\n@param realOffsetEnd\nthe real offset end\n@param codePositions\nthe code positions\n@throws IOException\nSignals that an I/O exception has occurred."
] |
protected Integer getCorrectIndex(Integer index) {
Integer size = jsonNode.size();
Integer newIndex = index;
// reverse walking through the array
if(index < 0) {
newIndex = size + index;
}
// the negative index would be greater than the size a second time!
if(newIndex < 0) {
throw LOG.indexOutOfBounds(index, size);
}
// the index is greater as the actual size
if(index > size) {
throw LOG.indexOutOfBounds(index, size);
}
return newIndex;
} | [
"fetch correct array index if index is less than 0\n\nArrayNode will convert all negative integers into 0...\n\n@param index wanted index\n@return {@link Integer} new index"
] | [
"Select the default currency properties from the database.\n\n@param currencyID default currency ID",
"Convert an integer to a RelationType instance.\n\n@param type integer value\n@return RelationType instance",
"gets the profile_name associated with a specific id",
"Get range around median containing specified percentage of values.\n@param values Values.\n@param percent Values percentage around median.\n@return Returns the range which containes specifies percentage of values.",
"Uses getResult to get the final Result and executes it\n\n@throws ConfigurationException\nIf not result can be found with the returned code",
"Add new control at the end of control bar with specified touch listener and resource.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener",
"Get a property of type java.util.Properties or return the default if\nno such property is defined\n@param props properties\n@param name the key\n@param defaultProperties default property if empty\n@return value from the property",
"Gets the index of a ExpandableWrapper within the helper item list based on\nthe index of the ExpandableWrapper.\n\n@param parentPosition The index of the parent in the list of parents\n@return The index of the parent in the merged list of children and parents",
"Extract WOEID after XML loads"
] |
private void setCalendarToLastRelativeDay(Calendar calendar)
{
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
int currentDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
int requiredDayOfWeek = getDayOfWeek().getValue();
int dayOfWeekOffset = 0;
if (currentDayOfWeek > requiredDayOfWeek)
{
dayOfWeekOffset = requiredDayOfWeek - currentDayOfWeek;
}
else
{
if (currentDayOfWeek < requiredDayOfWeek)
{
dayOfWeekOffset = -7 + (requiredDayOfWeek - currentDayOfWeek);
}
}
if (dayOfWeekOffset != 0)
{
calendar.add(Calendar.DAY_OF_YEAR, dayOfWeekOffset);
}
} | [
"Moves a calendar to the last named day of the month.\n\n@param calendar current date"
] | [
"Creates a REST client used to perform Voldemort operations against the\nCoordinator\n\n@param storeName Name of the store to perform the operations on\n@param resolver Custom resolver as specified by the application\n@return",
"test, how many times the group was present in the list of groups.",
"Creates a unique name, suitable for use with Resque.\n\n@return a unique name for this worker",
"Sets a JSON String as a request entity.\n\n@param connnection The request of {@link HttpConnection}\n@param body The JSON String to set.",
"Fires the event.\n\n@param source the event source\n@param date the date\n@param isTyping true if event was caused by user pressing key that may have changed the value",
"This method works as the one above, adding some properties to the message\n\n@param agent_name\nThe id of the agents that receive the message\n@param msgtype\n@param message_content\nThe content of the message\n@param properties\nto be added to the message\n@param connector\nThe connector to get the external access",
"Creates an InputObjectStream and an OutputObjectStream from a Socket, and\npasses them to the closure. The streams will be closed after the closure\nreturns, even if an exception is thrown.\n\n@param socket this Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n@since 1.5.0",
"Use this API to add clusterinstance resources.",
"Randomly generates matrix with the specified number of matrix elements filled with values from min to max.\n\n@param numRows Number of rows\n@param numCols Number of columns\n@param nz_total Total number of non-zero elements in the matrix\n@param min Minimum value\n@param max maximum value\n@param rand Random number generated\n@return Randomly generated matrix"
] |
public void add(Map<String, Object> map) throws SQLException {
if (withinDataSetBatch) {
if (batchData.size() == 0) {
batchKeys = map.keySet();
} else {
if (!map.keySet().equals(batchKeys)) {
throw new IllegalArgumentException("Inconsistent keys found for batch add!");
}
}
batchData.add(map);
return;
}
int answer = executeUpdate(buildListQuery(map), new ArrayList<Object>(map.values()));
if (answer != 1) {
LOG.warning("Should have updated 1 row not " + answer + " when trying to add: " + map);
}
} | [
"Adds the provided map of key-value pairs as a new row in the table represented by this DataSet.\n\n@param map the key (column-name), value pairs to add as a new row\n@throws SQLException if a database error occurs"
] | [
"Gets the message payload.\n\n@param message the message\n@return the payload",
"Transforms an input file into HTML using the given Configuration.\n\n@param file\nThe File to process.\n@param configuration\nthe Configuration\n@return The processed String.\n@throws IOException\nif an IO error occurs\n@since 0.7\n@see Configuration",
"Calculate start dates for a monthly relative recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Calls a method from editService to update the repeat number for a path\n\n@param model\n@param newNum\n@param path_id\n@param clientUUID\n@return\n@throws Exception",
"Resolve the server registry.\n\n@param mgmtVersion the mgmt version\n@param subsystems the subsystems\n@return the transformer registry",
"Plots the MSD curve for trajectory t.\n@param t List of trajectories\n@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds\n@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds",
"Adds a new metadata value of array type.\n@param path the path to the field.\n@param values the collection of values.\n@return the metadata object for chaining.",
"Convert an object to a set of maps.\n\n@param mapper the object mapper\n@param source the source object\n@return set",
"Overridden to skip some symbolizers."
] |
public void setAddContentInfo(final Boolean doAddInfo) {
if ((null != doAddInfo) && doAddInfo.booleanValue() && (null != m_addContentInfoForEntries)) {
m_addContentInfoForEntries = Integer.valueOf(DEFAULT_CONTENTINFO_ROWS);
}
} | [
"Setter for \"addContentInfo\", indicating if content information should be added.\n@param doAddInfo The value of the \"addContentInfo\" attribute of the tag"
] | [
"Commit all changes if there are uncommitted changes.\n\n@param msg the commit message.\n@throws GitAPIException",
"Returns information for a specific client\n\n@param model\n@param profileIdentifier\n@param clientUUID\n@return\n@throws Exception",
"Parse an extended attribute boolean value.\n\n@param value string representation\n@return boolean value",
"Use this API to unset the properties of callhome resource.\nProperties that need to be unset are specified in args array.",
"Set the view frustum to pick against from the given projection matrix.\n\nIf the projection matrix is null, the picker will revert to picking\nobjects that are visible from the viewpoint of the scene's current camera.\nIf a matrix is given, the picker will pick objects that are visible\nfrom the viewpoint of it's owner the given projection matrix.\n\n@param projMatrix 4x4 projection matrix or null\n@see GVRScene#setPickVisible(boolean)",
"Get a collection of methods declared on this object by method name.\n\n@param name the name of the method\n@return the (possibly empty) collection of methods with the given name",
"Use this API to enable the mode on Netscaler.\n@param mode mode to be enabled.\n@return status of the operation performed.\n@throws Exception Nitro exception.",
"Scans a path on the filesystem for resources inside the given classpath location.\n\n@param location The system-independent location on the classpath.\n@param locationUri The system-specific physical location URI.\n@return a sorted set containing all the resources inside the given location\n@throws IOException if an error accessing the filesystem happens",
"Returns the path to java executable."
] |
@Override
public double getDiscountFactor(AnalyticModelInterface model, double maturity)
{
// Change time scale
maturity *= timeScaling;
double beta1 = parameter[0];
double beta2 = parameter[1];
double beta3 = parameter[2];
double beta4 = parameter[3];
double tau1 = parameter[4];
double tau2 = parameter[5];
double x1 = tau1 > 0 ? FastMath.exp(-maturity/tau1) : 0.0;
double x2 = tau2 > 0 ? FastMath.exp(-maturity/tau2) : 0.0;
double y1 = tau1 > 0 ? (maturity > 0.0 ? (1.0-x1)/maturity*tau1 : 1.0) : 0.0;
double y2 = tau2 > 0 ? (maturity > 0.0 ? (1.0-x2)/maturity*tau2 : 1.0) : 0.0;
double zeroRate = beta1 + beta2 * y1 + beta3 * (y1-x1) + beta4 * (y2-x2);
return Math.exp(- zeroRate * maturity);
} | [
"Return the discount factor within a given model context for a given maturity.\n@param model The model used as a context (not required for this class).\n@param maturity The maturity in terms of ACT/365 daycount form this curve reference date. Note that this parameter might get rescaled to a different time parameter.\n@see net.finmath.marketdata.model.curves.DiscountCurveInterface#getDiscountFactor(net.finmath.marketdata.model.AnalyticModelInterface, double)"
] | [
"This method is used to automatically generate a value\nfor the Outline Number field of this task.\n\n@param parent Parent Task",
"Get the target file for misc items.\n\n@param item the misc item\n@return the target location",
"Use this API to fetch nslimitidentifier_binding resource of given name .",
"Runs the record linkage process.",
"Determine the length of a nul terminated UTF16LE string in bytes.\n\n@param data string data\n@param offset offset into string data\n@return length in bytes",
"Assembles an avro format string that contains multiple fat client configs\nfrom map of store to properties\n\n@param mapStoreToProps A map of store names to their properties\n@return Avro string that contains multiple store configs",
"Convert a Java date into a Planner date-time string.\n\n20070222T080000Z\n\n@param value Java date\n@return Planner date-time string",
"Features are only cacheable when not converted lazily as lazy features are incomplete, it would put detached\nobjects in the cache.\n\n@return true when features are not converted lazily",
"Use this API to update autoscaleprofile."
] |
public void setChildren(List<PrintComponent<?>> children) {
this.children = children;
// needed for Json unmarshall !!!!
for (PrintComponent<?> child : children) {
child.setParent(this);
}
} | [
"Set child components.\n\n@param children\nchildren"
] | [
"Sets an attribute in a non-main section of the manifest.\n\n@param section the section's name\n@param name the attribute's name\n@param value the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods.",
"Locks a file.\n\n@param expiresAt expiration date of the lock.\n@param isDownloadPrevented is downloading of file prevented when locked.\n@return the lock returned from the server.",
"Get the JSON string representation of the selector configured for this index.\n\n@return selector JSON as string",
"Answer the counted size\n\n@return int",
"Executes the mojo.",
"Execute a partitioned query using an index and a query selector.\n\nOnly available in partitioned databases. To verify a database is partitioned call\n{@link Database#info()} and check that {@link DbInfo.Props#getPartitioned()} returns\n{@code true}.\n\n<p>Example usage:</p>\n<pre>\n{@code\n// Query database partition 'Coppola'.\nQueryResult<Movie> movies = db.query(\"Coppola\", new QueryBuilder(and(\ngt(\"Movie_year\", 1960),\neq(\"Person_name\", \"Al Pacino\"))).\nfields(\"Movie_name\", \"Movie_year\").\nbuild(), Movie.class);\n}\n</pre>\n\n@param partitionKey Database partition to query.\n@param query String representation of a JSON object describing criteria used to\nselect documents.\n@param classOfT The class of Java objects to be returned in the {@code docs} field of\nresult.\n@param <T> The type of the Java object to be returned in the {@code docs} field of\nresult.\n@return A {@link QueryResult} object, containing the documents matching the query\nin the {@code docs} field.\n@see com.cloudant.client.api.Database#query(String, Class)",
"Returns a new List containing the given objects.",
"Optional operations to do before the multiple-threads start indexing\n\n@param backend",
"Gets an exception reporting an unexpected XML element.\n\n@param reader a reference to the stream reader.\n@return the constructed {@link javax.xml.stream.XMLStreamException}."
] |
@Override
public final Double optDouble(final String key) {
double result = this.obj.optDouble(key, Double.NaN);
if (Double.isNaN(result)) {
return null;
}
return result;
} | [
"Get a property as a double or null.\n\n@param key the property name"
] | [
"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.",
"Wrap Statement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a statement.",
"Prints text to output stream, replacing parameter start and end\nplaceholders\n\n@param text the String to print",
"On complete.\nSave response headers when needed.\n\n@param response\nthe response\n@return the response on single request",
"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>",
"callers of doLogin should be serialized before calling in.",
"Get the element at the index as a json object.\n\n@param i the index of the object to access",
"Writes the buffer contents to the given byte channel.\n\n@param channel\n@throws IOException",
"Get the correct google api key.\nTries to read a workplace key first.\n\n@param cms CmsObject\n@param sitePath site path\n@return key value\n@throws CmsException exception"
] |
@Override
public void onLoadFinished(final Loader<SortedList<T>> loader,
final SortedList<T> data) {
isLoading = false;
mCheckedItems.clear();
mCheckedVisibleViewHolders.clear();
mFiles = data;
mAdapter.setList(data);
if (mCurrentDirView != null) {
mCurrentDirView.setText(getFullPath(mCurrentPath));
}
// Stop loading now to avoid a refresh clearing the user's selections
getLoaderManager().destroyLoader( 0 );
} | [
"Called when a previously created loader has finished its load.\n\n@param loader The Loader that has finished.\n@param data The data generated by the Loader."
] | [
"Computes the square root of the complex number.\n\n@param input Input complex number.\n@param root Output. The square root of the input",
"The specified interface must not contain methods, that changes the state of this object itself.\n\n@param code\nsource code of an interface which describes how to generate the <i>immutable</i>\n@param settings\nsettings to generate code\n@return generated source code as string in a result wrapper",
"Transforms an input String into HTML using the given Configuration.\n\n@param input\nThe String to process.\n@param configuration\nThe Configuration.\n@return The processed String.\n@since 0.7\n@see Configuration",
"refresh all deliveries dependencies for a particular product",
"Parse a version String and add the components to a properties object.\n\n@param version the version to parse",
"Write calendar hours.\n\n@param parentCalendar parent calendar instance\n@param record calendar hours instance\n@throws IOException",
"Mark root of this task task group depends on the given TaskItem.\nThis ensure this task group's root get picked for execution only after the completion\nof invocation of provided TaskItem.\n\n@param dependencyTaskItem the task item that this task group depends on\n@return the key of the dependency",
"Determine the common ancestor of the given classes, if any.\n@param clazz1 the class to introspect\n@param clazz2 the other class to introspect\n@return the common ancestor (i.e. common superclass, one interface\nextending the other), or {@code null} if none found. If any of the\ngiven classes is {@code null}, the other class will be returned.\n@since 2.0",
"Parses the buffer into body content\n@param in ByteBuffer to parse\n@return a ByteBuffer with the parsed body content. Buffer in may not be depleted. If more data is\nneeded, null is returned. In the case of content complete, an empty ByteBuffer is returned.\n@throws BaseExceptions.ParserException"
] |
public EventBus emitSync(String event, Object... args) {
return _emitWithOnceBus(eventContextSync(event, args));
} | [
"Emit a string event with parameters and force all listener to be called synchronously.\n\n@param event\nthe target event\n@param args\nthe arguments passed in\n@see #emit(String, Object...)"
] | [
"Lookup Seam integration resource loader.\n@return the Seam integration resource loader\n@throws DeploymentUnitProcessingException for any error",
"Sanity checks the input or declares a new matrix. Return matrix is an identity matrix.",
"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...)",
"Stops the background data synchronization thread.",
"Removes trailing and leading whitespace, and also reduces each\nsequence of internal whitespace to a single space.",
"Set the default styles. the case of the keys are not important. The retrieval will be case\ninsensitive.\n\n@param defaultStyle the mapping from geometry type name (point, polygon, etc...) to the style\nto use for that type.",
"Returns the precedence of the specified operator. Non-operator's will\nreceive -1 or a GroovyBugError, depending on your preference.",
"This method takes the textual version of a constraint name\nand returns an appropriate class instance. Note that unrecognised\nvalues are treated as \"As Soon As Possible\" constraints.\n\n@param locale target locale\n@param type text version of the constraint type\n@return ConstraintType instance",
"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"
] |
public static nstimeout get(nitro_service service) throws Exception{
nstimeout obj = new nstimeout();
nstimeout[] response = (nstimeout[])obj.get_resources(service);
return response[0];
} | [
"Use this API to fetch all the nstimeout resources that are configured on netscaler."
] | [
"Get result of one of the task that belongs to this task's task group.\n\n@param key the task key\n@param <T> the actual type of the task result\n@return the task result, null will be returned if task has not produced a result yet",
"Flushes this output stream and forces any buffered output bytes to be written out to the stream. If propagate is\ntrue, the wrapped stream will also be flushed.\n\n@param propagate\nboolean flag to indicate whether the wrapped OutputStream should also be flushed.\n@throws IOException\nif an I/O error occurs.",
"This method removes line breaks from a piece of text, and replaces\nthem with the supplied text.\n\n@param text source text\n@param replacement line break replacement text\n@return text with line breaks removed.",
"Retrieves the avatar of a user as an InputStream.\n\n@return InputStream representing the user avater.",
"Create a patch representing what we actually processed. This may contain some fixed content hashes for removed\nmodules.\n\n@param original the original\n@return the processed patch",
"Add a dependency to the module.\n\n@param dependency Dependency",
"poll the response queue for response\n\n@param timeout timeout amount\n@param timeUnit timeUnit of timeout\n@return same result of BlockQueue.poll(long, TimeUnit)\n@throws InterruptedException",
"Returns flag whose value indicates if the string is null, empty or\nonly contains whitespace characters\n\n@param s a string\n@return true if the string is null, empty or only contains whitespace characters",
"Initializes the counters for a property to zero if not done yet.\n\n@param usageStatistics\nstatistics object to initialize\n@param property\nthe property to count"
] |
private ResourceField selectField(ResourceField[] fields, int index)
{
if (index < 1 || index > fields.length)
{
throw new IllegalArgumentException(index + " is not a valid field index");
}
return (fields[index - 1]);
} | [
"Maps a field index to a ResourceField instance.\n\n@param fields array of fields used as the basis for the mapping.\n@param index required field index\n@return ResourceField instance"
] | [
"Retrieve and validate the timestamp value from the REST request.\n\"X_VOLD_REQUEST_ORIGIN_TIME_MS\" is timestamp header\n\nTODO REST-Server 1. Change Time stamp header to a better name.\n\n@return true if present, false if missing",
"Sets left and right padding for all cells in the row.\n@param padding new padding for left and right, ignored if smaller than 0\n@return this to allow chaining",
"Provides the scrollableList implementation for page scrolling\n@return {@link LayoutScroller.ScrollableList} implementation, passed to {@link LayoutScroller}\nfor the processing the scrolling",
"Reads Netscape extension to obtain iteration count.",
"Moves a calendar to the last named day of the month.\n\n@param calendar current date",
"Promote a module in the Grapes server\n\n@param name\n@param version\n@throws GrapesCommunicationException\n@throws javax.naming.AuthenticationException",
"Use this API to update clusternodegroup resources.",
"Returns the editable columns for the provided edit mode.\n@param mode the edit mode.\n@return the editable columns for the provided edit mode.",
"Returns the texture magnification filter\n\nIf missing, defaults to {@link GL_LINEAR }\n\n@param type the texture type\n@param index the index in the texture stack\n@return the texture magnification filter"
] |
public User findByEmail(String email) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_FIND_BY_EMAIL);
parameters.put("find_email", email);
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element userElement = response.getPayload();
User user = new User();
user.setId(userElement.getAttribute("nsid"));
user.setUsername(XMLUtilities.getChildValue(userElement, "username"));
return user;
} | [
"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"
] | [
"note, this just logs an error and doesn't throw as its only used to remove old configuration files, and shouldn't stop boot",
"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.",
"Retrieve a byte array of containing the data starting at the supplied\noffset in the FixDeferFix file. Note that this method will return null\nif the requested data is not found for some reason.\n\n@param offset Offset into the file\n@return Byte array containing the requested data",
"Acquires a read lock on a specific key.\n@param key The key to lock\n@param timeout in milliseconds; -1 means wait indefinitely, 0 means no wait.",
"Apply issues tracker info to a build info builder (used by generic tasks and maven2 which doesn't use the extractor",
"The only properties added to a relationship are the columns representing the index of the association.",
"Within a single zone, swaps one random partition on one random node with\nanother random partition on different random node.\n\n@param nextCandidateCluster\n@param zoneId Zone ID within which to shuffle partitions\n@return updated cluster",
"Given a list of typedDependencies, returns true if the node \"node\" is the\ngovernor of a conj relation with a dependent which is not a preposition\n\n@param node\nA node in this GrammaticalStructure\n@param list\nA list of typedDependencies\n@return true If node is the governor of a conj relation in the list with\nthe dep not being a preposition",
"Guess whether given file is binary. Just checks for anything under 0x09."
] |
public static Bytes toBytes(Text t) {
return Bytes.of(t.getBytes(), 0, t.getLength());
} | [
"Convert from Hadoop Text to Bytes"
] | [
"Generate and return the list of statements to create a database table and any associated features.",
"Get a patch entry for either a layer or add-on.\n\n@param name the layer name\n@param addOn whether the target is an add-on\n@return the patch entry, {@code null} if it there is no such layer",
"Retrieve multiple properties.\n\n@param method method definition\n@param object target object\n@param map parameter values",
"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-",
"returns the zero argument constructor for the class represented by this class descriptor\nor null if a zero argument constructor does not exist. If the zero argument constructor\nfor this class is not public it is made accessible before being returned.",
"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",
"Returns an empty model of a Dependency in Json\n\n@return String\n@throws IOException",
"Load the available layers.\n\n@param image the installed image\n@param productConfig the product config to establish the identity\n@param moduleRoots the module roots\n@param bundleRoots the bundle roots\n@return the layers\n@throws IOException",
"This method allows a predecessor relationship to be added to this\ntask instance.\n\n@param targetTask the predecessor task\n@param type relation type\n@param lag relation lag\n@return relationship"
] |
@JsonInclude(Include.NON_EMPTY)
@JsonProperty("id")
public String getJsonId() {
if (!EntityIdValue.SITE_LOCAL.equals(this.siteIri)) {
return this.entityId;
} else {
return null;
}
} | [
"Returns the string id of the entity that this document refers to. Only\nfor use by Jackson during serialization.\n\n@return string id"
] | [
"Retrieve an instance of the ResourceField class based on the data read from an\nMPX file.\n\n@param value value from an MS Project file\n@return instance of this class",
"Zeros an inner rectangle inside the matrix.\n\n@param A Matrix that is to be modified.\n@param row0 Start row.\n@param row1 Stop row+1.\n@param col0 Start column.\n@param col1 Stop column+1.",
"Use this API to renumber nspbr6.",
"Creates a code location URL from a class\n\n@param codeLocationClass the class\n@return A URL created from Class\n@throws InvalidCodeLocation if URL creation fails",
"Parses command-line and gets metadata.\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException",
"Run a task once, after a delay.\n\n@param task\nTask to run.\n@param delay\nUnit is seconds.\n@return An interface that lets you query the status; cancel; or\nreschedule the event.",
"Processes the template for all foreignkeys 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\"",
"Creates an element that represents an image drawn at the specified coordinates in the page.\n@param x the X coordinate of the image\n@param y the Y coordinate of the image\n@param width the width coordinate of the image\n@param height the height coordinate of the image\n@param type the image type: <code>\"png\"</code> or <code>\"jpeg\"</code>\n@param resource the image data depending on the specified type\n@return",
"Populates default settings.\n\n@param record MPX record\n@param properties project properties\n@throws MPXJException"
] |
protected int parseZoneId() {
int result = -1;
String zoneIdStr = this.request.getHeader(RestMessageHeaders.X_VOLD_ZONE_ID);
if(zoneIdStr != null) {
try {
int zoneId = Integer.parseInt(zoneIdStr);
if(zoneId < 0) {
logger.error("ZoneId cannot be negative. Assuming the default zone id.");
} else {
result = zoneId;
}
} catch(NumberFormatException nfe) {
logger.error("Exception when validating request. Incorrect zone id parameter. Cannot parse this to int: "
+ zoneIdStr,
nfe);
}
}
return result;
} | [
"Retrieve and validate the zone id value from the REST request.\n\"X-VOLD-Zone-Id\" is the zone id header.\n\n@return valid zone id or -1 if there is no/invalid zone id"
] | [
"Returns a representation of the date from the value attributes as ISO\n8601 encoding.\n\n@param value\n@return ISO 8601 value (String)",
"Map the EventType.\n\n@param eventType the event type\n@return the event",
"Add a given factory to the list of factories at the BEGINNING.\n\n@param factory The factory to be added.\n@return Cascade with amended factory list.",
"Retrieves the notes text for this resource.\n\n@return notes text",
"Updates the indices in the index buffer from a Java char array.\nAll of the entries of the input char array are copied into\nthe storage for the index buffer. The new indices must be the\nsame size as the old indices - the index buffer size cannot be changed.\n@param data char array containing the new values\n@throws IllegalArgumentException if char array is wrong size",
"Create a JavadocComment, by formatting the text of the Javadoc using the given indentation.",
"Set the parent from which this week is derived.\n\n@param parent parent week",
"Return the list of galleries created by a user. Sorted from newest to oldest.\n\n@param userId\nThe user you want to check for\n@param perPage\nNumber of galleries per page\n@param page\nThe page number\n@return gallery\n@throws FlickrException\n\n@see <a hrerf=\"http://www.flickr.com/services/api/flickr.galleries.getList.html\">flickr.galleries.getList</a>",
"Resolves current full path with .yml and .yaml extensions\n\n@param fullpath\nwithout extension.\n\n@return Path of existing definition or null"
] |
private int getFlagResource(Country country) {
return getContext().getResources().getIdentifier("country_" + country.getIso().toLowerCase(), "drawable", getContext().getPackageName());
} | [
"Fetch flag resource by Country\n\n@param country Country\n@return int of resource | 0 value if not exists"
] | [
"Creates a random Hermitian matrix with elements from min to max value.\n\n@param length Width and height of the matrix.\n@param min Minimum value an element can have.\n@param max Maximum value an element can have.\n@param rand Random number generator.\n@return A symmetric matrix.",
"Process a currency definition.\n\n@param row record from XER file",
"Sets the drawable used as the drawer indicator.\n\n@param drawable The drawable used as the drawer indicator.",
"Finish initializing service.\n\n@throws IOException oop",
"Use this API to unset the properties of lbsipparameters resource.\nProperties that need to be unset are specified in args array.",
"Creates the given connection pool with the given configuration. Extracted here to make unit mocking easier.\n@param config configuration object.\n@return BoneCP connection pool handle.",
"List app dynos for an app\n\n@param appName See {@link #listApps} for a list of apps that can be used.",
"If any of the given list of properties are not found, returns the\nname of that property. Otherwise, returns null.",
"Extracts a flat set of interception bindings from a given set of interceptor bindings.\n\n@param addTopLevelInterceptorBindings add top level interceptor bindings to the result set.\n@param addInheritedInterceptorBindings add inherited level interceptor bindings to the result set.\n@return"
] |
public void start() {
if (this.started) {
throw new IllegalStateException("Cannot start the EventStream because it isn't stopped.");
}
final long initialPosition;
if (this.startingPosition == STREAM_POSITION_NOW) {
BoxAPIRequest request = new BoxAPIRequest(this.api, EVENT_URL.build(this.api.getBaseURL(), "now"), "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject jsonObject = JsonObject.readFrom(response.getJSON());
initialPosition = jsonObject.get("next_stream_position").asLong();
} else {
assert this.startingPosition >= 0 : "Starting position must be non-negative";
initialPosition = this.startingPosition;
}
this.poller = new Poller(initialPosition);
this.pollerThread = new Thread(this.poller);
this.pollerThread.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
public void uncaughtException(Thread t, Throwable e) {
EventStream.this.notifyException(e);
}
});
this.pollerThread.start();
this.started = true;
} | [
"Starts this EventStream and begins long polling the API.\n@throws IllegalStateException if the EventStream is already started."
] | [
"Build the key for the TableAlias based on the path and the hints\n@param aPath\n@param hintClasses\n@return the key for the TableAlias",
"This method extracts data for an exception day from an MSPDI file.\n\n@param calendar Calendar data\n@param day Day data",
"Returns a new index creation statement using the session's keyspace.\n\n@param keyspace the keyspace name\n@param table the table name\n@param name the index name\n@return a new index creation statement",
"Return a capitalized version of the specified property name.\n\n@param s\nThe property name",
"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",
"Start component timer for current instance\n@param type - of component",
"convert Date to XMLGregorianCalendar.\n\n@param date the date\n@return the xML gregorian calendar",
"Accessor method used to retrieve a Boolean object representing the\ncontents of an individual field. If the field does not exist in the\nrecord, null is returned.\n\n@param field the index number of the field to be retrieved\n@return the value of the required field",
"Sets a property on this Javascript object for which the value is a\nJavascriptEnum\n\nThe value is set to what is returned by the getEnumValue() method on the JavascriptEnum\n\n@param propertyName The name of the property.\n@param propertyValue The value of the property."
] |
public static <K, V> Map<K, V> copyOf(Map<K, V> map) {
Preconditions.checkNotNull(map);
return ImmutableMap.<K, V> builder().putAll(map).build();
} | [
"Creates an immutable map. A copy of the given map is used. As a result, it is safe to modify the source map afterwards.\n\n@param map the given map\n@return an immutable map"
] | [
"Loops through all resource roots that have been made available transitively via Class-Path entries, and\nadds them to the list of roots to be processed.",
"Updates the polling state from a DELETE or POST operation.\n\n@param response the response from Retrofit REST call\n@throws IOException thrown by deserialization",
"Peeks the current top of the stack or returns null if the stack is empty\n@return the current top of the stack or returns null if the stack is empty",
"Executes the API action \"wbremoveclaims\" for the given parameters.\n\n@param statementIds\nthe statement ids to delete\n@param bot\nif true, edits will be flagged as \"bot edits\" provided that\nthe logged in user is in the bot group; for regular users, the\nflag will just be ignored\n@param baserevid\nthe revision of the data that the edit refers to or 0 if this\nshould not be submitted; when used, the site will ensure that\nno edit has happened since this revision to detect edit\nconflicts; it is recommended to use this whenever in all\noperations where the outcome depends on the state of the\nonline data\n@param summary\nsummary for the edit; will be prepended by an automatically\ngenerated comment; the length limit of the autocomment\ntogether with the summary is 260 characters: everything above\nthat limit will be cut off\n@return the JSON response from the API\n@throws IOException\nif there was an IO problem. such as missing network\nconnection\n@throws MediaWikiApiErrorException\nif the API returns an error\n@throws IOException\n@throws MediaWikiApiErrorException",
"Looks up the EJB in the container and executes the method on it\n\n@param self the proxy instance.\n@param method the overridden method declared in the super class or\ninterface.\n@param proceed the forwarder method for invoking the overridden method. It\nis null if the overridden method is abstract or declared in the\ninterface.\n@param args an array of objects containing the values of the arguments\npassed in the method invocation on the proxy instance. If a\nparameter type is a primitive type, the type of the array\nelement is a wrapper class.\n@return the resulting value of the method invocation.\n@throws Throwable if the method invocation fails.",
"Returns the output path specified on the javadoc options",
"Retrieve the index of the table entry valid for the supplied date.\n\n@param date required date\n@return cost rate table entry index",
"Decides and returns the preferred deployment credentials to use from this builder settings and selected server\n\n@param deployerOverrider Deploy-overriding capable builder\n@param server Selected Artifactory server\n@return Preferred deployment credentials",
"Sets the target translator.\nIt will also remove any other translator set.\nNothing will happen if the argument is null.\n@param targetTranslator translator"
] |
@Override
public Optional<String> hash(final Optional<URL> url) throws IOException {
if (!url.isPresent()) {
return Optional.absent();
}
logger.debug("Calculating md5 hash, url:{}", url);
if (isHotReloadModeOff()) {
final String md5 = cache.getIfPresent(url.get());
logger.debug("md5 hash:{}", md5);
if (md5 != null) {
return Optional.of(md5);
}
}
final InputStream is = url.get().openStream();
final String md5 = getMD5Checksum(is);
if (isHotReloadModeOff()) {
logger.debug("caching url:{} with hash:{}", url, md5);
cache.put(url.get(), md5);
}
return Optional.fromNullable(md5);
} | [
"Calculates a md5 hash for an url\n\nIf a passed in url is absent then this method will return absent as well\n\n@param url - an url to a soy template file\n@return - md5 checksum of a template file\n@throws IOException - in a case there is an IO error calculating md5 checksum"
] | [
"returns true if there are still more rows in the underlying ResultSet.\nReturns false if ResultSet is exhausted.",
"Entry point for the example.\n\n@param args Command-line arguments for the example. To use samplemachine.xml from resources, send\nno arguments. To use other file, send a filename without xml extension).",
"Parses command-line and verifies metadata versions on all the cluster\nnodes\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException",
"Use this API to fetch the statistics of all nsacl6_stats resources that are configured on netscaler.",
"Use this API to update appfwlearningsettings resources.",
"Set value for given object field.\n\n@param object object to be updated\n@param field field name\n@param value field value\n\n@throws NoSuchMethodException if property writer is not available\n@throws InvocationTargetException if property writer throws an exception\n@throws IllegalAccessException if property writer is inaccessible",
"Leave a group.\n\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.leave.html\">lickr.groups.leave</a> for a description of the various behaviors possible\nwhen a user leaves a group.\n\n@param groupId\n- the id of the group to leave\n@param deletePhotos\n- delete photos by this user from group",
"Lookup an object via its name.\n@param name The name of an object.\n@return The object with that name.\n@exception ObjectNameNotFoundException There is no object with the specified name.\nObjectNameNotFoundException",
"Readable yyyyMMdd int representation of a day, which is also sortable."
] |
private static boolean isCollectionMatching(Joinable mainSideJoinable, OgmCollectionPersister inverseSidePersister) {
boolean isSameTable = mainSideJoinable.getTableName().equals( inverseSidePersister.getTableName() );
if ( !isSameTable ) {
return false;
}
return Arrays.equals( mainSideJoinable.getKeyColumnNames(), inverseSidePersister.getElementColumnNames() );
} | [
"Checks whether table name and key column names of the given joinable and inverse collection persister match."
] | [
"Use this API to fetch all the rnatparam resources that are configured on netscaler.",
"The context returned by this method may be later reused for other interception types.\n\n@param interceptionModel\n@param ctx\n@param manager\n@param type\n@return the interception context to be used for the AroundConstruct chain",
"we have only one implementation on classpath.",
"Backup the current version of the configuration to the versioned configuration history",
"The only indication that a task is a SubProject is the contents\nof the subproject file name field. We test these here then add a skeleton\nsubproject structure to match the way we do things with MPP files.",
"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.",
"Drives the unit test.",
"This method takes an array of data and uses this to populate the\nfield map.\n\n@param defaultData field map default data",
"Checks if provided class package is on the exclude list\n\n@param classPackageName\nname of class package\n@return false if class package is on the {@link #excludePackages} list"
] |
private void flushHotCacheSlot(SlotReference slot) {
// Iterate over a copy to avoid concurrent modification issues
for (Map.Entry<DeckReference, TrackMetadata> entry : new HashMap<DeckReference,TrackMetadata>(hotCache).entrySet()) {
if (slot == SlotReference.getSlotReference(entry.getValue().trackReference)) {
logger.debug("Evicting cached metadata in response to unmount report {}", entry.getValue());
hotCache.remove(entry.getKey());
}
}
} | [
"Discards any tracks from the hot cache that were loaded from a now-unmounted media slot, because they are no\nlonger valid."
] | [
"Sets the target directory.",
"This method should be called after all column have been added to the report.\n@param numgroups\n@return",
"Validates the type",
"Pops resource requests off the queue until queue is empty or an unexpired\nresource request is found. Invokes .handleTimeout on all expired resource\nrequests popped off the queue.\n\n@return null or a valid ResourceRequest",
"Replace a single value at the appropriate location in the existing value array.\n@param index - location in the array list\n@param newValue - the new String",
"Update the anchor based on arcore best knowledge of the world\n\n@param scale",
"Use this API to fetch vpnvserver_authenticationradiuspolicy_binding resources of given name .",
"Called after creating the first connection. The adapter should create its caches and do all initialization it requires. Most\nimportantly, the SQL query cache should be created.\n\n@param cnx\nan open ready to use connection to the database.",
"Parses a duration and returns the corresponding number of milliseconds.\n\nDurations consist of a space-separated list of components of the form {number}{time unit},\nfor example 1d 5m. The available units are d (days), h (hours), m (months), s (seconds), ms (milliseconds).<p>\n\n@param durationStr the duration string\n@param defaultValue the default value to return in case the pattern does not match\n@return the corresponding number of milliseconds"
] |
protected List<String> extractWords() throws IOException
{
while( true ) {
lineNumber++;
String line = in.readLine();
if( line == null ) {
return null;
}
// skip comment lines
if( hasComment ) {
if( line.charAt(0) == comment )
continue;
}
// extract the words, which are the variables encoded
return parseWords(line);
}
} | [
"Finds the next valid line of words in the stream and extracts them.\n\n@return List of valid words on the line. null if the end of the file has been reached.\n@throws java.io.IOException"
] | [
"Get the service name of a top-level deployment unit.\n\n@param name the simple name of the deployment\n@param phase the deployment phase\n@return the service name",
"Returns the coupon payment of the period with the given index. The analytic model is needed in case of floating bonds.\n\n@param periodIndex The index of the period of interest.\n@param model The model under which the product is valued.\n@return The value of the coupon payment in the given period.",
"Retrieve all References\n\n@param newObj the instance to be loaded or refreshed\n@param cld the ClassDescriptor of the instance\n@param forced if set to true loading is forced even if cld differs.",
"generate random velocities in the given range\n@return",
"Add the deployment scanner service to a batch.\n\n@param context context for the operation that is adding this service\n@param resourceAddress the address of the resource that manages the service\n@param relativeTo the relative to\n@param path the path\n@param scanInterval the scan interval\n@param unit the unit of {@code scanInterval}\n@param autoDeployZip whether zipped content should be auto-deployed\n@param autoDeployExploded whether exploded content should be auto-deployed\n@param autoDeployXml whether xml content should be auto-deployed\n@param scanEnabled scan enabled\n@param deploymentTimeout the deployment timeout\n@param rollbackOnRuntimeFailure rollback on runtime failures\n@param bootTimeService the deployment scanner used in the boot time scan\n@param scheduledExecutorService executor to use for asynchronous tasks\n@return the controller for the deployment scanner service",
"Sets the elements of this vector to uniformly distributed random values\nin a specified range, using a supplied random number generator.\n\n@param lower\nlower random value (inclusive)\n@param upper\nupper random value (exclusive)\n@param generator\nrandom number generator",
"Compress contiguous partitions into format \"e-i\" instead of\n\"e, f, g, h, i\". This helps illustrate contiguous partitions within a\nzone.\n\n@param cluster\n@param zoneId\n@return pretty string of partitions per zone",
"Returns the y-coordinate of a vertex tangent.\n\n@param vertex the vertex index\n@return the y coordinate",
"Apply an XMLDSig onto the passed document.\n\n@param aPrivateKey\nThe private key used for signing. May not be <code>null</code>.\n@param aCertificate\nThe certificate to be used. May not be <code>null</code>.\n@param aDocument\nThe document to be signed. The signature will always be the first\nchild element of the document element. The document may not contains\nany disg:Signature element. This element is inserted manually.\n@throws Exception\nIn case something goes wrong\n@see #createXMLSignature(X509Certificate)"
] |
public static void indexResourceRoot(final ResourceRoot resourceRoot) throws DeploymentUnitProcessingException {
if (resourceRoot.getAttachment(Attachments.ANNOTATION_INDEX) != null) {
return;
}
VirtualFile indexFile = resourceRoot.getRoot().getChild(ModuleIndexBuilder.INDEX_LOCATION);
if (indexFile.exists()) {
try {
IndexReader reader = new IndexReader(indexFile.openStream());
resourceRoot.putAttachment(Attachments.ANNOTATION_INDEX, reader.read());
ServerLogger.DEPLOYMENT_LOGGER.tracef("Found and read index at: %s", indexFile);
return;
} catch (Exception e) {
ServerLogger.DEPLOYMENT_LOGGER.cannotLoadAnnotationIndex(indexFile.getPathName());
}
}
// if this flag is present and set to false then do not index the resource
Boolean shouldIndexResource = resourceRoot.getAttachment(Attachments.INDEX_RESOURCE_ROOT);
if (shouldIndexResource != null && !shouldIndexResource) {
return;
}
final List<String> indexIgnorePathList = resourceRoot.getAttachment(Attachments.INDEX_IGNORE_PATHS);
final Set<String> indexIgnorePaths;
if (indexIgnorePathList != null && !indexIgnorePathList.isEmpty()) {
indexIgnorePaths = new HashSet<String>(indexIgnorePathList);
} else {
indexIgnorePaths = null;
}
final VirtualFile virtualFile = resourceRoot.getRoot();
final Indexer indexer = new Indexer();
try {
final VisitorAttributes visitorAttributes = new VisitorAttributes();
visitorAttributes.setLeavesOnly(true);
visitorAttributes.setRecurseFilter(new VirtualFileFilter() {
public boolean accepts(VirtualFile file) {
return indexIgnorePaths == null || !indexIgnorePaths.contains(file.getPathNameRelativeTo(virtualFile));
}
});
final List<VirtualFile> classChildren = virtualFile.getChildren(new SuffixMatchFilter(".class", visitorAttributes));
for (VirtualFile classFile : classChildren) {
InputStream inputStream = null;
try {
inputStream = classFile.openStream();
indexer.index(inputStream);
} catch (Exception e) {
ServerLogger.DEPLOYMENT_LOGGER.cannotIndexClass(classFile.getPathNameRelativeTo(virtualFile), virtualFile.getPathName(), e);
} finally {
VFSUtils.safeClose(inputStream);
}
}
final Index index = indexer.complete();
resourceRoot.putAttachment(Attachments.ANNOTATION_INDEX, index);
ServerLogger.DEPLOYMENT_LOGGER.tracef("Generated index for archive %s", virtualFile);
} catch (Throwable t) {
throw ServerLogger.ROOT_LOGGER.deploymentIndexingFailed(t);
}
} | [
"Creates and attaches the annotation index to a resource root, if it has not already been attached"
] | [
"Removes all elements in the sorted set with a score in the given range.\n@param scoreRange\n@return the number of elements removed.",
"Chooses a single segment to be compressed, or null if no segment could be chosen.\n@param options\n@param createMixed\n@return",
"Add a marker so we can recognize this as a metadata archive. I would use the ZipFile comment, but\nthat is not available until Java 7, and Beat Link is supposed to be backwards compatible with Java 6.\nSince we are doing this anyway, we can also provide information about the nature of the cache, and\nhow many metadata entries it contains, which is useful for auto-attachment.\n\n@param trackListEntries the tracks contained in the cache, so we can record the number\n@param playlistId the playlist contained in the cache, or 0 if it is all tracks from the media\n@param zos the stream to which the ZipFile is being written\n\n@throws IOException if there is a problem creating the format entry",
"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.",
"Set new particle coordinates somewhere off screen and apply new direction towards the screen\n\n@param position the particle position to apply new values to",
"Digest format to layer file name.\n\n@param digest\n@return",
"Returns the output path specified on the javadoc options",
"Displays text which shows the valid command line parameters, and then exits.",
"Log a trace message."
] |
public double getDurationMs() {
double durationMs = 0;
for (Duration duration : durations) {
if (duration.taskFinished()) {
durationMs += duration.getDurationMS();
}
}
return durationMs;
} | [
"Returns the duration of the measured tasks in ms"
] | [
"Create a new custom field setting on the project.\n\n@param project The project to associate the custom field with\n@return Request object",
"Determines the mutator method name based on a field name.\n\n@param fieldName\na field name\n@return the resulting method name",
"Calculate start dates for a monthly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"Compute \"sent\" date\n\n@param msg Message to take sent date from. May be null to use default\n@param defaultVal Default if sent date is not present\n@return Sent date or now if no date could be found",
"Pauses the playback of a sound.",
"Creates an upload session to create a new version of a file in chunks.\nThis will first verify that the version can be created and then open a session for uploading pieces of the file.\n@param fileSize the size of the file that will be uploaded.\n@return the created upload session instance.",
"Check if the provided date or any date after it are part of the series.\n@param nextDate the current date to check.\n@param previousOccurrences the number of events of the series that took place before the date to check.\n@return <code>true</code> if more dates (including the provided one) could be in the series, <code>false</code> otherwise.",
"Get the schema for the Avro Record from the object container file",
"Select a List of values from a Matcher using a Collection\nto identify the indices to be selected.\n\n@param self a Matcher\n@param indices a Collection of indices\n@return a String of the values at the given indices\n@since 1.6.0"
] |
public static List<DbModule> getAllSubmodules(final DbModule module) {
final List<DbModule> submodules = new ArrayList<DbModule>();
submodules.addAll(module.getSubmodules());
for(final DbModule submodule: module.getSubmodules()){
submodules.addAll(getAllSubmodules(submodule));
}
return submodules;
} | [
"Return the list of all the module submodules\n\n@param module\n@return List<DbModule>"
] | [
"Loads a CRF classifier from a filepath, and returns it.\n\n@param file\nFile to load classifier from\n@return The CRF classifier\n\n@throws IOException\nIf there are problems accessing the input stream\n@throws ClassCastException\nIf there are problems interpreting the serialized data\n@throws ClassNotFoundException\nIf there are problems interpreting the serialized data",
"If this represents an ip address, returns that address.\nIf this represents a host, returns the resolved ip address of that host.\nOtherwise, returns null, but only for strings that are considered valid address strings but cannot be converted to address objects.\n\nThis method will throw exceptions for invalid formats and failures to resolve the address. The equivalent method {@link #getAddress()} will simply return null rather than throw those exceptions.\n\nIf you wish to get the represented address and avoid DNS resolution, use {@link #asAddress()} or {@link #asAddressString()}\n\n@return",
"Use this API to clear nssimpleacl.",
"1.5 and on, 2.0 and on, 3.0 and on.",
"Create and serialize a WorkerStatus.\n\n@param queue the queue the Job came from\n@param job the Job currently being processed\n@return the JSON representation of a new WorkerStatus\n@throws IOException if there was an error serializing the WorkerStatus",
"Compare the supplied plaintext password to a hashed password.\n\n@param passwd Plaintext password.\n@param hashed scrypt hashed password.\n\n@return true if passwd matches hashed value.",
"Processes the most recent dump of the sites table to extract information\nabout registered sites.\n\n@return a Sites objects that contains the extracted information, or null\nif no sites dump was available (typically in offline mode without\nhaving any previously downloaded sites dumps)\n@throws IOException\nif there was a problem accessing the sites table dump or the\ndump download directory",
"Sets the set of language filters based on the given string.\n\n@param filters\ncomma-separates list of language codes, or \"-\" to filter all\nlanguages",
"Encodes the given URI query parameter with the given encoding.\n@param queryParam the query parameter to be encoded\n@param encoding the character encoding to encode to\n@return the encoded query parameter\n@throws UnsupportedEncodingException when the given encoding parameter is not supported"
] |
@UiHandler("m_seriesCheckBox")
void onSeriesChange(ValueChangeEvent<Boolean> event) {
if (handleChange()) {
m_controller.setIsSeries(event.getValue());
}
} | [
"Handle changes of the series check box.\n@param event the change event."
] | [
"Convert this object to a json array.",
"Tokenizes the input file and extracts the required data.\n\n@param is input stream\n@throws MPXJException",
"Creates the database.\n\n@throws PlatformException If some error occurred",
"Returns a compact representation of all of the stories on the task.\n\n@param task The task containing the stories to get.\n@return Request object",
"Writes a resource assignment to a PM XML file.\n\n@param mpxj MPXJ ResourceAssignment instance",
"If you register a CustomExpression with the name \"customExpName\", then this will create the text needed\nto invoke it in a JRDesignExpression\n\n@param customExpName\n@param usePreviousFieldValues\n@return",
"Runs the print.\n\n@param args the cli arguments\n@throws Exception",
"Exports json encoded content to CrashReport object\n\n@param json valid json body.\n@return new instance of CrashReport",
"Creates an element that represents an image drawn at the specified coordinates in the page.\n@param x the X coordinate of the image\n@param y the Y coordinate of the image\n@param width the width coordinate of the image\n@param height the height coordinate of the image\n@param type the image type: <code>\"png\"</code> or <code>\"jpeg\"</code>\n@param resource the image data depending on the specified type\n@return"
] |
protected static <E extends LogRecordHandler> boolean removeHandler(Class<E> toRemove) {
boolean rtn = false;
Iterator<LogRecordHandler> iter = handlers.iterator();
while(iter.hasNext()){
if(iter.next().getClass().equals(toRemove)){
rtn = true;
iter.remove();
}
}
return rtn;
} | [
"Remove a handler from the list\n@param toRemove The handler to remove. Any handler object that\nmatches this class will be removed.\n@return true if this handler was in the list."
] | [
"Evaluates the body if the current class has at least one member with at least one tag with the specified name.\n\n@param template The body of the block tag\n@param attributes The attributes of the template tag\n@exception XDocletException Description of Exception\[email protected] type=\"block\"\[email protected] name=\"tagName\" optional=\"false\" description=\"The tag name.\"\[email protected] name=\"paramName\" description=\"The parameter name. If not specified, then the raw\ncontent of the tag is returned.\"\[email protected] name=\"error\" description=\"Show this error message if no tag found.\"",
"Acquire transaction with a single permit in a thread. Transactions are acquired reentrantly, i.e.\nwith respect to transactions already acquired in the thread.\n\n@return the number of acquired permits, identically equal to 1.",
"Verify that all OGM custom externalizers are present.\nN.B. even if some Externalizer is only needed in specific configuration,\nit is not safe to start a CacheManager without one as the same CacheManager\nmight be used, or have been used in the past, to store data using a different\nconfiguration.\n\n@see ExternalizerIds\n@see AdvancedExternalizer\n@param externalCacheManager the provided CacheManager to validate",
"Skip to the next matching short value.\n\n@param buffer input data array\n@param offset start offset into the input array\n@param value value to match\n@return offset of matching pattern",
"The Total Slack field contains the amount of time a task can be\ndelayed without delaying the project's finish date.\n\n@return string representing duration",
"Register a new SingleServiceWrapperInterceptor for the bean being\nwrapped, associate it with the PerformanceMonitor and tell it which methods\nto intercept.\n\n@param source An Attribute node from the spring configuration\n@param beanName The name of the bean that this performance monitor is wrapped around\n@param registry The registry where all the spring beans are registered",
"Checks the day, month and year are equal.",
"create an instance from the className\n@param <E> class of object\n@param className full class name\n@return an object or null if className is null",
"Retrieve URL without parameters\n\n@param sourceURI source URI\n@return URL without parameters"
] |
public String addressPath() {
if (isLeaf) {
ManagementModelNode parent = (ManagementModelNode)getParent();
return parent.addressPath();
}
StringBuilder builder = new StringBuilder();
for (Object pathElement : getUserObjectPath()) {
UserObject userObj = (UserObject)pathElement;
if (userObj.isRoot()) { // don't want to escape root
builder.append(userObj.getName());
continue;
}
builder.append(userObj.getName());
builder.append("=");
builder.append(userObj.getEscapedValue());
builder.append("/");
}
return builder.toString();
} | [
"Get the DMR path for this node. For leaves, the DMR path is the path of its parent.\n@return The DMR path for this node."
] | [
"In managed environment do internal close the used connection",
"Start ssh session and obtain session.\n\n@return the session",
"Copies all available data from in to out without closing any stream.\n\n@return number of bytes copied",
"convert filename to clean filename",
"Extract schema of the value field",
"Update a feature object in the Hibernate session.\n\n@param feature feature object\n@throws LayerException oops",
"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",
"Arrange to become the tempo master. Starts a sequence of interactions with the other players that should end\nup with us in charge of the group tempo and beat alignment.\n\n@throws IllegalStateException if we are not sending status updates\n@throws IOException if there is a problem sending the master yield request",
"Creates an immutable map. A copy of the given map is used. As a result, it is safe to modify the source map afterwards.\n\n@param map the given map\n@return an immutable map"
] |
protected void postLayoutChild(final int dataIndex) {
if (!mContainer.isDynamic()) {
boolean visibleInLayout = !mViewPort.isClippingEnabled() || inViewPort(dataIndex);
ViewPortVisibility visibility = visibleInLayout ?
ViewPortVisibility.FULLY_VISIBLE : ViewPortVisibility.INVISIBLE;
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "onLayout: child with dataId [%d] viewportVisibility = %s",
dataIndex, visibility);
Widget childWidget = mContainer.get(dataIndex);
if (childWidget != null) {
childWidget.setViewPortVisibility(visibility);
}
}
} | [
"Do post exam of child inside the layout after it has been positioned in parent\n@param dataIndex data index"
] | [
"to do with XmlId value being strictly of type 'String'",
"Execute push docker image on agent\n\n@param launcher\n@param log\n@param imageTag\n@param username\n@param password\n@param host @return\n@throws IOException\n@throws InterruptedException",
"Read custom fields for a GanttProject task.\n\n@param gpTask GanttProject task\n@param mpxjTask MPXJ Task instance",
"Use this API to unset the properties of systemuser resource.\nProperties that need to be unset are specified in args array.",
"Adds another condition for an element within this annotation.",
"Print an extended attribute currency value.\n\n@param value currency value\n@return string representation",
"parse the target resource and add it to the current shape\n@param shapes\n@param modelJSON\n@param current\n@throws org.json.JSONException",
"2-D Integer array to double array.\n\n@param array Integer array.\n@return Double array.",
"Stop the drag action."
] |
public void addFilter(Filter filter)
{
if (filter.isTaskFilter())
{
m_taskFilters.add(filter);
}
if (filter.isResourceFilter())
{
m_resourceFilters.add(filter);
}
m_filtersByName.put(filter.getName(), filter);
m_filtersByID.put(filter.getID(), filter);
} | [
"Adds a filter definition to this project file.\n\n@param filter filter definition"
] | [
"Add columns to be returned by the SELECT query. If no columns are selected then all columns are returned by\ndefault. For classes with id columns, the id column is added to the select list automagically. This can be called\nmultiple times to add more columns to select.\n\n<p>\n<b>WARNING:</b> If you specify any columns to return, then any foreign-collection fields will be returned as null\n<i>unless</i> their {@link ForeignCollectionField#columnName()} is also in the list.\n</p>",
"Fling the content\n\n@param velocityX The initial velocity in the X direction. Positive numbers mean that the\nfinger/cursor is moving to the left on the screen, which means we want to\nscroll towards the beginning.\n@param velocityY The initial velocity in the Y direction. Positive numbers mean that the\nfinger/cursor is moving down the screen, which means we want to scroll\ntowards the top.\n@param velocityZ TODO: Z-scrolling is currently not supported\n@return",
"Return a collection of product descriptors for each option in the smile.\n\n@param referenceDate The reference date (translating the maturity floating point date to dates.\n@return a collection of product descriptors for each option in the smile.",
"If a and b are not null, returns a new duration of a + b.\nIf a is null and b is not null, returns b.\nIf a is not null and b is null, returns a.\nIf a and b are null, returns null.\nIf needed, b is converted to a's time unit using the project properties.\n\n@param a first duration\n@param b second duration\n@param defaults project properties containing default values\n@return a + b",
"Check to see whether a packet starts with the standard header bytes, followed by a known byte identifying it.\nIf so, return the kind of packet that has been recognized.\n\n@param packet a packet that has just been received\n@param port the port on which the packet has been received\n\n@return the type of packet that was recognized, or {@code null} if the packet was not recognized",
"Returns an MBeanServer with the specified name\n\n@param name\n@return",
"Processes the template for the object cache 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\"",
"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",
"Gets an entry point for the given deployment. If one does not exist it will be created. If the request controller is disabled\nthis will return null.\n\nEntry points are reference counted. If this method is called n times then {@link #removeControlPoint(ControlPoint)}\nmust also be called n times to clean up the entry points.\n\n@param deploymentName The top level deployment name\n@param entryPointName The entry point name\n@return The entry point, or null if the request controller is disabled"
] |
public static Map<String, StoreDefinition> getSystemStoreDefMap() {
Map<String, StoreDefinition> sysStoreDefMap = Maps.newHashMap();
List<StoreDefinition> storesDefs = SystemStoreConstants.getAllSystemStoreDefs();
for(StoreDefinition def: storesDefs) {
sysStoreDefMap.put(def.getName(), def);
}
return sysStoreDefMap;
} | [
"Utility function that fetches system store definitions\n\n@return The map container that maps store names to store definitions"
] | [
"Use this API to delete dnsview of given name.",
"Lookup Seam integration resource loader.\n@return the Seam integration resource loader\n@throws DeploymentUnitProcessingException for any error",
"Returns the Java command to use.\n\n@param javaHome the Java Home, if {@code null} an attempt to determine the command will be done\n\n@return the Java executable command",
"Create a document that parses the tile's labelFragment, using GraphicsWriter classes.\n\n@param writer\nwriter\n@param labelStyleInfo\nlabel style info\n@return graphics document\n@throws RenderException\ncannot render",
"Creates the server setup, depending on the protocol flags.\n\n@return the configured server setups.",
"Use this API to fetch the statistics of all authenticationvserver_stats resources that are configured on netscaler.",
"Produces a string in which the lower 4 bytes are expressed as an IPv4 address and the remaining upper bytes are expressed in IPv6 format.\n\nThis the mixed IPv6/IPv4 format described in RFC 1884 https://tools.ietf.org/html/rfc1884\n\n@return",
"Ensures that no more than maxContiguousPartitionsPerZone partitions are\ncontiguous within a single zone.\n\nMoves the necessary partitions to break up contiguous runs from each zone\nto some other random zone/node. There is some chance that such random\nmoves could result in contiguous partitions in other zones.\n\n@param nextCandidateCluster cluster metadata\n@param maxContiguousPartitionsPerZone See RebalanceCLI.\n@return Return updated cluster metadata.",
"Copy the contents of the given InputStream into a String.\nLeaves the stream open when done.\n@param in the InputStream to copy from\n@return the String that has been copied to\n@throws IOException in case of I/O errors"
] |
private static void addCauseToBacktrace(final Throwable cause, final List<String> bTrace) {
if (cause.getMessage() == null) {
bTrace.add(BT_CAUSED_BY_PREFIX + cause.getClass().getName());
} else {
bTrace.add(BT_CAUSED_BY_PREFIX + cause.getClass().getName() + ": " + cause.getMessage());
}
for (final StackTraceElement ste : cause.getStackTrace()) {
bTrace.add(BT_PREFIX + ste.toString());
}
if (cause.getCause() != null) {
addCauseToBacktrace(cause.getCause(), bTrace);
}
} | [
"Add a cause to the backtrace.\n\n@param cause\nthe cause\n@param bTrace\nthe backtrace list"
] | [
"Remove any protocol-level headers from the clients request that\ndo not apply to the new request we are sending to the remote server.\n\n@param request\n@param destination",
"Updates an existing enum option. Enum custom fields require at least one enabled enum option.\n\nReturns the full record of the updated enum option.\n\n@param enumOption Globally unique identifier for the enum option.\n@return Request object",
"Handles the change of a value in the current translation.\n@param propertyId the property id of the column where the value has changed.",
"Add a new value to the array map.\n@param key The key under which to store the value. <b>Must not be null.</b> If\nthis key already exists in the array, its value will be replaced.\n@param value The value to store for the given key.\n@return Returns the old value that was stored for the given key, or null if there\nwas no such key.",
"Mark for creation all newly introduced dependent references.\nMark for deletion all nullified dependent references.\n@return the list of created objects",
"Enable a host\n\n@param hostName\n@throws Exception",
"Appends the given string encoding special HTML characters.\n\n@param out\nThe StringBuilder to write to.\n@param in\nInput String.\n@param start\nInput String starting position.\n@param end\nInput String end position.",
"Before closing the PersistenceBroker ensure that the session\ncache is cleared",
"Expands the directories from the given list and and returns a list of subfiles.\nFiles from the original list are kept as is."
] |
private void printKeySet() {
Set<?> keys = keySet();
System.out.println("printing keyset:");
for (Object o: keys) {
//System.out.println(Arrays.asList((Object[]) i.next()));
System.out.println(o);
}
} | [
"below is testing code"
] | [
"gets the profile_name associated with a specific id",
"Use this API to fetch all the Interface resources that are configured on netscaler.",
"Configures the log context for the server and returns the configured log context.\n\n@param logDir the logging directory, from jboss.server|domain.log.dir standalone default {@code $JBOSS_HOME/standalone/log}\n@param configDir the configuration directory from jboss.server|domain.config.dir, standalone default {@code $JBOSS_HOME/standalone/configuration}\n@param defaultLogFileName the name of the log file to pass to {@code org.jboss.boot.log.file}\n@param ctx the command context used to report errors to\n\n@return the configured log context",
"Use this API to create sslfipskey resources.",
"Use this API to fetch systemsession resources of given names .",
"Attempts to retrieves ResourceReport until maxWaitMs time is reached. Set maxWaitMs to -1 to\nretry forever.",
"Invalidating just the GVRView associated with the GVRViewSceneObject\nincorrectly set the clip rectangle to just that view. To fix this,\nwe have to create a full screen android View and invalidate this\nto restore the clip rectangle.\n@return full screen View object",
"check if MessageID exists in the message, if not, only generate new MessageID for outbound message.\n@param message",
"Create an element that represents a horizntal or vertical line.\n@param x1\n@param y1\n@param x2\n@param y2\n@return the created DOM element"
] |
public Release getReleaseInfo(String appName, String releaseName) {
return connection.execute(new ReleaseInfo(appName, releaseName), apiKey);
} | [
"Information about a specific release.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param releaseName Release name. See {@link #listReleases} for a list of the app's releases.\n@return the release object"
] | [
"Mark unfinished test cases as interrupted for each unfinished test suite, then write\ntest suite result\n@see #createFakeTestcaseWithWarning(ru.yandex.qatools.allure.model.TestSuiteResult)\n@see #markTestcaseAsInterruptedIfNotFinishedYet(ru.yandex.qatools.allure.model.TestCaseResult)",
"Whether the rows of the given association should be stored in a hash using the single row key column as key or\nnot.",
"To populate the dropdown list from the jelly",
"Create a set containing all the processor at the current node and the entire subgraph.",
"Returns the \"msgCount\" belief\n\n@return int - the count",
"Returns whether the given host matches this one. For hosts to match, they must represent the same addresses or have the same host names.\nHosts are not resolved when matching. Also, hosts must have the same port and service. They must have the same masks if they are host names.\nEven if two hosts are invalid, they match if they have the same invalid string.\n\n@param host\n@return",
"Returns a Span that covers all rows beginning with a prefix.",
"Process calendar hours.\n\n@param calendar parent calendar\n@param row calendar hours data\n@param dayIndex day index",
"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"
] |
public void createOverride(int groupId, String methodName, String className) throws Exception {
// first make sure this doesn't already exist
for (Method method : EditService.getInstance().getMethodsFromGroupId(groupId, null)) {
if (method.getMethodName().equals(methodName) && method.getClassName().equals(className)) {
// don't add if it already exists in the group
return;
}
}
try (Connection sqlConnection = sqlService.getConnection()) {
PreparedStatement statement = sqlConnection.prepareStatement(
"INSERT INTO " + Constants.DB_TABLE_OVERRIDE
+ "(" + Constants.OVERRIDE_METHOD_NAME
+ "," + Constants.OVERRIDE_CLASS_NAME
+ "," + Constants.OVERRIDE_GROUP_ID
+ ")"
+ " VALUES (?, ?, ?)"
);
statement.setString(1, methodName);
statement.setString(2, className);
statement.setInt(3, groupId);
statement.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}
} | [
"given the groupId, and 2 string arrays, adds the name-responses pair to the table_override\n\n@param groupId ID of group\n@param methodName name of method\n@param className name of class\n@throws Exception exception"
] | [
"OJB can handle only classes that declare at least one primary key attribute,\nthis method checks this condition.\n\n@param realObject The real object to check\n@throws ClassNotPersistenceCapableException thrown if no primary key is specified for the objects class",
"Checks the constraints on this class.\n\n@param checkLevel The amount of checks to perform\n@exception ConstraintException If a constraint has been violated",
"If the not a bitmap itself, this will read the file's meta data.\n\n@param resources {@link android.content.Context#getResources()}\n@return Point where x = width and y = height",
"Initialize the version properties map from the gradle.properties file, and the additional properties from the\ngradle.properties file.",
"return the workspace size needed for ctc",
"Returns the value of the matrix at the specified index of the 1D row major array.\n\n@see DMatrixRMaj#get(int)\n\n@param index The element's index whose value is to be returned\n@return The value of the specified element.",
"This function interprets the arguments of the main function. By doing\nthis it will set flags for the dump generation. See in the help text for\nmore specific information about the options.\n\n@param args\narray of arguments from the main function.\n@return list of {@link DumpProcessingOutputAction}",
"Sets the hostname and port to connect to.\n\n@param hostname the host name\n@param port the port\n\n@return the builder",
"convert Date to XMLGregorianCalendar.\n\n@param date the date\n@return the xML gregorian calendar"
] |
private Map<String, String> getLocaleProperties() {
if (m_localeProperties == null) {
m_localeProperties = CmsCollectionsGenericWrapper.createLazyMap(
new CmsProperty.CmsPropertyLocaleTransformer(m_properties, m_locale));
}
return m_localeProperties;
} | [
"Helper to get locale specific properties.\n\n@return the locale specific properties map."
] | [
"Here the lambda in the implicit step is determined dynamically. At first\nit selects zeros to quickly reveal singular values that are zero or close to zero.\nThen it computes it using a Wilkinson shift.",
"Gets an overrideID for a class name, method name\n\n@param className name of class\n@param methodName name of method\n@return override ID of method",
"Fling the content\n\n@param velocityX The initial velocity in the X direction. Positive numbers mean that the\nfinger/cursor is moving to the left on the screen, which means we want to\nscroll towards the beginning.\n@param velocityY The initial velocity in the Y direction. Positive numbers mean that the\nfinger/cursor is moving down the screen, which means we want to scroll\ntowards the top.\n@param velocityZ TODO: Z-scrolling is currently not supported\n@return",
"Read the optional row header and UUID.\n\n@param stream input stream\n@param map row map",
"What is something came in between when we last checked and when this method is called",
"add converter at given index. The index can be changed during conversion\nif canReorder is true\n\n@param index\n@param converter",
"Finds for the given project.\n\n@param name project name\n@return given project or an empty {@code Optional} if project does not exist\n@throws IllegalArgumentException",
"Use this API to fetch the statistics of all spilloverpolicy_stats resources that are configured on netscaler.",
"object -> xml\n\n@param object\n@param childClass"
] |
void rollback() {
if (publishedFullRegistry == null) {
return;
}
writeLock.lock();
try {
publishedFullRegistry.readLock.lock();
try {
clear(true);
copy(publishedFullRegistry, this);
modified = false;
} finally {
publishedFullRegistry.readLock.unlock();
}
} finally {
writeLock.unlock();
}
} | [
"Discard the changes."
] | [
"Use this API to enable nsacl6 resources of given names.",
"Multiply two complex numbers.\n\n@param z1 Complex Number.\n@param z2 Complex Number.\n@return Returns new ComplexNumber instance containing the multiply of specified complex numbers.",
"This method is used to quote any special characters that appear in\nliteral text that is required as part of the currency format.\n\n@param literal Literal text\n@return literal text with special characters in quotes",
"Count the number of non-zero elements in V",
"Get the relative path of an application\n\n@param root the root to relativize against\n@param path the path to relativize\n@return the relative path",
"Method to read our client's plain text\n\n@param file_name\n@return the filereader to translate client's plain text into our files\n@throws BeastException\nif any problem is found whit the file",
"Convert a wavelength to an RGB value.\n@param wavelength wavelength in nanometres\n@return the RGB value",
"Add fields to the text index configuration.\n\n@param fields the {@link TextIndex.Field} configurations to add\n@return the builder for chaining",
"The derivative of the objective function. You may override this method\nif you like to implement your own derivative.\n\n@param parameters Input value. The parameter vector.\n@param derivatives Output value, where derivatives[i][j] is d(value(j)) / d(parameters(i)\n@throws SolverException Thrown if the valuation fails, specific cause may be available via the <code>cause()</code> method."
] |
public String getPrefix(INode prefixNode) {
if (prefixNode instanceof ILeafNode) {
if (((ILeafNode) prefixNode).isHidden() && prefixNode.getGrammarElement() != null)
return "";
return getNodeTextUpToCompletionOffset(prefixNode);
}
StringBuilder result = new StringBuilder(prefixNode.getTotalLength());
doComputePrefix((ICompositeNode) prefixNode, result);
return result.toString();
} | [
"replace region length"
] | [
"Return the most appropriate log type. This should _never_ return null.",
"Sets the left padding character for all cells in the table.\n@param paddingLeftChar new padding character, ignored if null\n@return this to allow chaining",
"Convert an Object to a Date.",
"Check if this type is assignable from the given Type.",
"Formats a double value.\n\n@param number numeric value\n@return Double instance",
"Sets the protocol.\n@param protocol The protocol to be set.",
"Calls the provided metric getter on all the tracked environments and\nobtains their values\n\n@param metricGetterName\n@return",
"Method to build Mail Channel Adapter for IMAP.\n@param urlName Mail source URL.\n@return Mail Channel for IMAP",
"Returns first resolver that accepts the given resolverId.\nIn case none is found null is returned.\n@param resolverId identifier of the resolver\n@return found resolver or null otherwise"
] |
public PhotoList<Photo> getRecent(Set<String> extras, int perPage, int page) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_RECENT);
if (extras != null && !extras.isEmpty()) {
parameters.put(Extras.KEY_EXTRAS, StringUtilities.join(extras, ","));
}
if (perPage > 0) {
parameters.put("per_page", Integer.toString(perPage));
}
if (page > 0) {
parameters.put("page", Integer.toString(page));
}
Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element photosElement = response.getPayload();
PhotoList<Photo> photos = PhotoUtils.createPhotoList(photosElement);
return photos;
} | [
"Get a collection of recent photos.\n\nThis method does not require authentication.\n\n@see com.flickr4java.flickr.photos.Extras\n@param extras\nSet of extra-fields\n@param perPage\nThe number of photos per page\n@param page\nThe page offset\n@return A collection of Photo objects\n@throws FlickrException"
] | [
"Checks if we can see any players that are on a different network than the one we chose for the Virtual CDJ.\nIf so, we are not going to be able to communicate with them, and they should all be moved onto a single\nnetwork.\n\n@return the device announcements of any players which are on unreachable networks, or hopefully an empty list\n@throws IllegalStateException if we are not running",
"Build control archive of the deb\n\n@param packageControlFile the package control file\n@param controlFiles the other control information files (maintainer scripts, etc)\n@param dataSize the size of the installed package\n@param checksums the md5 checksums of the files in the data archive\n@param output\n@return\n@throws java.io.FileNotFoundException\n@throws java.io.IOException\n@throws java.text.ParseException",
"Executes a batch plan.\n\n@param batchId Used as the ID of the batch plan. This allows related\ntasks on client- & server-side to pretty print messages in a\nmanner that debugging can track specific batch plans across the\ncluster.\n@param batchPlan The batch plan...",
"Attempt to detect the current platform.\n\n@return The current platform.\n\n@throws UnsupportedPlatformException if the platform cannot be detected.",
"Read a short int from an input stream.\n\n@param is input stream\n@return int value",
"Records the result of updating a server group.\n\n@param serverGroup the server group's name. Cannot be <code>null</code>\n@param failed <code>true</code> if the server group update failed;\n<code>false</code> if it succeeded",
"Select this tab item.",
"Utility method to retrieve the next working date start time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of next work start",
"Propagates the names of all facets to each single facet."
] |
public <C extends Contextual<I>, I> C getContextual(String id) {
return this.<C, I>getContextual(new StringBeanIdentifier(id));
} | [
"Given a particular id, return the correct contextual. For contextuals\nwhich aren't passivation capable, the contextual can't be found in another\ncontainer, and null will be returned.\n\n@param id An identifier for the contextual\n@return the contextual"
] | [
"Use this API to fetch appfwprofile_excluderescontenttype_binding resources of given name .",
"Perform a module dependency graph of the target and return the graph as a JSON\n\n@param moduleName\n@param moduleVersion\n@param uriInfo\n@return Response",
"Sets a quota for a users.\n\n@param user the user.\n@param quota the quota.",
"Check if the the nodeId is present in the cluster managed by the metadata store\nor throw an exception.\n\n@param nodeId The nodeId to check existence of",
"Set the name of the schema containing the Primavera tables.\n\n@param schema schema name.",
"Sorts the specified list itself into ascending order, according to the natural ordering of its elements.\n\n@param list\nthe list to be sorted. May not be <code>null</code>.\n@return the sorted list itself.\n@see Collections#sort(List)",
"Producers returned from this method are not validated. Internal use only.",
"Method which performs strength checks on password. It returns outcome which can be used by CLI.\n\n@param isAdminitrative - administrative checks are less restrictive. This means that weak password or one which violates restrictions is not indicated as failure.\nAdministrative checks are usually performed by admin changing/setting default password for user.\n@param userName - the name of user for which password is set.\n@param password - password.\n@return",
"Checks length and compare order of field names with declared PK fields in metadata."
] |
public UUID getUUID(FastTrackField type)
{
String value = getString(type);
UUID result = null;
if (value != null && !value.isEmpty() && value.length() >= 36)
{
if (value.startsWith("{"))
{
value = value.substring(1, value.length() - 1);
}
if (value.length() > 16)
{
value = value.substring(0, 36);
}
result = UUID.fromString(value);
}
return result;
} | [
"Retrieve a UUID field.\n\n@param type field type\n@return UUID instance"
] | [
"Gets all tags that are \"prime\" tags.",
"Calculate a shift value that can be used to create a power-of-two value between\nthe specified maximum and minimum values.\n@param minimumValue the minimum value\n@param maximumValue the maximum value\n@return the calculated shift (use {@code 1 << shift} to obtain a value)",
"Validates the wrapped value and returns a localized error message in case of invalid values.\n@return <code>null</code> if the value is valid, a suitable localized error message otherwise.",
"get the default profile\n\n@return representation of default profile\n@throws Exception exception",
"Read a single calendar exception.\n\n@param bc parent calendar\n@param exception exception data",
"Reads the CSS and JavaScript files from the JAR file and writes them to\nthe output directory.\n@param outputDirectory Where to put the resources.\n@throws IOException If the resources can't be read or written.",
"Validates that this string is a valid host name or IP address, and if not, throws an exception with a descriptive message indicating why it is not.\n@throws HostNameException",
"Read calendar data from a PEP file.",
"Invoke the setters for the given variables on the given instance.\n@param <T> the instance type\n@param instance the instance to inject with the variables\n@param vars the variables to inject\n@return the instance\n@throws ReflectiveOperationException if there was a problem finding or invoking a setter method"
] |
private int getColor(int value) {
if (value == 0) {
return 0;
}
double scale = Math.log10(value) / Math.log10(this.topValue);
double lengthScale = Math.min(1.0, scale) * (colors.length - 1);
int index = 1 + (int) lengthScale;
if (index == colors.length) {
index--;
}
double partScale = lengthScale - (index - 1);
int r = (int) (colors[index - 1][0] + partScale
* (colors[index][0] - colors[index - 1][0]));
int g = (int) (colors[index - 1][1] + partScale
* (colors[index][1] - colors[index - 1][1]));
int b = (int) (colors[index - 1][2] + partScale
* (colors[index][2] - colors[index - 1][2]));
r = Math.min(255, r);
b = Math.min(255, b);
g = Math.min(255, g);
return (r << 16) | (g << 8) | b;
} | [
"Returns a color for a given absolute number that is to be shown on the\nmap.\n\n@param value\n@return"
] | [
"Support the range subscript operator for CharSequence with IntRange\n\n@param text a CharSequence\n@param range an IntRange\n@return the subsequence CharSequence\n@since 1.0",
"Resize picture to desired size.\n\n@param width Desired width.\n@param height Desired height.\n@throws IllegalArgumentException if {@code width} or {@code height} is less than 0 or both are\n0.",
"Skips the given count of bytes, but at most the currently available count.\n\n@return number of bytes actually skipped from this buffer (0 if no bytes are available)",
"Generates the specified number of random resource names with the same prefix.\n@param prefix the prefix to be used if possible\n@param maxLen the maximum length for the random generated name\n@param count the number of names to generate\n@return random names",
"Compare two integers, accounting for null values.\n\n@param n1 integer value\n@param n2 integer value\n@return comparison result",
"Move the animation frame counter forward.\n\n@return boolean specifying if animation should continue or if loopCount has been fulfilled.",
"Internal function that uses recursion to create the list",
"Makes an RPC call using the client. Logs how long it took and any exceptions.\n\nNOTE: The request could be an InputStream too, but the http client will need to\nfind its length, which will require buffering it anyways.\n\n@throws DatastoreException if the RPC fails.",
"Apply the necessary rotation to the transform so that it is in front of\nthe camera. The actual rotation is performed not using the yaw angle but\nusing equivalent quaternion values for better accuracy. But the yaw angle\nis still returned for backward compatibility.\n\n@param widget The transform to modify.\n@return The camera's yaw in degrees."
] |
private static JsonArray toJsonArray(Collection<String> values) {
JsonArray array = new JsonArray();
for (String value : values) {
array.add(value);
}
return array;
} | [
"Helper function to create JsonArray from collection.\n\n@param values collection of values to convert to JsonArray\n@return JsonArray with collection values"
] | [
"Sets the last operation response.\n\n@param response the last operation response.",
"Get a list of referrers from a given domain to a photo.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param domain\n(Required) The domain to return referrers for. This should be a hostname (eg: \"flickr.com\") with no protocol or pathname.\n@param photoId\n(Optional) The id of the photo to get stats for. If not provided, stats for all photos will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotoReferrers.html\"",
"Retrieve an instance of the TaskField class based on the data read from an\nMPX file.\n\n@param value value from an MS Project file\n@return TaskField instance",
"Given an array of variable names, returns a JsonObject\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@return a json object of values",
"By default uses InputStream as the type of the image\n@param title\n@param property\n@param width\n@param fixedWidth\n@param imageScaleMode\n@param style\n@return\n@throws ColumnBuilderException\n@throws ClassNotFoundException",
"Initializes the default scope type",
"Parse the string representation of a double.\n\n@param value string representation\n@return Java representation\n@throws ParseException",
"Given a RendererViewHolder passed as argument and a position renders the view using the\nRenderer previously stored into the RendererViewHolder.\n\n@param viewHolder with a Renderer class inside.\n@param position to render.",
"Open an OutputStream and execute the function using the OutputStream.\n\n@param function the function to execute\n@return the URI and the file size"
] |
public static String getArtifactoryPluginVersion() {
String pluginsSortName = "artifactory";
//Validates Jenkins existence because in some jobs the Jenkins instance is unreachable
if (Jenkins.getInstance() != null
&& Jenkins.getInstance().getPlugin(pluginsSortName) != null
&& Jenkins.getInstance().getPlugin(pluginsSortName).getWrapper() != null) {
return Jenkins.getInstance().getPlugin(pluginsSortName).getWrapper().getVersion();
}
return "";
} | [
"Returns the version of Jenkins Artifactory Plugin or empty string if not found\n\n@return the version of Jenkins Artifactory Plugin or empty string if not found"
] | [
"Creates a new instance with the given key and value.\nMay be used instead of the constructor for convenience reasons.\n\n@param k\nthe key. May be <code>null</code>.\n@param v\nthe value. May be <code>null</code>.\n@return a newly created pair. Never <code>null</code>.\n@since 2.3",
"Gets type from super class's type parameter.",
"Add SQL to handle a unique=true field. THis is not for uniqueCombo=true.",
"Create a function that will create the style on demand. This is called later in a separate thread so\nany blocking calls will not block the parsing of the layer attributes.\n\n@param template the template for this map\n@param styleString a string that identifies a style.",
"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",
"Boot with the given operations, performing full model and capability registry validation.\n\n@param bootOperations the operations. Cannot be {@code null}\n@param rollbackOnRuntimeFailure {@code true} if the boot should fail if operations fail in the runtime stage\n@return {@code true} if boot was successful\n@throws ConfigurationPersistenceException",
"Summarizes balance for the given nodeId to PartitionCount.\n\n@param nodeIdToPartitionCount\n@param title for use in pretty string\n@return Pair: getFirst() is utility value to be minimized, getSecond() is\npretty summary string of balance",
"Constraint that ensures that the field has a length if the jdbc type requires it.\n\n@param fieldDef The field descriptor\n@param checkLevel The current check level (this constraint is checked in all levels)",
"Entry point with no system exit"
] |
public static <T> Iterator<T> concat(Iterator<? extends Iterator<? extends T>> iterators) {
Preconditions.checkArgumentNotNull(iterators, "iterators");
return new CombinedIterator<T>(iterators);
} | [
"Combine the iterators into a single one.\n\n@param iterators An iterator of iterators\n@return a single combined iterator"
] | [
"Gets the numeric codes. Setting it to -1 search for currencies that have no numeric code.\n\n@return the query for chaining.",
"Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directory",
"Adds OPT_X | OPT_HEX option to OptionParser, with multiple arguments.\n\n@param parser OptionParser to be modified\n@param required Tells if this option is required or optional",
"Returns a single parent of the given tag. If there are multiple parents, throws a WindupException.",
"Compute the key to use.\n\n@param ref The reference number.\n@param filename The filename.\n@param extension The file extension.",
"Get the server redirects for a given clientId from the database\n\n@param clientId client ID\n@return collection of ServerRedirects",
"Use this API to unset the properties of nstimeout resource.\nProperties that need to be unset are specified in args array.",
"Reads a single byte from the input stream.",
"Converts a byte array to a hexadecimal string representation\n@param bb the byte array to convert\n@return string the string representation"
] |
public long removeRangeByLex(final LexRange lexRange) {
return doWithJedis(new JedisCallable<Long>() {
@Override
public Long call(Jedis jedis) {
return jedis.zremrangeByLex(getKey(), lexRange.from(), lexRange.to());
}
});
} | [
"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."
] | [
"Returns a single template.\n\n@param id id of the template to retrieve.\n@return {@link Response}\n\n@throws RequestException if request to transloadit server fails.\n@throws LocalOperationException if something goes wrong while running non-http operations.",
"Enable a custom response\n\n@param custom custom response\n@param path_id path ID of the response\n@param client_uuid client UUID\n@throws Exception exception",
"add a foreign key field ID",
"Upload file and set odo overrides and configuration of odo\n\n@param fileName File containing configuration\n@param odoImport Import odo configuration in addition to overrides\n@return If upload was successful",
"The method determines if the type can be resolved and if not, will try to guess the qualified name using the information from the imports.",
"Detects if the current browser is a Sony Mylo device.\n@return detection of a Sony Mylo device",
"Get the node that has been selected by the user, or null if\nnothing is selected.\n@return The node or <code>null</code>",
"Provide array of String results from inputOutput MFString field named string.\n@return value of string field",
"Merges the immutable container types of this Configuration with the given\nConfiguration.\n\nThe resultant immutable container types results will be the union of the two sets of\nimmutable container types. Where the type is found in both\nConfigurations, the result from otherConfiguration will replace the\nexisting result in this Configuration. This replacement behaviour will\noccur for subsequent calls to\n{@link #mergeImmutableContainerTypesFrom(Configuration)} .\n\n@param otherConfiguration - Configuration to merge immutable container types with."
] |
public static void outputString(final HttpServletResponse response, final Object obj) {
try {
response.setContentType("text/javascript");
response.setCharacterEncoding("utf-8");
disableCache(response);
response.getWriter().write(obj.toString());
response.getWriter().flush();
response.getWriter().close();
} catch (IOException e) {
}
} | [
"response simple String\n\n@param response\n@param obj"
] | [
"If a and b are not null, returns a new duration of a + b.\nIf a is null and b is not null, returns b.\nIf a is not null and b is null, returns a.\nIf a and b are null, returns null.\nIf needed, b is converted to a's time unit using the project properties.\n\n@param a first duration\n@param b second duration\n@param defaults project properties containing default values\n@return a + b",
"Create a new entry in the database from an object.",
"Store some state on this request context associated with the specified interceptor instance.\nUsed where a single interceptor instance needs to associate state with each HTTP request.\n\n@param interceptor the interceptor instance\n@param stateName the key to store the state object under\n@param stateObjectToStore the state object to store\n@param <T> the type of the state object to store\n@see #getState(HttpConnectionInterceptor, String, Class)\n@since 2.6.0",
"Adds a license to an artifact if the license exist into the database\n\n@param gavc String\n@param licenseId String",
"Sets the given value on an the receivers's accessible field with the given name.\n\n@param receiver the receiver, never <code>null</code>\n@param fieldName the field's name, never <code>null</code>\n@param value the value to set\n\n@throws NoSuchFieldException see {@link Class#getField(String)}\n@throws SecurityException see {@link Class#getField(String)}\n@throws IllegalAccessException see {@link Field#set(Object, Object)}\n@throws IllegalArgumentException see {@link Field#set(Object, Object)}",
"If the DefaultActionInvocation has been executed before and the Result is\nan instance of ActionChainResult, this method will walk down the chain of\nActionChainResults until it finds a non-chain result, which will be\nreturned. If the DefaultActionInvocation's result has not been executed\nbefore, the Result instance will be created and populated with the result\nparams.\n\n@return a Result instance\n@throws Exception",
"Helper method to create a Dao object without having to define a class. Dao classes are supposed to be convenient\nbut if you have a lot of classes, they can seem to be a pain.\n\n<p>\n<b>NOTE:</b> You should use {@link DaoManager#createDao(ConnectionSource, DatabaseTableConfig)} instead of this\nmethod so you won't have to create the DAO multiple times.\n</p>",
"Returns all model classes registered on this datasource\n\n@return model classes talk to this datasource",
"Fetches the HttpMethod from annotations and returns String representation of HttpMethod.\nReturn emptyString if not present.\n\n@param method Method handling the http request.\n@return String representation of HttpMethod from annotations or emptyString as a default."
] |
public static Resource getSetupPage(I_SetupUiContext context, String name) {
String path = CmsStringUtil.joinPaths(context.getSetupBean().getContextPath(), CmsSetupBean.FOLDER_SETUP, name);
Resource resource = new ExternalResource(path);
return resource;
} | [
"Gets external resource for an HTML page in the setup-resources folder.\n\n@param context the context\n@param name the file name\n\n@return the resource for the HTML page"
] | [
"As we merge several operations into one operation, we need to be sure the write concern applied to the aggregated\noperation respects all the requirements expressed for each separate operation.\n\nThus, for each parameter of the write concern, we keep the stricter one for the resulting merged write concern.",
"Executes the rebalance plan. Does so batch-by-batch. Between each batch,\nstatus is dumped to logger.info.\n\n@param rebalancePlan",
"Print an extended attribute currency value.\n\n@param value currency value\n@return string representation",
"Read one collection element from the current row of the JDBC result set\n\n@param optionalOwner the collection owner\n@param optionalKey the collection key\n@param persister the collection persister\n@param descriptor the collection aliases\n@param rs the result set\n@param session the session\n@throws HibernateException if an error occurs\n@throws SQLException if an error occurs during the query execution",
"This produces a string with no compressed segments and all segments of full length,\nwhich is 3 characters for IPv4 segments.",
"Restore the recorded state from the rollback xml.\n\n@param target the patchable target\n@param rollbackPatchId the rollback patch id\n@param patchType the the current patch type\n@param history the recorded history\n@throws PatchingException",
"Given a list of store definitions, makes sure that rebalance supports all\nof them. If not it throws an error.\n\n@param storeDefList List of store definitions\n@return Filtered list of store definitions which rebalancing supports",
"Support the subscript operator for CharSequence.\n\n@param text a CharSequence\n@param index the index of the Character to get\n@return the Character at the given index\n@since 1.0",
"Checks to see if the token is in the list of allowed character operations. Used to apply order of operations\n@param token Token being checked\n@param ops List of allowed character operations\n@return true for it being in the list and false for it not being in the list"
] |
public void visitOpen(String packaze, int access, String... modules) {
if (mv != null) {
mv.visitOpen(packaze, access, modules);
}
} | [
"Visit an open package of the current module.\n\n@param packaze the qualified name of the opened package.\n@param access the access flag of the opened package,\nvalid values are among {@code ACC_SYNTHETIC} and\n{@code ACC_MANDATED}.\n@param modules the qualified names of the modules that can use deep\nreflection to the classes of the open package or\n<tt>null</tt>."
] | [
"Makes a DocumentReaderAndWriter based on the flags the CRFClassifier\nwas constructed with. Will create the flags.readerAndWriter and\ninitialize it with the CRFClassifier's flags.",
"We have received notification that a device is no longer on the network, so clear out its metadata.\n\n@param announcement the packet which reported the device’s disappearance",
"Sets the highlight strength for the InnerPaddingOutline.\n\n@param _highlightStrength The highlighting value for the outline.",
"Build a query to read the mn-implementors\n@param ids",
"Set keyboard done listener to detect when the user click \"DONE\" on his keyboard\n\n@param listener IntlPhoneInputListener",
"Checks whether a built of the indices is necessary.\n@param cms The appropriate CmsObject instance.\n@return true, if the spellcheck indices have to be rebuilt, otherwise false",
"Validates for non-conflicting roles",
"Transform the root bone of the pose by the given matrix.\n@param trans matrix to transform the pose by.",
"We have more input since wait started"
] |
public static Timer getNamedTotalTimer(String timerName) {
long totalCpuTime = 0;
long totalSystemTime = 0;
int measurements = 0;
int timerCount = 0;
int todoFlags = RECORD_NONE;
Timer previousTimer = null;
for (Map.Entry<Timer, Timer> entry : registeredTimers.entrySet()) {
if (entry.getValue().name.equals(timerName)) {
previousTimer = entry.getValue();
timerCount += 1;
totalCpuTime += previousTimer.totalCpuTime;
totalSystemTime += previousTimer.totalWallTime;
measurements += previousTimer.measurements;
todoFlags |= previousTimer.todoFlags;
}
}
if (timerCount == 1) {
return previousTimer;
} else {
Timer result = new Timer(timerName, todoFlags, 0);
result.totalCpuTime = totalCpuTime;
result.totalWallTime = totalSystemTime;
result.measurements = measurements;
result.threadCount = timerCount;
return result;
}
} | [
"Collect the total times measured by all known named timers of the given\nname. This is useful to add up times that were collected across separate\nthreads.\n\n@param timerName\n@return timer"
] | [
"Update artifact download url of an artifact\n\n@param gavc String\n@param downLoadUrl String",
"Parses a PDF document and serializes the resulting DOM tree to an output. This requires\na DOM Level 3 capable implementation to be available.",
"Make sure the result index points to the next available key in the scan result, if exists.",
"Determine the raw type for the given generic parameter type.\n@param genericType the generic type to resolve\n@param typeVariableMap the TypeVariable Map to resolved against\n@return the resolved raw type",
"Main method for testing fetching",
"Creates a combined list of Entries using the provided mapping file, and sorts them by\nfirst by priority, then the number of tokens in the regex.\n\n@param mapping The path to a file of mappings\n@return a sorted list of Entries",
"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.",
"Creates an temporary directory. The created directory will be deleted when\ncommand will ended.",
"Check that an array only contains elements that are not null.\n@param values, can't be null\n@return"
] |
private void attachLocaleGroups(CmsResource copiedPage) throws CmsException {
CmsLocaleGroupService localeGroupService = getRootCms().getLocaleGroupService();
if (Status.linkable == localeGroupService.checkLinkable(m_originalPage, copiedPage)) {
try {
localeGroupService.attachLocaleGroupIndirect(m_originalPage, copiedPage);
} catch (CmsException e) {
LOG.error(e.getLocalizedMessage(), e);
}
}
} | [
"Attaches locale groups to the copied page.\n@param copiedPage the copied page.\n@throws CmsException thrown if the root cms cannot be retrieved."
] | [
"Split a module Id to get the module version\n@param moduleId\n@return String",
"Returns true if the context has access to any given permissions.",
"In case we cannot delete a directory create a marker to recheck whether we can garbage collect some not\nreferenced directories and files.\n\n@param file the directory",
"Similar to masking, checks that the range resulting from the bitwise or is contiguous.\n\n@param maskValue\n@param segmentPrefixLength\n@return\n@throws PrefixLenException",
"gets the bytes, sharing the cached array and does not clone it",
"Execute for result.\n\n@param executionContext the execution context\n@return the result\n@throws IOException for any error",
"Set the directory and test that the directory exists and is contained within the Configuration\ndirectory.\n\n@param directory the new directory",
"Creates an observer\n\n@param method The observer method abstraction\n@param declaringBean The declaring bean\n@param manager The Bean manager\n@return An observer implementation built from the method abstraction",
"Returns a JSONObject keyed with the lastId retrieved and a value of a JSONArray of the retrieved JSONObject events\n\n@param table the table to read from\n@return JSONObject containing the max row ID and a JSONArray of the JSONObject events or null"
] |
public byte[] getByteArrayValue(int index)
{
byte[] result = null;
if (m_array[index] != null)
{
result = (byte[]) m_array[index];
}
return (result);
} | [
"This method retrieves a byte array containing the data at the\ngiven index in the block. If no data is found at the given index\nthis method returns null.\n\n@param index index of the data item to be retrieved\n@return byte array containing the requested data"
] | [
"Run the configured crawl. This method blocks until the crawl is done.\n\n@return the CrawlSession once the crawl is done.",
"Retrieve a work field.\n\n@param type field type\n@return Duration instance",
"Private function to allow looking for the field recursively up the superclasses.\n\n@param clazz\n@return",
"Creates a document for the resource without extracting the content. The aim is to get a content indexed,\neven if extraction runs into a timeout.\n\n@return the document for the resource generated if the content is discarded,\ni.e., only meta information are indexed.",
"adds a value to the list\n\n@param value the value",
"Extract resource assignments for a task.\n\n@param task parent task\n@param assignments list of Synchro resource assignment data",
"Retrieve the state object associated with the specified interceptor instance and property\nname on this request context.\n\n@param interceptor the interceptor instance\n@param stateName the name key that the state object was stored under\n@param stateType class of the type the stored state should be returned as\n@param <T> the type the stored state should be returned as\n@return the stored state object\n@see #setState(HttpConnectionInterceptor, String, Object)\n@since 2.6.0",
"Processes one dump file with the given dump file processor, handling\nexceptions appropriately.\n\n@param dumpFile\nthe dump file to process\n@param dumpFileProcessor\nthe dump file processor to use",
"Create the Grid Point style."
] |
public static void log(String label, Class<?> klass, Map<String, Object> map)
{
if (LOG != null)
{
LOG.write(label);
LOG.write(": ");
LOG.println(klass.getSimpleName());
for (Map.Entry<String, Object> entry : map.entrySet())
{
LOG.println(entry.getKey() + ": " + entry.getValue());
}
LOG.println();
LOG.flush();
}
} | [
"Log table contents.\n\n@param label label text\n@param klass reader class name\n@param map table data"
] | [
"Retrieves the index of a cost rate table entry active on a given date.\n\n@param date target date\n@return cost rate table entry index",
"Cut all characters from maxLength and replace it with \"...\"",
"Use this API to fetch the statistics of all gslbservice_stats resources that are configured on netscaler.",
"Read correlation id.\n\n@param message the message\n@return correlation id from the message",
"Get the label distance..\n\n@param settings Parameters for rendering the scalebar.",
"if |a11-a22| >> |a12+a21| there might be a better way. see pg371",
"Use this API to unset the properties of systemuser resource.\nProperties that need to be unset are specified in args array.",
"Checks the preconditions for creating a new ForbidSubStr processor with a List of forbidden substrings.\n\n@param forbiddenSubStrings\nthe forbidden substrings\n@throws NullPointerException\nif forbiddenSubStrings is null\n@throws IllegalArgumentException\nif forbiddenSubStrings is empty",
"Removes empty space when \"fitToContent\" is true and real height of object is\ntaller than current bands height, otherwise, it is not modified\n\n@param band\n@param currHeigth\n@param fitToContent"
] |
private void readCalendar(Calendar calendar)
{
// Create the calendar
ProjectCalendar mpxjCalendar = m_projectFile.addCalendar();
mpxjCalendar.setName(calendar.getName());
// Default all days to working
for (Day day : Day.values())
{
mpxjCalendar.setWorkingDay(day, true);
}
// Mark non-working days
List<NonWork> nonWorkingDays = calendar.getNonWork();
for (NonWork nonWorkingDay : nonWorkingDays)
{
// TODO: handle recurring exceptions
if (nonWorkingDay.getType().equals("internal_weekly"))
{
mpxjCalendar.setWorkingDay(nonWorkingDay.getWeekday(), false);
}
}
// Add default working hours for working days
for (Day day : Day.values())
{
if (mpxjCalendar.isWorkingDay(day))
{
ProjectCalendarHours hours = mpxjCalendar.addCalendarHours(day);
hours.addRange(ProjectCalendarWeek.DEFAULT_WORKING_MORNING);
hours.addRange(ProjectCalendarWeek.DEFAULT_WORKING_AFTERNOON);
}
}
} | [
"This method extracts data for a single calendar from a Phoenix file.\n\n@param calendar calendar data"
] | [
"Use this API to clear configuration on netscaler.\n@param force clear confirmation without prompting.\n@param level clear config according to the level. eg: basic, extended, full\n@return status of the operation performed.\n@throws Exception Nitro exception is thrown.",
"Log column data.\n\n@param column column data",
"Retrieve a UUID from an input stream.\n\n@param is input stream\n@return UUID instance",
"Main method for testing fetching",
"Builds a string that serializes a list of objects separated by the pipe\ncharacter. The toString methods are used to turn objects into strings.\nThis operation is commonly used to build parameter lists for API\nrequests.\n\n@param objects\nthe objects to implode\n@return string of imploded objects",
"Returns the log message id used by this checker. This is used to group it so that all attributes failing a type of rejction\nend up in the same error message. This default implementation uses the formatted log message with an empty attribute map as the id.\n\n@return the log message id",
"Get the AuthInterface.\n\n@return The AuthInterface",
"Adds a new Token to the end of the linked list",
"compare between two points."
] |
public static void pow(ComplexPolar_F64 a , int N , ComplexPolar_F64 result )
{
result.r = Math.pow(a.r,N);
result.theta = N*a.theta;
} | [
"Computes the power of a complex number in polar notation\n\n@param a Complex number\n@param N Power it is to be multiplied by\n@param result Result"
] | [
"Use this API to fetch all the policydataset resources that are configured on netscaler.",
"Retrieve the details of a single project from the database.\n\n@param result Map instance containing the results\n@param row result set row read from the database",
"Common mechanism to convert Synchro commentary recorss into notes.\n\n@param rows commentary table rows\n@return note text",
"Gets a SerialMessage with the SENSOR_ALARM_SUPPORTED_GET command\n@return the serial message, or null if the supported command is not supported.",
"Remove the realm name block.\n\n@see PropertiesFileLoader#addLineContent(java.io.BufferedReader, java.util.List, String)",
"Print a a basic type t",
"Allocates a database connection.\n\n@throws SQLException",
"Sets the SyncFrequency on this collection.\n\n@param syncFrequency the SyncFrequency that contains all the desired options\n\n@return A Task that completes when the SyncFrequency has been updated",
"Write an attribute name.\n\n@param name attribute name"
] |
public static void startCheck(String extra) {
startCheckTime = System.currentTimeMillis();
nextCheckTime = startCheckTime;
Log.d(Log.SUBSYSTEM.TRACING, "FPSCounter" , "[%d] startCheck %s", startCheckTime, extra);
} | [
"Start check of execution time\n@param extra"
] | [
"Changes to a new sub-view and stores a report to be displayed by that subview.<p<\n\n@param newState the new state\n@param thread the report thread which should be displayed in the sub view\n@param label the label to display for the report",
"Get a list of referring domains for a photo.\n\n@param date\n(Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will\nautomatically be rounded down to the start of the day.\n@param photoId\n(Optional) The id of the photo to get stats for. If not provided, stats for all photos will be returned.\n@param perPage\n(Optional) Number of domains to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.\n@param page\n(Optional) The page of results to return. If this argument is omitted, it defaults to 1.\n@see \"http://www.flickr.com/services/api/flickr.stats.getPhotoDomains.html\"",
"Delete an index with the specified name and type in the given design document.\n\n@param indexName name of the index\n@param designDocId ID of the design doc (the _design prefix will be added if not present)\n@param type type of the index, valid values or \"text\" or \"json\"",
"Get the column name from the indirection table.\n@param mnAlias\n@param path",
"Use this API to update dbdbprofile.",
"Gets the global and adds it ot the BatchExecutionresults using the alternative outIdentifier.\n\n@param identifier\nThe identifier of the global\n@param outIdentifier\nThe identifier used in the ExecutionResults to store the global.\n@return",
"Build a stack trace for this path. This can be used in generating more meaningful exceptions\nwhile using Crawljax in conjunction with JUnit for example.\n\n@return a array of StackTraceElements denoting the steps taken by this path. The first\nelement [0] denotes the last {@link Eventable} on this path while the last item\ndenotes the first {@link Eventable} executed.",
"GetJob helper - String predicates are all created the same way, so this factors some code.",
"Print duration in tenths of minutes.\n\n@param duration Duration instance\n@return duration in tenths of minutes"
] |
public CollectionRequest<Task> findByProject(String projectId) {
String path = String.format("/projects/%s/tasks", projectId);
return new CollectionRequest<Task>(this, Task.class, path, "GET");
} | [
"Returns the compact task records for all tasks within the given project,\nordered by their priority within the project.\n\n@param projectId The project in which to search for tasks.\n@return Request object"
] | [
"generate a prepared INSERT-Statement for the Class\ndescribed by cld.\n\n@param cld the ClassDescriptor",
"Changes the vertex buffer associated with this mesh.\n@param vbuf new vertex buffer to use\n@see #setVertices(float[])\n@see #getVertexBuffer()\n@see #getVertices()",
"Returns a name for the principal based upon one of the attributes\nof the main CommonProfile. The attribute name used to query the CommonProfile\nis specified in the constructor.\n\n@return a name for the Principal or null if the attribute is not populated.",
"Returns the list of user defined attribute names.\n\n@return the list of user defined attribute names, if there are none it returns an empty set.",
"Return all URI schemes that are supported in the system.",
"Encodes the given URI fragment with the given encoding.\n@param fragment the fragment to be encoded\n@param encoding the character encoding to encode to\n@return the encoded fragment\n@throws UnsupportedEncodingException when the given encoding parameter is not supported",
"Write the table configuration to a buffered writer.",
"This method is called to alert project listeners to the fact that\na calendar has been written to a project file.\n\n@param calendar calendar instance",
"Wraps a linear solver of any type with a safe solver the ensures inputs are not modified"
] |
public void onDrawFrame(float frameTime)
{
if (isEnabled() && (mScene != null) && mPickEventLock.tryLock())
{
// Don't call if we are in the middle of processing another pick
try
{
doPick();
}
finally
{
mPickEventLock.unlock();
}
}
} | [
"Called every frame if the picker is enabled\nto generate pick events.\n@param frameTime starting time of the current frame"
] | [
"Use this API to create ssldhparam.",
"Ensures that the element is child element of the parent element.\n\n@param parentElement the parent xml dom element\n@param childElement the child element\n@throws SpinXmlElementException if the element is not child of the parent element",
"Sends a text message using given server setup for SMTP.\n\n@param to the to address.\n@param from the from address.\n@param subject the subject.\n@param msg the test message.\n@param setup the SMTP setup.",
"returns IsolationLevel literal as matching\nto the corresponding id\n@return the IsolationLevel literal",
"Use this API to add gslbsite resources.",
"Set the view frustum to pick against from the given projection matrix.\n\nIf the projection matrix is null, the picker will revert to picking\nobjects that are visible from the viewpoint of the scene's current camera.\nIf a matrix is given, the picker will pick objects that are visible\nfrom the viewpoint of it's owner the given projection matrix.\n\n@param projMatrix 4x4 projection matrix or null\n@see GVRScene#setPickVisible(boolean)",
"make it public for CLI interaction to reuse JobContext",
"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",
"Shows the given step.\n\n@param step the step"
] |
public static base_response add(nitro_service client, systemuser resource) throws Exception {
systemuser addresource = new systemuser();
addresource.username = resource.username;
addresource.password = resource.password;
addresource.externalauth = resource.externalauth;
addresource.promptstring = resource.promptstring;
addresource.timeout = resource.timeout;
return addresource.add_resource(client);
} | [
"Use this API to add systemuser."
] | [
"Parse a list of Photos from given Element.\n\n@param photosElement\n@return PhotoList",
"Helper method used to peel off spurious wrappings of DateTimeException\n\n@param e DateTimeException to peel\n\n@return DateTimeException that does not have another DateTimeException as its cause.",
"Given a symmetric matrix which is represented by a lower triangular matrix convert it back into\na full symmetric matrix.\n\n@param A (Input) Lower triangular matrix (Output) symmetric matrix",
"Create a new path address by appending more elements to the end of this address.\n\n@param additionalElements the elements to append\n@return the new path address",
"Sets the left padding character for all cells in the row.\n@param paddingLeftChar new padding character, ignored if null\n@return this to allow chaining",
"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.",
"Returns a list of Elements form the DOM tree, matching the tag element.",
"Leave a group.\n\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.leave.html\">lickr.groups.leave</a> for a description of the various behaviors possible\nwhen a user leaves a group.\n\n@param groupId\n- the id of the group to leave\n@param deletePhotos\n- delete photos by this user from group",
"Detach the component of the specified type from this scene object.\n\nEach scene object has a list of components. Only one component\nof a particular type can be attached. Components are detached based on their type.\n\n@return GVRComponent detached or null if component not found\n@param type type of component to detach\n@see GVRSceneObject#attachComponent(GVRComponent)"
] |
public ItemRequest<ProjectStatus> findById(String projectStatus) {
String path = String.format("/project_statuses/%s", projectStatus);
return new ItemRequest<ProjectStatus>(this, ProjectStatus.class, path, "GET");
} | [
"Returns the complete record for a single status update.\n\n@param projectStatus The project status update to get.\n@return Request object"
] | [
"Isn't there a method for this in GeoTools?\n\n@param crs\nCRS string in the form of 'EPSG:<srid>'.\n@return SRID as integer.",
"Init the headers of the table regarding the filters\n\n@return String[]",
"Checks if the last argument matches the vararg type.\n@param params\n@param args\n@return -1 if no match, 0 if the last argument is exactly the vararg type and 1 if of an assignable type",
"This method is called to format a constraint type.\n\n@param type constraint type\n@return formatted constraint type",
"Maps the text representation of column data to Java types.\n\n@param table table name\n@param column column name\n@param data text representation of column data\n@param type column data type\n@param epochDateFormat true if date is represented as an offset from an epoch\n@return Java representation of column data\n@throws MPXJException",
"Use this API to add clusterinstance.",
"Set the individual dates where the event should take place.\n@param dates the dates to set.",
"Main file parser. Reads GIF content blocks. Stops after reading maxFrames",
"Sets an attribute in a non-main section of the manifest.\n\n@param section the section's name\n@param name the attribute's name\n@param value the attribute's value\n@return {@code this}\n@throws IllegalStateException if entries have been added or the JAR has been written prior to calling this methods."
] |
public static String escapeDoubleQuotesForJson(String text) {
if ( text == null ) {
return null;
}
StringBuilder builder = new StringBuilder( text.length() );
for ( int i = 0; i < text.length(); i++ ) {
char c = text.charAt( i );
switch ( c ) {
case '"':
case '\\':
builder.append( "\\" );
default:
builder.append( c );
}
}
return builder.toString();
} | [
"If a text contains double quotes, escape them.\n\n@param text the text to escape\n@return Escaped text or {@code null} if the text is null"
] | [
"Throws one RendererException if the content parent or layoutInflater are null.",
"Request metadata for a specific track ID, given a dbserver connection to a player that has already been set up.\nSeparated into its own method so it could be used multiple times with the same connection when gathering\nall track metadata.\n\n@param track uniquely identifies the track whose metadata is desired\n@param trackType identifies the type of track being requested, which affects the type of metadata request\nmessage that must be used\n@param client the dbserver client that is communicating with the appropriate player\n\n@return the retrieved metadata, or {@code null} if there is no such track\n\n@throws IOException if there is a communication problem\n@throws InterruptedException if the thread is interrupted while trying to lock the client for menu operations\n@throws TimeoutException if we are unable to lock the client for menu operations",
"This method formats a time unit.\n\n@param timeUnit time unit instance\n@return formatted time unit instance",
"Appends the accumulated words to the resulting words. Trailing whitespace is removed because of the\npostprocessing that inserts custom whitespace\n\n@param currentWords is the {@link StringBuilder} of the accumulated words\n@param formattedWords is the list that is being appended to",
"Execute for result.\n\n@param executionContext the execution context\n@return the result\n@throws IOException for any error",
"Puts a new document in the service. The generate key is globally unique.\n\n@param document document\n@return key unique key to reference the document",
"Checks the given class descriptor for correct object cache setting.\n\n@param classDef The class descriptor\n@param checkLevel The current check level (this constraint is only checked in strict)\n@exception ConstraintException If the constraint has been violated",
"Checks if a parameter exists. If it exists, it is updated. If it doesn't, it is created. Only works for parameters which key is\nunique. Will create a transaction on the given entity manager.",
"Get all Groups\n\n@return\n@throws Exception"
] |
public String getDbProperty(String key) {
// extract the database key out of the entire key
String databaseKey = key.substring(0, key.indexOf('.'));
Properties databaseProperties = getDatabaseProperties().get(databaseKey);
return databaseProperties.getProperty(key, "");
} | [
"Returns the value for a given key from the database properties.\n\n@param key the property key\n\n@return the string value for a given key"
] | [
"Calls the specified Stitch function.\n\n@param name the name of the Stitch function to call.\n@param args the arguments to pass to the Stitch function.\n@param requestTimeout the number of milliseconds the client should wait for a response from the\nserver before failing with an error.",
"Renders the given FreeMarker template to given directory, using given variables.",
"Generates a diagonal matrix with the input vector on its diagonal\n\n@param vector The given matrix A.\n@return diagonalMatrix The matrix with the vectors entries on its diagonal",
"Main entry point used to determine the format used to write\ncalendar exceptions.\n\n@param calendar parent calendar\n@param dayList list of calendar days\n@param exceptions list of exceptions",
"Splits the given string.",
"Use this API to delete dnstxtrec of given name.",
"Given counters of true positives, false positives, and false\nnegatives, prints out precision, recall, and f1 for each key.",
"Informs this sequence model that the value of the element at position pos has changed.\nThis allows this sequence model to update its internal model if desired.",
"Check if the given class represents an array of primitive wrappers,\ni.e. Boolean, Byte, Character, Short, Integer, Long, Float, or Double.\n@param clazz the class to check\n@return whether the given class is a primitive wrapper array class"
] |
public void generateWBS(Task parent)
{
String wbs;
if (parent == null)
{
if (NumberHelper.getInt(getUniqueID()) == 0)
{
wbs = "0";
}
else
{
wbs = Integer.toString(getParentFile().getChildTasks().size() + 1);
}
}
else
{
wbs = parent.getWBS();
//
// Apparently I added the next lines to support MPX files generated by Artemis, back in 2005
// Unfortunately I have no test data which exercises this code, and it now breaks
// otherwise valid WBS values read (in this case) from XER files. So it's commented out
// until someone complains about their 2005-era Artemis MPX files not working!
//
// int index = wbs.lastIndexOf(".0");
// if (index != -1)
// {
// wbs = wbs.substring(0, index);
// }
int childTaskCount = parent.getChildTasks().size() + 1;
if (wbs.equals("0"))
{
wbs = Integer.toString(childTaskCount);
}
else
{
wbs += ("." + childTaskCount);
}
}
setWBS(wbs);
} | [
"This method is used to automatically generate a value\nfor the WBS field of this task.\n\n@param parent Parent Task"
] | [
"Creates a field map for relations.\n\n@param props props data",
"The fields returned by default. Typically the output is done via display formatters and hence nearly no\nfield is necessary. Returning all fields might cause performance problems.\n\n@return the default return fields.",
"Put object to session cache.\n\n@param oid The {@link org.apache.ojb.broker.Identity} of the object to cache\n@param entry The {@link org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.CacheEntry} of the object\n@param onlyIfNew Flag, if set <em>true</em> only new objects (not already in session cache) be cached.",
"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",
"Retrieve the number of minutes per month for this calendar.\n\n@return minutes per month",
"Do some magic to turn request parameters into a context object",
"Use this API to create sslfipskey resources.",
"This utility displays a list of available task filters, and a\nlist of available resource filters.\n\n@param project project file",
"Configure all UI elements in the \"ending\"-options panel."
] |
private String alterPrefix(String word, String oldPrefix, String newPrefix) {
if (word.startsWith(oldPrefix)) {
return word.replaceFirst(oldPrefix, newPrefix);
}
return (newPrefix + word);
} | [
"Manipulates a string by cutting of a prefix, if present, and adding a new prefix.\n\n@param word the string to be manipulated\n@param oldPrefix the old prefix that should be replaced\n@param newPrefix the new prefix that is added\n@return the manipulated string"
] | [
"build the Join-Information if a super reference exists\n\n@param left\n@param cld\n@param name",
"Mbeans for FETCH_KEYS",
"Use this API to fetch vpnsessionaction resource of given name .",
"Adds a new metadata value.\n@param path the path that designates the key. Must be prefixed with a \"/\".\n@param value the value.\n@return this metadata object.",
"Use this API to fetch sslcipher resource of given name .",
"Checks all data sets in IIM records 1, 2 and 3 for constraint violations.\n\n@return list of constraint violations, empty set if IIM file is valid",
"Read activities.",
"Uploads a new large file.\n@param boxApi the API connection to be used by the upload session.\n@param folderId the id of the folder in which the file will be uploaded.\n@param stream the input stream that feeds the content of the file.\n@param url the upload session URL.\n@param fileName the name of the file to be created.\n@param fileSize the total size of the file.\n@return the created file instance.\n@throws InterruptedException when a thread gets interupted.\n@throws IOException when reading a stream throws exception.",
"Get all views from the list content\n@return list of views currently visible"
] |
protected List<String> parseOptionalStringValues(final String path) {
final List<I_CmsXmlContentValue> values = m_xml.getValues(path, m_locale);
if (values == null) {
return null;
} else {
List<String> stringValues = new ArrayList<String>(values.size());
for (I_CmsXmlContentValue value : values) {
stringValues.add(value.getStringValue(null));
}
return stringValues;
}
} | [
"Helper to read an optional 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."
] | [
"Use this API to unset the properties of systemcollectionparam resource.\nProperties that need to be unset are specified in args array.",
"calculate the point a's angle of rectangle consist of point a,point b, point c;\n\n@param vertex\n@param A\n@param B\n@return",
"Get the names of the currently registered format providers.\n\n@return the provider names, never null.",
"Function to perform backward softmax",
"Get the SPIProviderResolver instance using the provided classloader for lookup\n\n@param cl classloader to use for lookup\n@return instance of this class",
"Use this API to fetch crvserver_policymap_binding resources of given name .",
"Checks if the given String is null or contains only whitespaces.\nThe String is trimmed before the empty check.\n\n@param argument the String to check for null or emptiness\n@param argumentName the name of the argument to check.\nThis is used in the exception message.\n@return the String that was given as argument\n@throws IllegalArgumentException in case argument is null or empty",
"Create a Date instance representing a specific time.\n\n@param hour hour 0-23\n@param minutes minutes 0-59\n@return new Date instance",
"Reads the NTriples file from the reader, pushing statements into\nthe handler."
] |
public void setKnotBlend(int n, int type) {
knotTypes[n] = (byte)((knotTypes[n] & ~BLEND_MASK) | type);
rebuildGradient();
} | [
"Set a knot blend type.\n@param n the knot index\n@param type the knot blend type\n@see #getKnotBlend"
] | [
"Use this API to fetch sslocspresponder resource of given name .",
"Marks a given list of statements for insertion into the current document.\nInserted statements can have an id if they should update an existing\nstatement, or use an empty string as id if they should be added. The\nmethod removes duplicates and avoids unnecessary modifications by\nchecking the current content of the given document before marking\nstatements for being written.\n\n@param currentDocument\nthe document with the current statements\n@param addStatements\nthe list of new statements to be added",
"Stops listening. Safe to call when already stopped. Ignored on devices\nwithout appropriate hardware.",
"Translate a path that has previously been unescaped and unquoted.\nThat is called at command execution when the calue is retrieved prior to be\nused as ModelNode value.\n@param path The unquoted, unescaped path.\n@return A path with ~ and default dir expanded.",
"Deletes the specified shovel from specified virtual host.\n\n@param vhost virtual host from where to delete the shovel\n@param shovelname Shovel to be deleted.",
"Extract child task data.\n\n@param task MPXJ task\n@param row Synchro task data",
"Starts the ephemeral node and waits for it to be created\n\n@param node Node to start\n@param maxWaitSec Maximum time in seconds to wait",
"Check that each group is satisfied by one and only one field.\n\n@param currentPath the json path to the element being checked",
"For use on a slave HC to get all the server groups used by the host\n\n@param hostResource the host resource\n@return the server configs on this host"
] |
public static base_responses save(nitro_service client, cachecontentgroup resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
cachecontentgroup saveresources[] = new cachecontentgroup[resources.length];
for (int i=0;i<resources.length;i++){
saveresources[i] = new cachecontentgroup();
saveresources[i].name = resources[i].name;
}
result = perform_operation_bulk_request(client, saveresources,"save");
}
return result;
} | [
"Use this API to save cachecontentgroup resources."
] | [
"Translate this rectangle over the specified following distances.\n\n@param rect rectangle to move\n@param dx delta x\n@param dy delta y",
"Reads the XER file table and row structure ready for processing.\n\n@param is input stream\n@throws MPXJException",
"Detects if the current browser is a Sony Mylo device.\n@return detection of a Sony Mylo device",
"Attaches a morph to scene object with a base mesh\n@param sceneObj is the base mesh.\n@throws IllegalStateException if component is null\n@throws IllegalStateException if mesh is null\n@throws IllegalStateException if material is null",
"Parses an RgbaColor from an rgb value.\n\n@return the parsed color",
"Returns a source excerpt of the type parameters of this type, including angle brackets.\nAlways an empty string if the type class is not generic.\n\n<p>e.g. {@code <N, C>}",
"If UPDATE, INSERT or DELETE, return BatchPreparedStatement,\notherwise return null.",
"Computes the MD5 value of the input stream\n\n@param input\n@return\n@throws IOException\n@throws IllegalStateException",
"Read a list of fixed sized blocks from the input stream.\n\n@return List of MapRow instances representing the fixed size blocks"
] |
public Module generateBuildInfoModule(Run build, TaskListener listener, ArtifactoryConfigurator config, String buildName, String buildNumber, String timestamp) throws IOException {
if (artifactsProps == null) {
artifactsProps = ArrayListMultimap.create();
}
artifactsProps.put("build.name", buildName);
artifactsProps.put("build.number", buildNumber);
artifactsProps.put("build.timestamp", timestamp);
String artifactsPropsStr = ExtractorUtils.buildPropertiesString(artifactsProps);
Properties buildInfoItemsProps = new Properties();
buildInfoItemsProps.setProperty("build.name", buildName);
buildInfoItemsProps.setProperty("build.number", buildNumber);
buildInfoItemsProps.setProperty("build.timestamp", timestamp);
ArtifactoryServer server = config.getArtifactoryServer();
CredentialsConfig preferredResolver = server.getDeployerCredentialsConfig();
ArtifactoryDependenciesClient dependenciesClient = null;
ArtifactoryBuildInfoClient propertyChangeClient = null;
try {
dependenciesClient = server.createArtifactoryDependenciesClient(
preferredResolver.provideUsername(build.getParent()), preferredResolver.providePassword(build.getParent()),
server.createProxyConfiguration(Jenkins.getInstance().proxy), listener);
CredentialsConfig preferredDeployer = CredentialManager.getPreferredDeployer(config, server);
propertyChangeClient = server.createArtifactoryClient(
preferredDeployer.provideUsername(build.getParent()), preferredDeployer.providePassword(build.getParent()),
server.createProxyConfiguration(Jenkins.getInstance().proxy));
Module buildInfoModule = new Module();
buildInfoModule.setId(imageTag.substring(imageTag.indexOf("/") + 1));
// If manifest and imagePath not found, return.
if ((StringUtils.isEmpty(manifest) || StringUtils.isEmpty(imagePath)) && !findAndSetManifestFromArtifactory(server, dependenciesClient, listener)) {
return buildInfoModule;
}
listener.getLogger().println("Fetching details of published docker layers from Artifactory...");
boolean includeVirtualReposSupported = propertyChangeClient.getArtifactoryVersion().isAtLeast(VIRTUAL_REPOS_SUPPORTED_VERSION);
DockerLayers layers = createLayers(dependenciesClient, includeVirtualReposSupported);
listener.getLogger().println("Tagging published docker layers with build properties in Artifactory...");
setDependenciesAndArtifacts(buildInfoModule, layers, artifactsPropsStr, buildInfoItemsProps,
dependenciesClient, propertyChangeClient, server);
setBuildInfoModuleProps(buildInfoModule);
return buildInfoModule;
} finally {
if (dependenciesClient != null) {
dependenciesClient.close();
}
if (propertyChangeClient != null) {
propertyChangeClient.close();
}
}
} | [
"Generates the build-info module for this docker image.\nAdditionally. this method tags the deployed docker layers with properties,\nsuch as build.name, build.number and custom properties defined in the Jenkins build.\n@param build\n@param listener\n@param config\n@param buildName\n@param buildNumber\n@param timestamp\n@return\n@throws IOException"
] | [
"Starts the compressor.",
"This method extracts task data from an MSPDI file.\n\n@param project Root node of the MSPDI file",
"Returns the value of the matrix at the specified index of the 1D row major array.\n\n@see DMatrixRMaj#get(int)\n\n@param index The element's index whose value is to be returned\n@return The value of the specified element.",
"Checks whether a built of the indices is necessary.\n@param cms The appropriate CmsObject instance.\n@return true, if the spellcheck indices have to be rebuilt, otherwise false",
"copied and altered from TransactionHelper",
"Sets the specified starting partition key.\n\n@param paging a paging state",
"Sets the license for a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo to update the license for.\n@param licenseId\nThe license to apply, or 0 (zero) to remove the current license.\n@throws FlickrException",
"Read a short int from an input stream.\n\n@param is input stream\n@return int value",
"Given a rebalance-task info, convert it into the protobuf equivalent\n\n@param stealInfo Rebalance task info\n@return Protobuf equivalent of the same"
] |
public static AccessorPrefix determineAccessorPrefix(@Nonnull final String methodName) {
Check.notEmpty(methodName, "methodName");
final Matcher m = PATTERN.matcher(methodName);
Check.stateIsTrue(m.find(), "passed method name '%s' is not applicable", methodName);
return new AccessorPrefix(m.group(1));
} | [
"Determines the prefix of an accessor method based on an accessor method name.\n\n@param methodName\nan accessor method name\n@return the resulting prefix"
] | [
"This method returns an array containing all of the unique identifiers\nfor which data has been stored in the Var2Data block.\n\n@return array of unique identifiers",
"Produces or returns the existing proxy class. The operation is thread-safe.\n\n@return always the class of the proxy",
"Creates an endpoint reference from a given adress.\n@param address\n@param props\n@return",
"Creates a new Message from the specified text.",
"Convert a field value to something suitable to be stored in the database.",
"Sets the segment reject as a string. This method is for convenience\nto be able to set percent reject type just by calling with '3%' and\notherwise it uses rows. All this assuming that parsing finds '%' characher\nand is able to parse a raw reject number.\n\n@param reject the new segment reject",
"Populate the supplied response with the model representation of the certificates.\n\n@param result the response to populate.\n@param certificates the certificates to add to the response.\n@throws CertificateEncodingException\n@throws NoSuchAlgorithmException",
"Write the domain controller's data to an output stream.\n\n@param outstream the output stream\n@throws Exception",
"Processes a runtime procedure argument tag.\n\n@param template The template\n@param attributes The attributes of the tag\n@exception XDocletException If an error occurs\[email protected] type=\"content\"\[email protected] name=\"attributes\" optional=\"true\" description=\"Attributes of the procedure as name-value pairs 'name=value',\nseparated by commas\"\[email protected] name=\"documentation\" optional=\"true\" description=\"Documentation on the procedure\"\[email protected] name=\"field-ref\" optional=\"true\" description=\"Identifies the field that provides the value\nif a runtime argument; if not set, then null is used\"\[email protected] name=\"name\" optional=\"false\" description=\"The identifier of the argument tag\"\[email protected] name=\"return\" optional=\"true\" description=\"Whether this is a return value (if a runtime argument)\"\nvalues=\"true,false\"\[email protected] name=\"value\" optional=\"false\" description=\"The value if a constant argument\""
] |
public List<ServerGroup> getServerGroups() {
ArrayList<ServerGroup> groups = new ArrayList<ServerGroup>();
try {
JSONObject response = new JSONObject(doGet(BASE_SERVERGROUP, null));
JSONArray serverArray = response.getJSONArray("servergroups");
for (int i = 0; i < serverArray.length(); i++) {
JSONObject jsonServerGroup = serverArray.getJSONObject(i);
ServerGroup group = getServerGroupFromJSON(jsonServerGroup);
groups.add(group);
}
} catch (Exception e) {
e.printStackTrace();
return null;
}
return groups;
} | [
"Get the collection of the server groups\n\n@return Collection of active server groups"
] | [
"Set the host running the Odo instance to configure\n\n@param hostName name of host",
"Determines the feature state\n\n@param context the template context\n@param tag the tag\n@param attributeName the attribute name\n@param attributeValue the attribute value\n@param defaultState the default state if the expression evaluates to null\n@return the feature state",
"Confirms a user with the given token and token id.\n\n@param token the confirmation token.\n@param tokenId the id of the confirmation token.\n@return A {@link Task} that completes when confirmation completes/fails.",
"Gets or creates the a resource for the sub-deployment on the parent deployments resource.\n\n@param deploymentName the name of the deployment\n@param parent the parent deployment used to find the parent resource\n\n@return the already registered resource or a newly created resource",
"Entry point with no system exit",
"Use this API to fetch all the nsacl6 resources that are configured on netscaler.",
"Use this API to fetch all the sslcertkey resources that are configured on netscaler.",
"Undo a prior removal using the supplied undo key.\n\n@param removalKey - The key returned from the call to removeRoleMapping.\n@return true if the undo was successful, false otherwise.",
"Initialize new instance\n@param instance\n@param logger\n@param auditor"
] |
public void copyTo(ColumnBuffer dest, LongPredicate timestampTest) {
dest.clear();
if (key != null) {
dest.key = new Key(key);
}
for (int i = 0; i < timeStamps.size(); i++) {
long time = timeStamps.get(i);
if (timestampTest.test(time)) {
dest.add(time, values.get(i));
}
}
} | [
"Clears the dest ColumnBuffer and inserts all entries in dest where the timestamp passes the\ntimestampTest.\n\n@param dest Destination ColumnBuffer\n@param timestampTest Test to determine which timestamps get added to dest"
] | [
"Returns true if the activity is a milestone.\n\n@param activity Phoenix activity\n@return true if the activity is a milestone",
"When creating image columns\n@return",
"do the parsing on an JSONObject, assumes that the json is hierarchical\nordered, so all shapes are reachable over child relations\n@param json hierarchical JSON object\n@return Model with all shapes defined in JSON\n@throws org.json.JSONException",
"Ignore some element from the AST\n\n@param element\n@return",
"Add new control at the control bar with specified touch listener, resource and position.\nSize of control bar is updated based on new number of controls.\n@param name name of the control to remove\n@param resId the control face\n@param listener touch listener\n@param position control position in the bar",
"Extracts a numeric id from a string, which can be either a Wikidata\nentity URI or a short entity or property id.\n\n@param idString\n@param isUri\n@return numeric id, or 0 if there was an error",
"Use this API to add dnspolicylabel.",
"Get ComponentsMultiThread of current instance\n@return componentsMultiThread",
"Update the default time unit for durations based on data read from the file.\n\n@param column column data"
] |
private boolean isAllOrDirtyOptLocking() {
EntityMetamodel entityMetamodel = getEntityMetamodel();
return entityMetamodel.getOptimisticLockStyle() == OptimisticLockStyle.DIRTY
|| entityMetamodel.getOptimisticLockStyle() == OptimisticLockStyle.ALL;
} | [
"Copied from AbstractEntityPersister"
] | [
"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",
"Write an int to the byte array starting at the given offset\n\n@param bytes The byte array\n@param value The int to write\n@param offset The offset to begin writing at",
"Gets any app users that has an exact match with the externalAppUserId term.\n@param api the API connection to be used when retrieving the users.\n@param externalAppUserId the external app user id that has been set for app user\n@param fields the fields to retrieve. Leave this out for the standard fields.\n@return an iterable containing users matching the given email",
"Remove all unnecessary comments from a lexer or parser file",
"Retrieve the details of a single project from the database.\n\n@param result Map instance containing the results\n@param row result set row read from the database",
"Get an exception reporting an unexpected end tag for an XML element.\n@param reader the stream reader\n@return the exception",
"Read custom property definitions for resources.\n\n@param gpResources GanttProject resources",
"Gets the object whose index is the integer argument.\n\n@param i the integer index to be queried for the corresponding argument\n@return the object whose index is the integer argument.",
"Returns a diagonal matrix with the specified diagonal elements.\n@param values values of diagonal elements\n@return A diagonal matrix"
] |
private static void waitUntilFinished(FluoConfiguration config) {
try (Environment env = new Environment(config)) {
List<TableRange> ranges = getRanges(env);
outer: while (true) {
long ts1 = env.getSharedResources().getOracleClient().getStamp().getTxTimestamp();
for (TableRange range : ranges) {
boolean sawNotifications = waitTillNoNotifications(env, range);
if (sawNotifications) {
ranges = getRanges(env);
// This range had notifications. Processing those notifications may have created
// notifications in previously scanned ranges, so start over.
continue outer;
}
}
long ts2 = env.getSharedResources().getOracleClient().getStamp().getTxTimestamp();
// Check to ensure the Oracle issued no timestamps during the scan for notifications.
if (ts2 - ts1 == 1) {
break;
}
}
} catch (Exception e) {
log.error("An exception was thrown -", e);
System.exit(-1);
}
} | [
"Wait until a scan of the table completes without seeing notifications AND without the Oracle\nissuing any timestamps during the scan."
] | [
"Get a list of all active server mappings defined for current profile\n\n@return Collection of ServerRedirects",
"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}",
"Create the index file that sets up the frameset.\n@param outputDirectory The target directory for the generated file(s).",
"Initializes unspecified sign properties using available defaults\nand global settings.",
"Return the item view type used by the adapter to implement recycle mechanism.\n\n@param content to be rendered.\n@return an integer that represents the renderer inside the adapter.",
"Returns the compact records for all teams to which user is assigned.\n\n@param user An identifier for the user. Can be one of an email address,\nthe globally unique identifier for the user, or the keyword `me`\nto indicate the current user making the request.\n@return Request object",
"Use this API to create sslfipskey resources.",
"Get the exception message using the requested locale.\n\n@param locale locale for message\n@return exception message",
"When an alias for a field is added, index it here to allow lookup by alias and type.\n\n@param type field type\n@param alias field alias"
] |
public static base_response add(nitro_service client, nspbr6 resource) throws Exception {
nspbr6 addresource = new nspbr6();
addresource.name = resource.name;
addresource.td = resource.td;
addresource.action = resource.action;
addresource.srcipv6 = resource.srcipv6;
addresource.srcipop = resource.srcipop;
addresource.srcipv6val = resource.srcipv6val;
addresource.srcport = resource.srcport;
addresource.srcportop = resource.srcportop;
addresource.srcportval = resource.srcportval;
addresource.destipv6 = resource.destipv6;
addresource.destipop = resource.destipop;
addresource.destipv6val = resource.destipv6val;
addresource.destport = resource.destport;
addresource.destportop = resource.destportop;
addresource.destportval = resource.destportval;
addresource.srcmac = resource.srcmac;
addresource.protocol = resource.protocol;
addresource.protocolnumber = resource.protocolnumber;
addresource.vlan = resource.vlan;
addresource.Interface = resource.Interface;
addresource.priority = resource.priority;
addresource.state = resource.state;
addresource.msr = resource.msr;
addresource.monitor = resource.monitor;
addresource.nexthop = resource.nexthop;
addresource.nexthopval = resource.nexthopval;
addresource.nexthopvlan = resource.nexthopvlan;
return addresource.add_resource(client);
} | [
"Use this API to add nspbr6."
] | [
"Returns the compact records for all teams to which user is assigned.\n\n@param user An identifier for the user. Can be one of an email address,\nthe globally unique identifier for the user, or the keyword `me`\nto indicate the current user making the request.\n@return Request object",
"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",
"Method used to instantiate the appropriate input stream reader,\na standard one, or one which can deal with \"encrypted\" data.\n\n@param directory directory entry\n@param name file name\n@return new input stream\n@throws IOException",
"Map the Primavera UDF to a custom field.\n\n@param fieldType parent object type\n@param dataType UDF data type\n@param name UDF name\n@return FieldType instance",
"Wrap CallableStatement with a proxy.\n@param target statement handle\n@param connectionHandle originating bonecp connection\n@return Proxy to a Callablestatement.",
"Returns script view\n\n@param model\n@return\n@throws Exception",
"Get all field attributes in an unmodifiable Map, or null if no attributes have been added\n\n@return all field attributes, or <code>NULL</code> if none exist",
"Adds a node to this graph.\n\n@param node the node",
"Process an operand value used in the definition of the graphical\nindicator criteria.\n\n@param index position in operand list\n@param type field type\n@param criteria indicator criteria"
] |
private Number calculateUnitsPercentComplete(Row row)
{
double result = 0;
double actualWorkQuantity = NumberHelper.getDouble(row.getDouble("act_work_qty"));
double actualEquipmentQuantity = NumberHelper.getDouble(row.getDouble("act_equip_qty"));
double numerator = actualWorkQuantity + actualEquipmentQuantity;
if (numerator != 0)
{
double remainingWorkQuantity = NumberHelper.getDouble(row.getDouble("remain_work_qty"));
double remainingEquipmentQuantity = NumberHelper.getDouble(row.getDouble("remain_equip_qty"));
double denominator = remainingWorkQuantity + actualWorkQuantity + remainingEquipmentQuantity + actualEquipmentQuantity;
result = denominator == 0 ? 0 : ((numerator * 100) / denominator);
}
return NumberHelper.getDouble(result);
} | [
"Calculate the units percent complete.\n\n@param row task data\n@return percent complete"
] | [
"Use this API to unset the properties of nslimitselector resource.\nProperties that need to be unset are specified in args array.",
"Parses command-line and verifies metadata versions on all the cluster\nnodes\n\n@param args Command-line input\n@param printHelp Tells whether to print help only or execute command\nactually\n@throws IOException",
"Return a Halton number, sequence starting at index = 0, base > 1.\n\n@param index The index of the sequence.\n@param base The base of the sequence. Has to be greater than one (this is not checked).\n@return The Halton number.",
"Returns a reasonable timeout duration for a watch request.\n\n@param expectedTimeoutMillis timeout duration that a user wants to use, in milliseconds\n@param bufferMillis buffer duration which needs to be added, in milliseconds\n@return timeout duration in milliseconds, between the specified {@code bufferMillis} and\nthe {@link #MAX_MILLIS}.",
"Gets the default options to be passed when no custom properties are given.\n\n@return properties with formatter options",
"Build and return the complete URI containing values\nsuch as the document ID, attachment ID, and query syntax.",
"Specify the method to instantiate objects\nrepresented by this descriptor.\n@see #setFactoryClass",
"This method retrieves a double 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 double data",
"Retrieve a work field.\n\n@param type field type\n@return Duration instance"
] |
void parseWorkerThreadPool(final XMLExtendedStreamReader reader, final ModelNode subsystemAdd) throws XMLStreamException {
final int count = reader.getAttributeCount();
for (int i = 0; i < count; i++) {
requireNoNamespaceAttribute(reader, i);
final String value = reader.getAttributeValue(i);
final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
case WORKER_READ_THREADS:
if (subsystemAdd.hasDefined(CommonAttributes.WORKER_READ_THREADS)) {
throw duplicateAttribute(reader, CommonAttributes.WORKER_READ_THREADS);
}
RemotingSubsystemRootResource.WORKER_READ_THREADS.parseAndSetParameter(value, subsystemAdd, reader);
break;
case WORKER_TASK_CORE_THREADS:
if (subsystemAdd.hasDefined(CommonAttributes.WORKER_TASK_CORE_THREADS)) {
throw duplicateAttribute(reader, CommonAttributes.WORKER_TASK_CORE_THREADS);
}
RemotingSubsystemRootResource.WORKER_TASK_CORE_THREADS.parseAndSetParameter(value, subsystemAdd, reader);
break;
case WORKER_TASK_KEEPALIVE:
if (subsystemAdd.hasDefined(CommonAttributes.WORKER_TASK_KEEPALIVE)) {
throw duplicateAttribute(reader, CommonAttributes.WORKER_TASK_KEEPALIVE);
}
RemotingSubsystemRootResource.WORKER_TASK_KEEPALIVE.parseAndSetParameter(value, subsystemAdd, reader);
break;
case WORKER_TASK_LIMIT:
if (subsystemAdd.hasDefined(CommonAttributes.WORKER_TASK_LIMIT)) {
throw duplicateAttribute(reader, CommonAttributes.WORKER_TASK_LIMIT);
}
RemotingSubsystemRootResource.WORKER_TASK_LIMIT.parseAndSetParameter(value, subsystemAdd, reader);
break;
case WORKER_TASK_MAX_THREADS:
if (subsystemAdd.hasDefined(CommonAttributes.WORKER_TASK_MAX_THREADS)) {
throw duplicateAttribute(reader, CommonAttributes.WORKER_TASK_MAX_THREADS);
}
RemotingSubsystemRootResource.WORKER_TASK_MAX_THREADS.parseAndSetParameter(value, subsystemAdd, reader);
break;
case WORKER_WRITE_THREADS:
if (subsystemAdd.hasDefined(CommonAttributes.WORKER_WRITE_THREADS)) {
throw duplicateAttribute(reader, CommonAttributes.WORKER_WRITE_THREADS);
}
RemotingSubsystemRootResource.WORKER_WRITE_THREADS.parseAndSetParameter(value, subsystemAdd, reader);
break;
default:
throw unexpectedAttribute(reader, i);
}
}
requireNoContent(reader);
} | [
"Adds the worker thread pool attributes to the subysystem add method"
] | [
"Inserts a Serializable value into the mapping of the underlying Bundle, replacing any existing\nvalue for the given key. Either key or value may be null.\n\n@param key a String, or null\n@param value a Serializable object, or null\n@return this bundler instance to chain method calls",
"Generates a unique signature for an annotated type. Members without\nannotations are omitted to reduce the length of the signature\n\n@param <X>\n@param annotatedType\n@return hash of a signature for a concrete annotated type",
"Removes the row with the specified key from this association.\n\n@param key the key of the association row to remove",
"Initialize that Foundation Logging library.",
"Process the standard working hours for a given day.\n\n@param mpxjCalendar MPXJ Calendar instance\n@param uniqueID unique ID sequence generation\n@param day Day instance\n@param typeList Planner list of days",
"Obtains a Discordian zoned date-time from another date-time object.\n\n@param temporal the date-time object to convert, not null\n@return the Discordian zoned date-time, not null\n@throws DateTimeException if unable to create the date-time",
"Replace a single value at the appropriate location in the existing value array.\n@param index - location in the array list\n@param newValue - the new String",
"Check if the an operation is done or not.\n\n@param requestId Id of the request\n@param remove Whether remove the request out of the list if it is done.\n@return True if request is complete, false otherwise",
"Reads characters until any 'end' character is encountered, ignoring\nescape sequences.\n\n@param out\nThe StringBuilder to write to.\n@param in\nThe Input String.\n@param start\nStarting position.\n@param end\nEnd characters.\n@return The new position or -1 if no 'end' char was found."
] |
public List<Set<String>> makeNWiseTuples(String[] variables, int nWise) {
List<Set<String>> completeTuples = new ArrayList<>();
makeNWiseTuplesHelper(completeTuples, variables, 0, new HashSet<String>(), nWise);
return completeTuples;
} | [
"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"
] | [
"Use this API to fetch responderhtmlpage resource of given name .",
"Create and get actor system.\n\n@return the actor system",
"Checks if a Zip is valid navigating through the entries\n\n@param file File to validate\n@throws IOException I/O Error",
"Use this API to fetch all the tmsessionparameter resources that are configured on netscaler.",
"Sets the provided filters.\n@param filters a map \"column id -> filter\".",
"Creates a curator built using Fluo's zookeeper connection string. Root path will start at Fluo\nchroot.",
"Returns true if required properties for MiniFluo are set",
"Returns a UTMDetail object which consists of UTM parameters like source, medium & campaign\n@return The {@link UTMDetail} object",
"Clear the mask for a new selection"
] |
public static List<String> getStoreNames(List<StoreDefinition> storeDefList) {
List<String> storeList = new ArrayList<String>();
for(StoreDefinition def: storeDefList) {
storeList.add(def.getName());
}
return storeList;
} | [
"Given a list of store definitions return a list of store names\n\n@param storeDefList The list of store definitions\n@return Returns a list of store names"
] | [
"Creates a polling state.\n\n@param response the response from Retrofit REST call that initiate the long running operation.\n@param lroOptions long running operation options.\n@param defaultRetryTimeout the long running operation retry timeout.\n@param resourceType the type of the resource the long running operation returns\n@param serializerAdapter the adapter for the Jackson object mapper\n@param <T> the result type\n@return the polling state\n@throws IOException thrown by deserialization",
"Recursively builds the VFS entry bean for the quick filtering function in the folder tab.<p<\n\n@param resource the resource\n@param childMap map from parent to child resources\n@param filterMatches the resources matching the filter\n@param parentPaths root paths of resources which are not leaves\n@param isRoot true if this the root node\n\n@return the VFS entry bean for the client\n\n@throws CmsException if something goes wrong",
"Use this API to add nsacl6.",
"Delete a server group by id\n\n@param id server group ID",
"Use this API to update bridgetable resources.",
"Each schema set has its own database cluster. The template1 database has the schema preloaded so that\neach test case need only create a new database and not re-invoke Migratory.",
"Check if the object has a property with the key.\n\n@param key key to check for.",
"Enables a dark shadow for this CircularImageView.\nIf the radius is set to 0, the shadow is removed.\n@param radius Radius for the shadow to extend to.\n@param dx Horizontal shadow offset.\n@param dy Vertical shadow offset.\n@param color The color of the shadow to apply.",
"Removes the specified objects.\n\n@param collection The collection to remove."
] |
@SuppressWarnings({"unused", "WeakerAccess"})
public static NotificationInfo getNotificationInfo(final Bundle extras) {
if (extras == null) return new NotificationInfo(false, false);
boolean fromCleverTap = extras.containsKey(Constants.NOTIFICATION_TAG);
boolean shouldRender = fromCleverTap && extras.containsKey("nm");
return new NotificationInfo(fromCleverTap, shouldRender);
} | [
"Checks whether this notification is from CleverTap.\n\n@param extras The payload from the GCM intent\n@return See {@link NotificationInfo}"
] | [
"Adds all direct subtypes to the given list.\n\n@param type The type for which to determine the direct subtypes\n@param subTypes The list to receive the subtypes",
"Leave a group.\n\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.leave.html\">lickr.groups.leave</a> for a description of the various behaviors possible\nwhen a user leaves a group.\n\n@param groupId\n- the id of the group to leave\n@param deletePhotos\n- delete photos by this user from group",
"Add a value to this activity code.\n\n@param uniqueID value unique ID\n@param name value name\n@param description value description\n@return ActivityCodeValue instance",
"Makes sure that the operation name and the address have been set and returns a ModelNode\nrepresenting the operation request.",
"If the given result is not cudnnStatus.CUDNN_STATUS_SUCCESS\nand exceptions have been enabled, this method will throw a\nCudaException with an error message that corresponds to the\ngiven result code. Otherwise, the given result is simply\nreturned.\n\n@param result The result to check\n@return The result that was given as the parameter\n@throws CudaException If exceptions have been enabled and\nthe given result code is not cudnnStatus.CUDNN_STATUS_SUCCESS",
"set proper expression text invoking the DJCRosstabMeasurePrecalculatedTotalProvider for the cell\n@param auxRows\n@param auxCols\n@param measureExp\n@param djmeasure\n@param crosstabColumn\n@param crosstabRow\n@param meausrePrefix",
"Get an array of property ids.\n\nNot all property ids need be returned. Those properties\nwhose ids are not returned are considered non-enumerable.\n\n@return an array of Objects. Each entry in the array is either\na java.lang.String or a java.lang.Number",
"Use this API to fetch all the systemsession resources that are configured on netscaler.",
"Modify a module.\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"
] |
public void updatePathOrder(int profileId, int[] pathOrder) {
for (int i = 0; i < pathOrder.length; i++) {
EditService.updatePathTable(Constants.PATH_PROFILE_PATH_ORDER, (i + 1), pathOrder[i]);
}
} | [
"Updates the path_order column in the table, loops though the pathOrder array, and changes the value to the loop\nindex+1 for the specified pathId\n\n@param profileId ID of profile\n@param pathOrder array containing new order of paths"
] | [
"get target hosts from line by line.\n\n@param sourcePath\nthe source path\n@param sourceType\nthe source type\n@return the list\n@throws TargetHostsLoadException\nthe target hosts load exception",
"Additional objects to include with the requested group.\nNote that all the optional includes depend on \"assignments\" also being included.\n@param includes List of included objects to return\n@return this object to continue building options",
"Reinitializes the shader texture used to fill in\nthe Circle upon drawing.",
"Removes a parameter from this configuration.\n\n@param key the parameter to remove",
"Tells you if the expression is a null safe dereference.\n@param expression\nexpression\n@return\ntrue if is null safe dereference.",
"Put the core auto-code algorithm here so an external class can call it",
"Registers a BeanNameAutoProxyCreator class that wraps the bean being\nmonitored. The proxy is associated with the PerformanceMonitorInterceptor\nfor the bean, which is created when parsing the methods attribute from\nthe springconfiguration xml file.\n\n@param source An Attribute node from the spring configuration\n@param holder A container for the beans I will create\n@param context the context currently parsing my spring config",
"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",
"Logs all properties"
] |
public static lbmonitor_binding[] get(nitro_service service, String monitorname[]) throws Exception{
if (monitorname !=null && monitorname.length>0) {
lbmonitor_binding response[] = new lbmonitor_binding[monitorname.length];
lbmonitor_binding obj[] = new lbmonitor_binding[monitorname.length];
for (int i=0;i<monitorname.length;i++) {
obj[i] = new lbmonitor_binding();
obj[i].set_monitorname(monitorname[i]);
response[i] = (lbmonitor_binding) obj[i].get_resource(service);
}
return response;
}
return null;
} | [
"Use this API to fetch lbmonitor_binding resources of given names ."
] | [
"Use this API to fetch all the systementitydata resources that are configured on netscaler.\nThis uses systementitydata_args which is a way to provide additional arguments while fetching the resources.",
"Writes the object to the specified document, optionally creating a child\nelement. The object in this case should be a point.\n\n@param o the object (of type Point).\n@param document the document to write to.\n@param asChild create child element if true.\n@throws RenderException",
"Returns a PreparedStatementCreator that returns a count of the rows that\nthis creator would return.\n\n@param dialect\nDatabase dialect.",
"Returns a string that should be used as a label for the given item. The\nmethod also ensures that each label is used for only one class. Other\nclasses with the same label will have their QID added for disambiguation.\n\n@param entityIdValue\nthe item to label\n@return the label",
"Answer the TableAlias for aPath or aUserAlias\n@param aPath\n@param aUserAlias\n@param hintClasses\n@return TableAlias, null if none",
"Process a relationship between two tasks.\n\n@param row relationship data",
"Returns the union of sets s1 and s2.",
"Initializes the components.\n\n@param components the components",
"Updates the cluster and store metadata atomically\n\nThis is required during rebalance and expansion into a new zone since we\nhave to update the store def along with the cluster def.\n\n@param cluster The cluster metadata information\n@param storeDefs The stores metadata information"
] |
private static void handleSignals() {
if (DaemonStarter.isRunMode()) {
try {
// handle SIGHUP to prevent process to get killed when exiting the tty
Signal.handle(new Signal("HUP"), arg0 -> {
// Nothing to do here
System.out.println("SIG INT");
});
} catch (IllegalArgumentException e) {
System.err.println("Signal HUP not supported");
}
try {
// handle SIGTERM to notify the program to stop
Signal.handle(new Signal("TERM"), arg0 -> {
System.out.println("SIG TERM");
DaemonStarter.stopService();
});
} catch (IllegalArgumentException e) {
System.err.println("Signal TERM not supported");
}
try {
// handle SIGINT to notify the program to stop
Signal.handle(new Signal("INT"), arg0 -> {
System.out.println("SIG INT");
DaemonStarter.stopService();
});
} catch (IllegalArgumentException e) {
System.err.println("Signal INT not supported");
}
try {
// handle SIGUSR2 to notify the life-cycle listener
Signal.handle(new Signal("USR2"), arg0 -> {
System.out.println("SIG USR2");
DaemonStarter.getLifecycleListener().signalUSR2();
});
} catch (IllegalArgumentException e) {
System.err.println("Signal USR2 not supported");
}
}
} | [
"I KNOW WHAT I AM DOING"
] | [
"List the addons already added to an app.\n@param appName new of the app\n@return a list of add-ons",
"Sets the target directory.",
"Roll the java.util.Time forward or backward.\n\n@param startDate - The start date\n@param period Calendar.YEAR etc\n@param amount - Negative to rollbackwards.",
"Prints a debug log message that details the time taken for the Http\nrequest to be parsed by the coordinator\n\n@param operationType\n@param receivedTimeInMs",
"Creates a new HTML-formatted label with the given content.\n\n@param html the label content",
"Fetches the HttpMethod from annotations and returns String representation of HttpMethod.\nReturn emptyString if not present.\n\n@param method Method handling the http request.\n@return String representation of HttpMethod from annotations or emptyString as a default.",
"Parses all child Shapes recursively and adds them to the correct JSON\nObject\n\n@param childShapes\n@throws org.json.JSONException",
"Print a task type.\n\n@param value TaskType instance\n@return task type value",
"Returns a string array of the methods loaded for a class\n\n@param pluginClass name of class\n@return string array of the methods loaded for the class\n@throws Exception exception"
] |
private static boolean equalAsInts(Vec2d a, Vec2d b) {
return ((int) a.x) == ((int) b.x) && ((int) a.y) == ((int) b.y);
} | [
"Return true if the values of the two vectors are equal when cast as ints.\n\n@param a first vector to compare\n@param b second vector to compare\n@return true if the values of the two vectors are equal when cast as ints"
] | [
"Create an `AppDescriptor` with appName and entry class specified.\n\nIf `appName` is `null` or blank, it will try the following\napproach to get app name:\n\n1. check the {@link Version#getArtifactId() artifact id} and use it unless\n2. if artifact id is null or empty, then infer app name using {@link AppNameInferer}\n\n@param appName\nthe app name\n@param entryClass\nthe entry class\n@return\nan `AppDescriptor` instance",
"Get result of one of the task that belongs to this task's task group.\n\n@param key the task key\n@param <T> the actual type of the task result\n@return the task result, null will be returned if task has not produced a result yet",
"Use this API to update snmpmanager resources.",
"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",
"Find the fields in which the Activity ID and Activity Type are stored.",
"Performs the BFS and gives the results to a distributor to distribute\n\n@param distributor the distributor",
"Read relation data.",
"This can be called to adjust the size of the dialog glass. It\nis implemented using JSNI to bypass the \"private\" keyword on\nthe glassResizer.",
"Acquire a calendar instance.\n\n@return Calendar instance"
] |
public ProjectCalendar getByName(String calendarName)
{
ProjectCalendar calendar = null;
if (calendarName != null && calendarName.length() != 0)
{
Iterator<ProjectCalendar> iter = iterator();
while (iter.hasNext() == true)
{
calendar = iter.next();
String name = calendar.getName();
if ((name != null) && (name.equalsIgnoreCase(calendarName) == true))
{
break;
}
calendar = null;
}
}
return (calendar);
} | [
"Retrieves the named calendar. This method will return\nnull if the named calendar is not located.\n\n@param calendarName name of the required calendar\n@return ProjectCalendar instance"
] | [
"Add UDFType objects to a PM XML file.\n\n@author kmahan\n@date 2014-09-24\n@author lsong\n@date 2015-7-24",
"Use this API to fetch all the ntpserver resources that are configured on netscaler.",
"Returns an integer between interval\n@param min Minimum value\n@param max Maximum value\n@return int number",
"Collect environment variables and system properties under with filter constrains",
"Add \"ORDER BY\" clause to the SQL query statement. This can be called multiple times to add additional \"ORDER BY\"\nclauses. Ones earlier are applied first.",
"Decomposes the provided matrix and stores the result in the same matrix.\n\n@param A Matrix that is to be decomposed. Modified.\n@return If it succeeded or not.",
"Executes the given transaction within the context of a write lock.\n\n@param t The transaction to execute.",
"Retrieve a table of data.\n\n@param type table type\n@return FastTrackTable instance",
"Look for a style in the named styles provided in the configuration.\n\n@param styleName the name of the style to look for."
] |
public static Object readObject(File file) throws IOException,
ClassNotFoundException {
FileInputStream fileIn = new FileInputStream(file);
ObjectInputStream in = new ObjectInputStream(new BufferedInputStream(fileIn));
try {
return in.readObject();
} finally {
IoUtils.safeClose(in);
}
} | [
"To read an object in a quick & dirty way. Prepare to handle failures when object serialization changes!"
] | [
"Returns the screen width in pixels\n\n@param context is the context to get the resources\n@return the screen width in pixels",
"Sets the license for a photo.\n\nThis method requires authentication with 'write' permission.\n\n@param photoId\nThe photo to update the license for.\n@param licenseId\nThe license to apply, or 0 (zero) to remove the current license.\n@throws FlickrException",
"Try to build an default PBKey for convenience PB create method.\n\n@return PBKey or <code>null</code> if default key was not declared in\nmetadata",
"Creates the database.\n\n@throws PlatformException If some error occurred",
"Returns the local collection representing the given namespace for raw document operations.\n\n@param namespace the namespace referring to the local collection.\n@return the local collection representing the given namespace for raw document operations.",
"Creates new row in table\n@param broker\n@param field\n@param sequenceName\n@param maxKey\n@throws Exception",
"Appends the key and value to the address and sets the address on the operation.\n\n@param operation the operation to set the address on\n@param base the base address\n@param key the key for the new address\n@param value the value for the new address",
"Generate a uniform random number in the range [lo, hi)\n\n@param lo lower limit of range\n@param hi upper limit of range\n@return a uniform random real in the range [lo, hi)",
"Add a variable to the scripting context.\n\n@param varName The variable name.\n@param value The variable value."
] |
static String guessEntityTypeFromId(String id) {
if(id.isEmpty()) {
throw new IllegalArgumentException("Entity ids should not be empty.");
}
switch (id.charAt(0)) {
case 'L':
if(id.contains("-F")) {
return JSON_ENTITY_TYPE_FORM;
} else if(id.contains("-S")) {
return JSON_ENTITY_TYPE_SENSE;
} else {
return JSON_ENTITY_TYPE_LEXEME;
}
case 'P':
return JSON_ENTITY_TYPE_PROPERTY;
case 'Q':
return JSON_ENTITY_TYPE_ITEM;
default:
throw new IllegalArgumentException("Entity id \"" + id + "\" is not supported.");
}
} | [
"RReturns the entity type of the id like \"item\" or \"property\"\n\n@param id\nthe identifier of the entity, such as \"Q42\"\n@throws IllegalArgumentException\nif the id is invalid"
] | [
"Set the given column name to the given value.\n\n@param name The column name to set.\n@param value the value to set.\n@return {@code this}\n@throws IllegalArgumentException if a column name does not exist in the table.",
"Return a new instance of the BufferedImage\n\n@return BufferedImage",
"Creates metadata on this folder using a specified scope and template.\n\n@param templateName the name of the metadata template.\n@param scope the scope of the template (usually \"global\" or \"enterprise\").\n@param metadata the new metadata values.\n@return the metadata returned from the server.",
"Return a list of segments where each segment is either the content of a line in the given text or a line-break\naccording to the configured delimiter. Existing line-breaks in the text will be replaced by this's\ninstances delimiter.\n\n@param text\nthe to-be-splitted text. May be <code>null</code>.\n@return a list of segments. Is never <code>null</code>.",
"Check the model for expression values.\n\n@param model the model\n@return the attribute containing an expression",
"Use this API to fetch dnszone_domain_binding resources of given name .",
"The period of time to ban a node that gives an error on an operation.\n\n@param nodeBannagePeriod The period of time to ban the node\n@param unit The time unit of the given value\n\n@deprecated Use {@link #setFailureDetectorBannagePeriod(long)} instead",
"Executes a HTTP request and parses the JSON response into a Response instance.\n\n@param connection The HTTP request to execute.\n@return Response object of the deserialized JSON response",
"Switch to a new DataSource using the given configuration.\n@param newConfig BoneCP DataSource to use.\n@throws SQLException"
] |
public void setOccurence(int min, int max) throws ParseException {
if (!simplified) {
if ((min < 0) || (min > max) || (max < 1)) {
throw new ParseException("Illegal number {" + min + "," + max + "}");
}
if (min == 0) {
optional = true;
}
minimumOccurence = Math.max(1, min);
maximumOccurence = max;
} else {
throw new ParseException("already simplified");
}
} | [
"Sets the occurence.\n\n@param min the min\n@param max the max\n@throws ParseException the parse exception"
] | [
"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",
"Gets the proper modulus operation.\n\n@param x Integer.\n@param m Modulo.\n@return Modulus.",
"Information about a specific release.\n@param appName App name. See {@link #listApps} for a list of apps that can be used.\n@param releaseName Release name. See {@link #listReleases} for a list of the app's releases.\n@return the release object",
"Load the given metadata profile for the current thread.",
"Get list of replies\n\n@param topicId\nUnique identifier of a topic for a given group {@link Topic}.\n@return A reply object\n@throws FlickrException\n@see <a href=\"http://www.flickr.com/services/api/flickr.groups.discuss.replies.getList.html\">API Documentation</a>",
"Sets the alias. By default the entire attribute path participates in the alias\n@param alias The name of the alias to set",
"Returns the tags that were root in the definition files. These serve as entry point shortcuts when browsing the graph. We could reduce this to\njust fewer as the root tags may be connected through parents=\"...\".",
"Cut the message content to the configured length.\n\n@param event the event",
"Set the main attribute \"Bundle-Activator\" to the given value.\n\n@param bundleActivator The new value"
] |
public BoxFolder.Info createFolder(String name) {
JsonObject parent = new JsonObject();
parent.add("id", this.getID());
JsonObject newFolder = new JsonObject();
newFolder.add("name", name);
newFolder.add("parent", parent);
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), CREATE_FOLDER_URL.build(this.getAPI().getBaseURL()),
"POST");
request.setBody(newFolder.toString());
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON = JsonObject.readFrom(response.getJSON());
BoxFolder createdFolder = new BoxFolder(this.getAPI(), responseJSON.get("id").asString());
return createdFolder.new Info(responseJSON);
} | [
"Creates a new child folder inside this folder.\n\n@param name the new folder's name.\n@return the created folder's info."
] | [
"Use this API to reset Interface resources.",
"Use this API to fetch nstrafficdomain_binding resource of given name .",
"Sets a custom response on an endpoint using default profile and client\n\n@param pathValue path (endpoint) value\n@param requestType path request type. \"GET\", \"POST\", etc\n@param customData custom response data\n@return true if success, false otherwise",
"Creates a searchable item that represents a metadata field found for a track.\n\n@param menuItem the rendered menu item containing the searchable metadata field\n@return the searchable metadata field",
"Print a task UID.\n\n@param value task UID\n@return task UID string",
"Creates a unique name, suitable for use with Resque.\n\n@return a unique name for this worker",
"Gets the Json Array representation of the given list of strings.\n@param keys List of strings\n@return the JsonArray represents the list of keys",
"Given an array of variable names, returns a JsonObject\nof values.\n\n@param dataMap an map containing variable names and their corresponding values\nnames.\n@return a json object of values",
"Get a random sample of k out of n elements.\n\nSee Algorithm S, D. E. Knuth, The Art of Computer Programming, Vol. 2, p.142."
] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.